- Home
- Tutorials
- Flash
- Intermediate
- Preloading in ActionScript 3.0, the Easy Way

Loading the SWF File
Christopher Skyi

Words Words SEO Words is a New York City Brooklyn-based Personalized SEO, Copywriting & Inbound Marketing Boutique designed to address the needs of large and medium size business who need more traffic to, and better lead generation from, their web site.
Words Words SEO Words 1) finds high value, specific ("Long Tail) keywords that brings traffic from visitors who want to buy the types of products and services you have to offer; 2) converts more of your traffic into leads by using great copywriting, google analystics, and A/B landing page testing; 3) creates inbound links to your business website; and 4) sets up and manages your social media profiles and maximizes your ranking in local search (e.g., "Google Places).
Visit Christopher's blog @ Hang Him With His SEO Pen CopyWriter
At this point, we have two choices. First, we can add the loader to the LoadSystem’s main timeline:
addChild(loader);
This statement adds the loader as a display object child to the SWF file’s main Timeline. The loader is at depth 0 in the display of the main Timeline (i.e., movieClip) object. We know that by from these two trace statements:
trace("the 'loader' object descends/is contained in this specific DisplayObjectContainer:"+loader.root);
trace("depth of 'loader' object = "+getChildIndex(loader));
they return:
The 'loader' object descends/is contained in this specific DisplayObjectContainer:[object MainTimeline].
depth of 'loader' object = 0.
Second, we can add the loader to the Stage so it’s at dept 0 in Stage’s child list:
stage.addChild(loader);
If we use these trace statements:
trace("The 'loader' object descends/is contained in this specific DisplayObjectContainer:"+loader.root);
trace("Object at index 1 is: "+stage.getChildAt(1));
trace("Depth of 'loader' object = "+stage.getChildIndex(loader));
they return:
The 'loader' object descends/is contained in this specific DisplayObjectContainer:[object Stage].
Object at index 1 is: [object Loader].
Depth of 'loader' object = 1
So which should we use? Colin Moock in Chapter 20 of Essential ActionScript 3.0 suggests adding it to the Stage. To be honest, I’m not sure what the advantages or disadvantages are, and this “brief” tutorial is becoming rather long, so since he’s Colin Moock, I’ll just play it smart and follow his example.
Spread The Word
Related Links
Attachments
9 Responses to "Preloading in ActionScript 3.0, the Easy Way" 
|
said this on 08 Apr 2009 7:03:12 AM CST
Thanks!
Building the W |
|
said this on 20 May 2009 5:58:40 AM CST
Thanks, this is a fantast
|
|
said this on 22 Jun 2009 9:25:48 AM CST
Christopher, your tutoria
I've tried - stage.scal - lo - loader.width = g - loader.scaleX - loader.con - loader.c and a I've pla I'd Thank you v Regards, Cesa |
|
said this on 09 Nov 2009 11:22:16 PM CST
how do you access variabl
|
|
said this on 10 Jun 2010 11:24:26 PM CST
Absolutely outstanding tu
|
|
said this on 10 Sep 2010 12:15:13 PM CST
Great tut! However, I've
|
|
said this on 10 Sep 2010 12:16:48 PM CST
Great tut! However, I've
|
|
said this on 16 Sep 2010 7:30:59 AM CST
hi, your link to the tuto
|


Author/Admin)
