dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: CS4 mouse event animation

  1. #1
    Member
    Join Date
    Jan 2005
    Location
    UK
    Posts
    32

    CS4 mouse event animation

    Hi guys!

    I need some help creating a simple animation please. I need a letter to move slightly in one direction when the mouse hovers over it, and then move back to its original position once the mouse leaves the letter.

    I've tried it a number of different ways up till now and am resorting to ask for your help!

    Thanks,

    -db-

  2. #2
    Custard Topping
    Join Date
    Jan 2010
    Posts
    20
    Okay. This should work. Place this in the movie clip that the mouse hovers over.
    on(rollOver){
    _x += 5;
    }
    Oh wait. You want it to move back right?

    Ok. Place this as the actionscript for the letter movieclip
    on(rollOver){
    _x += 5;
    _y += 5;
    }
    on(rollOut){
    _x -= 5;
    _y -= 5;
    }

  3. #3
    Member
    Join Date
    Jan 2005
    Location
    UK
    Posts
    32
    Thanks for your help! But it didn't work

    When i compile the actionscript it says,

    "Mouse events are permitted only for button instances"

    And when i turn it into a button, i can't add actionscript to it cause it says...

    "Current selection cannot have actions applied to it"

  4. #4
    Custard Topping
    Join Date
    Jan 2010
    Posts
    20
    http://www.freemmorpgmaker.com/files...ef85bfe334.fla
    Try this. Though it is in Flash 8.

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