A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Why does this get smaller???

  1. #1
    Junior Member
    Join Date
    Jan 2007
    Posts
    5

    Why does this get smaller???

    I used a tutorial to make a rotating menu, but I omitted the scaling effect it used. Yet somehow, despite there being almost no code, the menu is slowly getting smaller. I can't figure out what is going on!


    http://www.laura-anderton.com/files/timeline.swf


    http://www.laura-anderton.com/files/timeline.fla

    Thank you for any help!

  2. #2
    AKA [ Paul Bainbridge] webdreamer's Avatar
    Join Date
    Aug 2001
    Location
    Glasgow, Scotland, UK
    Posts
    3,320
    Flash 4! Really?
    Most likely cause of the shrinking( it's not shrinking!) is the due to the mc not sitting on absolute center. So it is moving off _x and _y.
    .: To me AS is like LEGO, Only for the big Kids :.
    - Site - Blog - Twitter - Linkedin
    bringmadeleinehome.com

  3. #3
    Member
    Join Date
    Dec 2009
    Location
    UK
    Posts
    35
    Dunno, seems to be shrinking in a pretty concentric way. Somewhere in the code there's something that's messing with the x/y scale or the width and height, simple as that but I can't open the file so I dunno

    Cheers,
    Rob

  4. #4
    Junior Member
    Join Date
    Jan 2007
    Posts
    5

    resolved

    Look at that, it was because it was publishing for Flash 4. I changed it to 8 and it was happy. Weird.

  5. #5
    Junior Member
    Join Date
    Jan 2007
    Posts
    5

    Question

    Okay, I lied, it was because it wasn't perfectly on center vertically - I just happened to move it a bit before publishing it again. I wouldn't make a very good diagnostician.

    Anyway, thank you for the help. Now I have another question - what code would I use to make it only rotate when the mouse was over the wheel?

    Thank you for any help. One day I need to learn Flash properly.

  6. #6
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    You can achieve that by checking if the mouse coordinates are touching the wheel. Change your code to this:

    Actionscript Code:
    if(_root.nav.hitTest(_root._xmouse, _root._ymouse, true)){
        xPos = getProperty("../dragControl", _y);
        xPos = xPos-(225);
        setProperty("../nav", _rotation, getProperty("../nav", _rotation)+(xPos/100));
    }
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  7. #7
    Junior Member
    Join Date
    Jan 2007
    Posts
    5
    Awesome! Thank so much.

    Okay, I'm going to really push my luck here and ask one more question. This one may not be possible without a lot of code, I don't know....

    Is there any way, once someone presses one of the dates, for the wheel to rotate so that date is at the center - so for instance, it currently starts with 1754 at the center, so if someone pressed 1916 the wheel would rotate down so that was in the center. I hope that makes sense. No idea if that's possible....

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