3 Replies - 614 Views - Last Post: 14 November 2008 - 02:44 PM

#1 Ribs  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 12-November 08

Button Problems

Posted 13 November 2008 - 05:02 PM

So basically,

I have a button im my flash. And when ever the cursor rolls over it, it is supposed to go to some place else in my flash.

But it doesn't :angry: ...

Here is the code I used:

on(rollOver){
gotoAndStop("menu", 1);
}



Any responses would be appreciated.

Is This A Good Question/Topic? 0
  • +

Replies To: Button Problems

#2 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1199
  • View blog
  • Posts: 7,309
  • Joined: 07-September 06

Re: Button Problems

Posted 13 November 2008 - 05:09 PM

Right now you are telling it to change to the scene "menu" and frame 1.

I am not sure what you meant by

Quote

go to some place else in my flash
but I think you are talking about moving the button at which point the script should be something like so:

on(rollOver){
  this._x += 20;
  this._y -= this._height/2;
}


That should move it.

If you are wanting the button to do something like have its rolled over self (or something of that sort) try something like so:
on(rollOver){
this.gotoAndStop(<FRAME_NAME_WITH_QUOTES_OR_FRAME_NUMBER>); // NOTE - the frame must be within the button, otherwise it won't work correctly
}


Hope that helps.
Was This Post Helpful? 0
  • +
  • -

#3 Ribs  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 12-November 08

Re: Button Problems

Posted 13 November 2008 - 05:27 PM

Sorry,
What I meant by "going some place else" was a different scene. Not moving the buttonto a different position on the stage.
Was This Post Helpful? 0
  • +
  • -

#4 CyanBlue  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 6
  • View blog
  • Posts: 156
  • Joined: 01-September 06

Re: Button Problems

Posted 14 November 2008 - 02:44 PM

You can add a frame label to the position where you want to go, and use gotoAndPlay() function with that frame label as BetaWar suggested...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1