Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

movie clip on display

Status
Not open for further replies.

dak1n6

Programmer
Aug 15, 2007
1
Hello,

Flash semi-newbie here. I am working with macc's pageflip v2, and I want code to randomly swap images in a movieclip (one of the pages).

Can anyone help me figure out how to add/remove symbols from a movieclip via actionscript. How can I attach/remove symbols to "page5". I guess I'm trying to do something like this from scene1:

page5.attachMovie(used1, "rnd2", usedDepths++);
page5.rnd2._x = 70;
page5.rnd2._y = -130;

my first approach was to use some on(load) code in the page5 clip, but no dice. Suggestions?

 
[tt]attachMovie()[/tt] is the way to add a MovieClip Symbol in the Library to a MovieClip on Stage. To remove it, you can use [tt]removeMovieClip()[/tt] or [tt]unloadMovie()[/tt], but if you want to replace it with another MovieClip, do [tt]attachMovie()[/tt] again to the same depth. There's no need to remove it before attaching the new one.

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top