This content has been marked as final. Show 5 replies
yes, the code's the same for loading a swf or jpg: use the loader class.
you don't load into container objects in as3. you load using a loader and you add your loader to the display list so your loaded swf will be visible.
if you need to communicate with assets inside your swf, you'll probably need to use localconnection which may be problematic if a non-flash application created your swf.
in any case, read about the loader class, check the example(s) in the flash help files and if you have trouble adapting their code to your specifics, copy and paste your code using the attach code option.
You should have no problems communicating with properly referenced assets and code inside your loaded SWF, if the main SWF is in AS3 and the loaded SWF is also in AS3. What kglad is referring to with localconnection is, if your main SWf is AS3 and the loaded SWF is AS2, then you've got to use some fancy hacks to get around compatibility issues between AS3 and AS2 SWFs. My rule of thumb regarding AS3/AS2 communication (sometimes referred to as VM1/VM2 communication): don't do it. It's a pain, and the workarounds are complex, nasty kludges.
So my recommendation would be to upgrade the code for your slideshow to AS3, and then reuse that with your new site. Or just author the whole thing in AS2. Just because there's a new version of the language, you don't have to use it becuase it's 'the latest thing', unless you need some very specific AS3-only functionality. Unless you have the luxury of using this project to advance your personal learning curve, then by all means, AS3 is the way to go.
Thanks to both for the excellent advice.