Forum Topic: Guys I need help with AS3 buton pls

(70 views • 3 replies)

This topic is 1 page long.

<< < > >>
Crying

zZzUnwanteDzZz

Reply To Post Reply & Quote

Posted at: 7/1/09 03:43 AM

zZzUnwanteDzZz LIGHT LEVEL 03

Sign-Up: 09/07/08

Posts: 11

Hi again guys, well I'm really frustrated right now and would like your help please.

like last time my button won't navigate from my preloader scene to the next scene i don't know why

heres the actionscript:

stop();
button_btn.addEventListener(MouseEvent.M OUSE_DOWN,mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
gotoAndPlay("animation");
}

I made this in action script 3.0 the main problem is in the ---gotoAndPlay("animation");--- part

everytime I play it, a syntax correction comes up and says that I need to put a specific frame to be played in the scene everytime I do this --->gotoAndPlay("animation", 1)<--- which is the traditional way of actionscript navigation, it says syntax error, would anyone care to help me with my problem?

I really need help please anyone?

[url=http://fluidanims.com][img]htt p://filebox.me/files/535202_fa.png[
/img][/url]


None

UnknownFury

Reply To Post Reply & Quote

Posted at: 7/1/09 03:53 AM

UnknownFury EVIL LEVEL 26

Sign-Up: 08/10/05

Posts: 6,027

In AS3 it is gotoAndStop(1, "animation");. It used to be (scene, frame) or (frame). It's more logical now. If you just have ("animation") then it will treat it as a frame label, not a scene.

Portfolio(Under construction): UnknownFury.com |
Msn: giant_ak_47@msn.com | Contact: me@unknownfury.com
Follow me on twitter!


Resigned

crapatflash

Reply To Post Reply & Quote

Posted at: 7/1/09 08:20 AM

crapatflash LIGHT LEVEL 12

Sign-Up: 12/15/06

Posts: 734

Umm, your button won't work, because you only testing for when someone clicks the screen not when they click your button. instead of using MouseEvent.MOUSE_DOWN, use "click". that will make sure the actions only happen when your button is actually pressed.


None

zZzUnwanteDzZz

Reply To Post Reply & Quote

Posted at: 7/1/09 03:19 PM

zZzUnwanteDzZz LIGHT LEVEL 03

Sign-Up: 09/07/08

Posts: 11

UnknownFury and crapatflasy Thank you very much you've been a great help my button works now thanks so much much appreciated :D

[url=http://fluidanims.com][img]htt p://filebox.me/files/535202_fa.png[
/img][/url]


All times are Eastern Standard Time (GMT -5) | Current Time: 07:18 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!