Using a custom preloader
Actionscript 3, Flash Components, Tutorials January 13th, 2009Any of the flash components available at FlashOtaku.com gives you the possibility to create a custom preloader or a temporary clip, to be more precise. The temporary clip will act as a re-placer for the content of the item until the content is completely loaded. By default, a simple temporary clip is created for you with a specified color and transparency and there are also 5 built-in preloaders from which you can chose, but there are times when you want something more suited for your project. In those cases you can create a movie clip and simply tell the component to use that movie clip as a temporary clip.
Below you can see an example where I used a simple movie clip with a rotating star(the animation is created with frames). After creating the movie clip you need to associate it a class (Right-click on the library symbol -> Linkage), TempClip for example, and then pass the name of the class to the component’s temporaryClipReference property (myInstance.temporaryClipReference = TempClip).
Here’s the example:
April 22nd, 2009 at 7:25 am
can i show percentage of loading by using these components .I want to use it in flex like this article has specified :
http://askmeflash.com/article_m.php?p=article&id=7
April 22nd, 2009 at 1:48 pm
The components are built to be used in Flash. However, you can create a SWF in Flash and then load it in Flex.
You can show the loading percentage of each particular item or you can show the global loading status (how many images images have loaded from the total).
July 13th, 2009 at 8:59 pm
I am trying to use a custom preloader with the Slideshow as per your instructions but I appear to be having some difficulty in getting the component to load the my temporaryClipReference I have specified.
The temporary clip is an swf file I’ve created and works fine on it’s own. I imported my temporary clip into the fla for my slideshow library. I should mention that when I imported the swf, the file was imported as a graphic and not as a movie clip even though I specifically chose “import movie”. Therefore I then converted it to a movie clip within my slideshow library. I then specified the class name for the temporary clip in the temporaryClipReference property.
Please note that the live preview does not show my temporary clip and instead shows the component’s temporary shape. Also, I wasn’t sure if should have set the preloaderType property to none or not so I tried testing both senarios without any success.
I’m not sure what I’m doing wrong..Is there anything I’m missing here?
Your help is greatly appreciated!
July 13th, 2009 at 9:18 pm
Hi AL,
The temporary clip should work if set up correctly. You can send me your file at contact [at] flashotaku [dot] com and I’ll take a look at it.