View Full Version : Dynamically compositing a movieclip
ls_ac
December 26th, 2009, 10:44 PM
I want to dynamically create a movieclip and draw a different image (via the mc.graphics functions) onto each of three frames. Eg: I want to draw a red square in frame one, a blue circle in frame two, and a green line in frame three.
I can do the drawing just fine, but how to get it into a specific frame, I just don't know. Any ideas?
Toiletfreak
December 27th, 2009, 09:17 AM
I want to dynamically create a movieclip and draw a different image (via the mc.graphics functions) onto each of three frames. Eg: I want to draw a red square in frame one, a blue circle in frame two, and a green line in frame three.
I can do the drawing just fine, but how to get it into a specific frame, I just don't know. Any ideas?
Hi,
I suggest you extend the MC class, create a custom class, then add / remove the objects from the display list. Though it would be easier to clear and draw each time you need it...
Rgds,
Joel Tong
ls_ac
December 27th, 2009, 09:13 PM
Yeah, I thought about doing that as well, but due to other circumstances that's not an option. I'm pretty sure what I'm asking is impossible, so lets just forget I asked. :) I'll find another way to hack around it.
Cheers.
creatify
December 28th, 2009, 01:18 PM
If you don't want to draw/redraw, I'd dynamically create a movieclip, then dynamically create three sprites, give them names, and add them to the movieclip. Then, draw your three items to the three sprites, and set them as invisible. Instead of advance frames, simply toggle the visibility of the sprite that needs to be visible.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.