Jump to content


"Actions - Buttons" Menu


  • You cannot reply to this topic
4 replies to this topic

#1 Andie

    Young Padawan

  • Members
  • Pip
  • 9 posts

Posted 12 June 2007 - 09:31 AM

If I'm not mistaken. When you insert a actions to a object, like a button, you use the "Actions - Buttons" menu. When I learned how to do this, the menu was simplified. For some reason, that simplified version doesn't show up in my menu. Does anyone know how to open those scroll down menus? Is it my flash version?

Or i really forgot how to make a button. :huh: (what i just need to do is make a button that goes to the next scene when pressed)
I've been reading the codes from the search but they are either hell complicated or....I get an error in flash. Its just odd because I've done something like this before. I don't know if I've forgotten it or there is something else wrong.

(I am just thanking god that the project is to be passed next week :D )

#2 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 12 June 2007 - 12:37 PM

First thing -- scenes in Flash are buggy, so don't use them. Second, it's better practice to use movie clips rather than buttons. Buttons do alot of things that are considered "bad", and movie clips give you far more control over animations and whatnot.

Just make a movie clip and inside it make a new layer, and on the first frame put:

this.onRelease = function(){
// put code here to play next scene or whatever.
}
For more info on the button code, there is a tutorial on my website, or you could search the P2L database for movie clip buttons.

Rather than using scenes, just put a stop action at the end of your first section, and then put your second part (what would be in the next scene) after it and give it a frame label. Have you button gotoAndPlay that label. Works much better than scenes.

#3 Andie

    Young Padawan

  • Members
  • Pip
  • 9 posts

Posted 14 June 2007 - 10:04 AM

Thanks very much for the tip. I am already succeeded in creating a movie clip button. There is just one thing. When I use the onRelease, then press the button...nothing happens. I labeled the frame intro..so my code was something like..

this.onRelease=function()
{
this.gotoAndPlay("intro");
}

The page just stays blank...if I move the cursor, the button appears again.

(really sorry if I'm beginning to bother you)

#4 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 14 June 2007 - 11:06 AM

if you are using this.gotoAndPlay, the 'this' refers to the timeline the code is on...being the button. You may need this._parent to refer to the timeline that the button (or this) is on.

#5 Andie

    Young Padawan

  • Members
  • Pip
  • 9 posts

Posted 15 June 2007 - 10:22 PM

Oh . Lets me just adjust the codes...........
:D It's working!!!!!!! Thanks a bunch!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users