The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.34 / 5.00 31,296 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.07 / 5.00 10,082 ViewsHere is where I demonstrate my lame AS skills. Trying to make a lame play button, but new As3 pwned me.
BEfore, oh Holy AS2, I could just select my button, F9, and just go on(release)... and so on.
But now I don't know how the f*ck tomake a SIMPLE PLAY BUTTON!!!!
help, please.
Thanks.
Ich bin Mr. Reevers!
I OWN you all. Period.
At 11/18/08 08:17 PM, Reeoz wrote: Here is where I demonstrate my lame AS skills. Trying to make a lame play button, but new As3 pwned me.
BEfore, oh Holy AS2, I could just select my button, F9, and just go on(release)... and so on.
But now I don't know how the f*ck tomake a SIMPLE PLAY BUTTON!!!!
help, please.
Thanks.
Only god can help you now. Sorry, I don't have AS3 so I wouldn't know. I just had to post the first part for the lols.
At 11/18/08 08:22 PM, 14hourlunchbreak wrote:
Only god can help you now. Sorry, I don't have AS3 so I wouldn't know. I just had to post the first part for the lols.
thanks a lot.
Ich bin Mr. Reevers!
I OWN you all. Period.
button_btn.addEventListener(MouseEvent.CLICK,go_funct)
function go_funct (type:MouseEvent){
// gotoAndPlay or whatever
} At 11/18/08 08:24 PM, Reeoz wrote:At 11/18/08 08:22 PM, 14hourlunchbreak wrote:Only god can help you now. Sorry, I don't have AS3 so I wouldn't know. I just had to post the first part for the lols.thanks a lot.
You're welcome. Anytime you need help with AS2 just call. Oh wait......
At 11/18/08 08:25 PM, sasuke2910 wrote: button_btn.addEventListener(MouseEvent.C LICK,go_funct)
function go_funct (type:MouseEvent){
// gotoAndPlay or whatever
}
ok, thanks a lot, but can someone explain to me what is happening there so i don't have to come here again asking for help in a Pause button?
Ich bin Mr. Reevers!
I OWN you all. Period.
[Play Button Instance].addEventListener(MouseEvent.MOUSE_DOWN, playFunction);
function playFunction(playEvent:MouseEvent):void {
_root.play();
}
This was the more proper way of creating buttons in AS2, using listeners. Had you taken the time to do it right back then, you wouldn't be in this situation now ey? ;)
Ich bin Mr. Reevers!
I OWN you all. Period.
There's an option in CS3 to use AS2, just like you could use AS1 in Flash 8.
"Whoever said 'winners never quit' obviously never considered addicts." - Hoeloe
Button.addEventListener(MouseEvent.MOUSE _DOWN, playFunction);
Button is the instance name of the button. addEventListner() creates an event listener to listen for the parameters within it's parenthesis. MouseEvent.MOUSE_DOWN is a type of mouse event (when the mouse is pressed, MOUSE_UP for when it's release). playFunction is the function to be called when the event the listener is listening for happens.
function playFunction(playEvent:MouseEvent):void {
Creates an event handler reminiscent to the onClipEvent(enterFrame){} except it's different. The handler would the the function playFunction, and the event its handling is the playEvent of type MouseEvent and the return value is void (or no value is being returned).
_root.play();
Plays the root movie clip.
}
Ends the event handler. :P
Button is the instance name of the button. addEventListner() creates an event listener to listen for the parameters within it's parenthesis. MouseEvent.MOUSE_DOWN is a type of mouse event (when the mouse is pressed, MOUSE_UP for when it's release). playFunction is the function to be called when the event the listener is listening for happens.
Creates an event handler reminiscent to the onClipEvent(enterFrame){} except it's different. The handler would the the function playFunction, and the event its handling is the playEvent of type MouseEvent and the return value is void (or no value is being returned).
Thanks a lot. 10/10 for you. That's how it should be done. Just writing a bunch of code doesn't get you outta your doubts. Thanks again.
Ich bin Mr. Reevers!
I OWN you all. Period.
OH, By the way, _root doesn't work on AS3.
Any help?
Should I use stage?
Ich bin Mr. Reevers!
I OWN you all. Period.
At 12/4/08 07:51 AM, Reeoz wrote: OH, By the way, _root doesn't work on AS3.
Any help?
Should I use stage?
Any pram with a leading underscore is depleted. _root. doesn not work but root. works fine.
im also learning AS3, and I think I have found the alternative for _root.
MovieClip(insertinstancenameofmoviecliphere).dowhatever
and for refering back to the timeline from a movieclip:
MovieClip(root).dowhatever
and jeez, AS3 is hard. I only use it when I want to do 3D effects and IK (I have CS4), and only simple thing like tutorials and quizes, all I really know how to do is make buttons and refer to movieclips. gotoAndStop() and stop() actions are the same though. Im still gonna use AS2 for most stuff, even with CS4.
At 12/4/08 03:02 PM, andy70707 wrote: im also learning AS3, and I think I have found the alternative for _root.
MovieClip(root).dowhatever
Yeah. Don't do that.
and jeez, AS3 is hard. I only use it when I want to do 3D effects and IK (I have CS4), and only simple thing like tutorials and quizes, all I really know how to do is make buttons and refer to movieclips. gotoAndStop() and stop() actions are the same though. Im still gonna use AS2 for most stuff, even with CS4.
I don't see why you'd use AS3 instead of AS2 for basic UI interactivity. -_-
Dear retards (please disregard if you feel I'm addressing you but feel you cannot agree, no reason to waste one of your five brain cells on anger):
I understand it's possible for you specimens to not understand basic programming even after using Flash for years, but aside from that, don't spread your 'solutions' to other potential specimens.
I mean, you don't have a clue what you're doing; for you programming consists of mutating some code until it kind of works, and AS3 is 'hard' because it doesn't go together with retards typing random bullshit, neither can you copy code around out of context and end up with it working.
You never had the mental capacity to see that working out code as a logical structure might be beneficial somehow.
Knowing this, why the fuck do you people feel you have something to offer here?
Please don't accuse me of arrogance when you cannot get over the level of intellect of my early thirteenth.
The only thing I can suggest that could potentially help is take a few months to study Lisp - it is normally an incredibly simple language, but, you know, you guys don't understand programming and/or logic and/or common sense the least - and books such as the following and others you might find:
http://www.cs.cmu.edu/People/dst/LispBoo k/book.pdf
http://www.cs.umd.edu/~nau/cmsc421/lisp-
intro.pdf