Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jan 2006
    Posts
    243
    Thanks
    14
    Thanked 2 Times in 2 Posts

    shape tween with AS motion?

    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?

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    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/ma...=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/ma...=00001531.html

    Another idea is that you can make your movieClips contain each of your shapes and tween them (in the timeline).
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #3
    Regular Coder
    Join Date
    Jan 2006
    Posts
    243
    Thanks
    14
    Thanked 2 Times in 2 Posts
    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?

  • #4
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    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?
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #5
    Regular Coder
    Join Date
    Jan 2006
    Posts
    243
    Thanks
    14
    Thanked 2 Times in 2 Posts
    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!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •