I have a dynamic nr of balls on the screen (copies from a symbol in the library) which I want to change into squares, triangles etc (using shape-tween), but aparantly flash does not shape-tween symbols. How can I make this work?
Is it possible to move and scale a shape-tweened object using actionscript?
12-23-2008, 09:22 AM
Here is what I think you can do.
Your instances should be movieClips by the way.
First you will need to create the second object that you want the object to tween into. So if you have a circle to triangle, you need to create both. You could use the drawing class in Flash to do this on the fly if you wish. http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001531.html But I think you might have to scour the web for a class which can morph shapes as you said.
Then you just need to do tweens for the motions which can be done no problem. http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/js/html/wwhelp.htm?href=00001531.html
Another idea is that you can make your movieClips contain each of your shapes and tween them (in the timeline).
Well, that's the thing, I can't tween the motion because the motion needs to be interactive (as well as the rotation & scaling). That's for actionscript.
I was hoping I could just tween any of my library objects in their own timeline and then controll their shape using goToAndPlay(), but as I said flash refuses to shape-tween symbols; Once I set the tween to shape (motion tween works fine) I get this alert button in the properties panel, which when pressed says the following:
"Shape tweening will not ocur on layers containing symbols or grouped objects"
Problem is that as far as I know actionscript requires a symbol of some kind (MC, Button or Graphic). Because once I put any object into the library the "convert to symbol" dialog pops up. I can't give non-symbols a linkage ID for actionscript.
I'm not very familiar with classes but I know they add functionality, you think their is a class which allows shape tweening of symbols?
12-23-2008, 10:36 PM
You certainly can link a movieClip for export to AS, and a button and a graphic.
Shape tweens can only happen on a layer which has only one element. So, you can put a circle on Frame 1, and a triangle on Frame 20 and then put a Shape Tween in.
I think you misunderstood my last comment. I'm suggesting that you create a movieClip that only has the Shape Tweens added, and then you can add the Motion Tweens via actionscript. I guess I don't know enough about your concept to know if there is another way, so if this doesn't make sense can you explain better what your doing or have an example?
Ah, my bad, I was trying to tween the original circle MC to another graphic type.
Once I cleared both and had redrawn them both within the circle timeline it worked as expected.
Thanks for the help! :thumbsup: