Thursday, December 24, 2009

How do you load a movie clip object with Actionscript?

I have a flash thingy I'm working on (lol) and I need to load a couple of movie clips that are essentially flash buttons, using flashscript and place the objects somewhere on the stage. The movie clips/buttons are already classified in my library. So essentially, I want to create an object of button and put it on my stage.





Actionscript 2.0 would be best but if you have a 3.0 that's fine too.How do you load a movie clip object with Actionscript?
its actually not ok to have 3.0 if your in a 2.0 project big mistake..





step 1. go to your library and right clikc on your object.. edit it and select advance then check the export for actionscript 2.0 box





step 2. add the code...


something like if you want to add the clip to a previous cliip





clip1.loadClip(';clip2';, container);


or... (i havent tried this so it might not work)


_root.loadClip(';clip2';, container);





you might also want to try (depending on what your doing


clip1.loadClip(';clip2';);


or


clip1.loadClip(clip2);

No comments:

Post a Comment