A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: rotation of swf-movie- howto??

  1. #1
    Member
    Join Date
    Jan 2001
    Posts
    59

    Thumbs down

    Hi,

    perhaps a stupid question:

    I import a swf-object in my movie. this swf-object should be rotated by a special amount (e.g 120 degrees) when the user presses a button. I think with Actionscript this should be possible, but I cant get in working

    Any tip or hint would be appreciated

    Thank you

    Gorky

  2. #2
    Flash Droid
    Join Date
    Jan 2002
    Location
    Birmingham, England.
    Posts
    180
    Make sure your swf object is a movie with an instance name, then place some code on the button that is similar to this;

    on(press){
    _root.instancename._rotation=120;
    }

    This should work ok any probs let me know. Peace

  3. #3
    Member
    Join Date
    Jan 2001
    Posts
    59

    Thumbs down

    Originally posted by rtwodtwo
    Make sure your swf object is a movie with an instance name, then place some code on the button that is similar to this;

    on(press){
    _root.instancename._rotation=120;
    }

    This should work ok any probs let me know. Peace
    Hello rtwodtwo!

    I used the menu File --> Import flash Movie as Object

    How can I give an instancenamte to this swf-object??

    Thanks

    Gorky

  4. #4
    Senior Member
    Join Date
    Sep 2001
    Location
    Australia
    Posts
    379
    Also, in Version 2.8 the rotation point is at top left, so you will have to position the content with care.

    If you can wait, Version 3 is a LOT easier. You will be able to rotate from anywhere within a MovieClip.

    Regards

    Hilary

    --

  5. #5
    Member
    Join Date
    Jan 2001
    Posts
    59
    (B]
    How can I give an instancenamte to this swf-object??
    [/B]
    Okay,

    with list shapes I can give instance names to swf-objects (I found this in an article by johnie, thanks johnie!

    but the AS-code still as posted by rtwodtwo doesn´t work

    Gorky

  6. #6
    Senior Member
    Join Date
    Sep 2001
    Location
    Australia
    Posts
    379
    Ok, here's an example with download .fun files:

    http://www.bridel.org/koolmoves/help.../rotation.html

    Send me your file if you still have problems.

    Regards

    Hilary
    [email protected]

  7. #7
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    It's probably something to do with how you are referencing the instance. I hardly ever use _root anymore unless I really mean root but rather use the realtive terms this and parent in targeting the instance.


Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center