| TURK-CAD BLOG |
| İLANLAR |
| TURK-CAD FORUM |
| DOWNLOAD |
| İLGİNÇ TASARIMLAR |
| TURK-CAD ARAMA |
| LİNK REHBERİ |
| SEKTÖR REHBERİ |
| 2009 FUAR REHBERİ |
| SİTE HARİTASI |
| KİTAP TANITIM |
| TORNA TEZGAHLARI |
| CNC TEZGAHLARI |
| CAD/CAM/CAE |
| BİLİM/TEKNOLOJİ |
| OTOMOTİV |
| SEKTÖREL |
| ÇELİK MALZEMELER |
| PLASTİK MALZEMELER |
| DÖKÜM MALZEMELER |
| GENEL MALZEMELER |
| GİRİŞ |
| ROBOT NEDİR |
| ROBOT TARİHİ |
| SINIFLANDIRMASI |
| TUTUCU/SINIRLAYICI |
| UYGULAMA ALANI |
| AVANTAJLARI |
| Sac Kaliplari Hk. |
| ÖNSÖZ |
| CNC TEZ. TARİHÇESİ |
| CNC NEDİR |
| TAKIM TEZGAHLARI |
| CNC AVANTAJLARI |
| CNC DEZAVANTAJLARI |
| KULLANIM ALANLARI |
| TORNA TEZGAHLARI |
| FREZE TEZGAHLARI |
| İŞLEME MERKEZLERİ |
| MATKAP TEZGAHLARI |
| TAŞLAMA TEZGAHLARI |
| PRES/ZIMBA DELİCİLER |
| NOKTA KAYNAK MAK. |
| DİĞER CNC TAKIM TEZ. |
| CNC LERDE BAKIM |
| TAKIM SEÇİMİ |
| İŞ BAĞLAMA |
| PROGRAMLAMA |
| TEZGAH SEÇİMİ |
| CAD/CAM NEDİR? |
| DNC NEDİR? |
| KOJENERASYON |
| FANUC G KODLARI |
| PROJE YÖNETİMİ 1 |
| PROJE YÖNETİMİ 2 |
| ERGONOMİ 1 |
| ERGONOMİ 2 |
| ERGONOMİ 3 |
| ERGONOMİ 4 |
| HESAP MAKİNASI |
| KUVVET HESABI |
| DEBİ HESABI |
| MOMENT HESABI |
| MOTOR GÜCÜ HES. |
| BORU ÇAPI HES. |
| BURKULMA HESABI |
| HAVA TÜKETİM HES. |
| TRİGONOMETRİK TB. |
| MAL. ÇEKME PAYI |
| ÖZGÜL AĞIRLIKLAR |
| PERİYODİK TABLO |
| MAKİNE TASARIMI VE PROJELENDİRİLMESİ İş Arayanlar (09.11.2008) | |
| makina tasarımı -teknik resim çizimi Ticari Talepler-Fason (20.09.2008) | |
| TASARIM DERSLERİ VE MAKİNA TASARIMI Ticari Talepler-Muhendislik (20.09.2008) | |
| CNC CNCROUTER EUROCNC Ticari Talepler-Cnc (31.07.2008) | |
| Isıl İşlem Ticari Talepler-Fason (18.06.2008) | |


![]() | DERS-11-GEOMETRİK BİR ALAN SEÇMEK İzlenme Sayısı: 479 |
![]() | DERS-11-FOTOKOPİ EFEKTİ OLUŞTURMAK İzlenme Sayısı: 204 |
![]() | DERS-11-FOTOGRAFLARDAKİ KIRMIZI GÖZLERİ DÜZENLEMEK İzlenme Sayısı: 207 |
![]() | DERS-11-FIRÇA SEÇMEK İzlenme Sayısı: 137 |
![]() | DERS-11-FİLTRE GALERİSİ İzlenme Sayısı: 230 |
![]() | DERS-11-FİLM GRENİ EFEKTİ OLUŞTURMAK İzlenme Sayısı: 168 |
![]() | DERS-10-FILE BROWSER İzlenme Sayısı: 135 |
![]() | DERS-10-EPS BİÇİMİNDE DOSYA KAYDETMEK İzlenme Sayısı: 147 |
![]() | DERS-10-EĞRİLERİ SEÇİM ALANINA DÖNÜŞTÜRMEK İzlenme Sayısı: 178 |
![]() | DERS-10-EĞRİLERİ DÜZENLEMEK VE BOYAMAK İzlenme Sayısı: 225 |
| Tiled Background in Flash 8 |
|
|
This tutorial will teach you how to tile the background in Flash 8. In previous versions of Flash, you had to duplicate a movie clip a number of times so that it covered the entire stage. This method is outlined in Kirupa’s tutorial: http://www.kirupa.com/developer/mx2004/duplicatebackground.htm While this works great, Flash 8 provides a more efficient means of creating a tiled background through the BitmapData class. This class allows you to create a tiled background using the drawing API methods. Let’s get started. Create a new document in Flash and make its dimensions 300px by 200px. Now you’ll need your tile, for this tutorial we’ll use the same tile as used by Kirupa: [ pattern courtesy of squidfingers ] Save the picture to your computer and import it into your empty Flash document. Now we need to set up the linkage settings for the bitmap so that we can use it in ActionScript. To do this, right-click on the bitmap in the library and select linkage. In the window that pops up, check Export for ActionScript and give it the linkage identifier of pattern (if it isn’t already). ![]() [ change the linkage properties of your bitmap ] Now we need to start coding. Create a new layer and open up the actions panel for the frame. The first step is to let the compiler know that we are using the flash.display.BitmapData class. We do this with an import statement.
Now it’s time to actually create the tile in our code by creating a BitmapData instance and assigning it to a variable. Since we want to load a bitmap from the library, we use the static method loadBitmap and pass it the linkage name of our tile in the library (pattern). This method returns a BitmapData instance, which we assign to a variable named tile for later use in our code.
All that’s left is to draw a rectangle around the stage. First we must begin the filling operation by using the beginBitmapFill method. For this tutorial, we will only focus on the first argument of the function since the rest are optional. This argument is the BitmapData instance we wish to use for the fill, so we pass it our tile instance.
To draw the rectangle, we just connect lines around the stage using the lineTo method. Instead of manually typing in the size of the stage, we can use the Stage class and its static width and height properties.
Finally we need to end the filling operation using endFill. This way if you use the drawing API later in your code, it won’t use the tile as the fill.
Test the movie and voila, it’s as easy as that. Hopefully this provides an easier approach for creating tiled backgrounds in Flash 8 with ActionScript. In case you missed a step, the completed source is available below. If you have any questions, please feel free to post them on kirupaForums. Good luck! |
| < Önceki | Sonraki > |
|---|