| Ultrashock Forums
• Preloader in AS3? |
|||
![]() |
||||
| Search this Thread | Thread Tools | Display Modes |
|
|
|||||||||||||||||||||||||
![]() |
Ultrashock Member Comments:
17 Creative Assets
|
2007-08-20
#2 |
||
|
|
|
2007-08-20
#3 |
||
|
Thank you so much for your help. I used the code and it works. The only thing that really confused me is where you said... // This is where you would update the progress bar. The way I used to do it was with a dynamic text field. Is this what you mean? Do you mean using a progress bar component? If you meant the text field, what would I call it? Thank you again. I really appreciate it. Cmoore |
|
17 Creative Assets
|
2007-08-20
#4 |
||
|
Originally posted by cmoore It depends on what you want to do really. I added that comment into the progressListener() function because that is where you can grab the number of bytes loaded and do the percentage calculations etc, so it would be the easiest place to update your progress bar or text field.... Do you mean using a progress bar component? If you meant the text field, what would I call it? ... ActionScript Code:
|
|
|
|
2007-08-20
#5 |
||
|
Worked great. Thanks for your time. Just curious, but are load levels now obsolete? If not, how are they determined? Is it by the order they are loaded? I'm just curious, because I might be loading a second swf into this mainmovie. Take care and thanks again Nutrox. Cmoore |
|
|
2007-08-20
#6 |
||
|
Cool One Nutrox. And, How can i control the loaded swf? I mean stop the movie or play the movie and those things. |
|
17 Creative Assets
|
2007-08-20
#7 |
||
|
@cmoore Levels no longer exist in AS3, instead everything is displayed and arranged in display lists. You should take a look at the DisplayObjectContainer class (or the Sprite or MovieClip class) because it contains the functions you will need such as addChild() removeChild() getChildIndex() swapChildren() and so on. @geo_speed You need to access the loaded SWF file via the Loader.content property, so once the external SWF file has loaded you could then do something like this: ActionScript Code:
|
|
|
2007-08-21
#8 |
||
|
Thanks Nutrox, But it’s not working. ActionScript Code:
I used your code only. |
|
17 Creative Assets
|
2007-08-21
#9 |
||
|
Does the SWF file you are loading have 100 frames?
|
|
|
2007-08-21
#10 |
||
|
Yeah... sorry its working now. Before that I tried with one video swf. I think there is the problem. Very thanks Mr.Nutrox
|
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|


9 comments
| 361 views

17 Creative Assets
Linear Mode
The Loader class is what you need to be looking at really. It is the main class you will use to load external SWF and image files.
It is difficult to tell how much of this you have already picked up but here is a quick example of how to load an external SWF file and listen for progress/complete events.