Be a Supporter!

how do i put in a play button

  • 251 Views
  • 3 Replies
New Topic Respond to this Topic
Hoodie
Hoodie
  • Member since: Aug. 5, 2008
  • Offline.
Forum Stats
Member
Level 13
Gamer
how do i put in a play button 2009-03-30 22:56:12 Reply

ya i need the code,and what frame do i put it on?

The-One-Banana
The-One-Banana
  • Member since: Dec. 12, 2007
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to how do i put in a play button 2009-03-30 23:00:20 Reply

At 3/30/09 10:56 PM, K1LL80Y wrote: ya i need the code,and what frame do i put it on?

It depends. If you're working with a flash movie, the thing should already play.

The only way _root.play(); works effectively is on buttons, where the movie is stopped.

Simply make a button, place it on the correct slide, then add this code:

on(press){
_root.play();
}

"press" can be changed to rollOver (case sensitive, watch out...), release and so on... depending on your preference.

If you'd like to go to a specific slide and play, utlilize _root.gotoAndPlay(Frame Number);

For more info, check out the flash tutorial section. It helps a lot.


ambition and procrastination don't mix

KLoWnXXX
KLoWnXXX
  • Member since: Feb. 12, 2005
  • Offline.
Forum Stats
Member
Level 16
Blank Slate
Response to how do i put in a play button 2009-03-30 23:00:47 Reply

draw something, hilite it, press F8, name it, make it a button, click ok.
press F9, type in the action panel this code.

on(release){
play();
}

dont forget to stop the frame its on so the person has time to click the button

stop();

BBS Signature
acedareaper
acedareaper
  • Member since: Feb. 3, 2008
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to how do i put in a play button 2009-03-30 23:09:39 Reply

or if you need it to go to a certain frame you can put in this code

on (release) {
GotoAndPlay(frame number goes here);
}

or you could just download a preloader that works too unless you want to make your own button


my friends list
join this site trust me youll love it.
join the best steam server site out there -interhax - for all your gmod and game needs

BBS Signature