00:00
00:00
Newgrounds Background Image Theme

Our goal is for Newgrounds to be ad free for everyone! Become a Supporter today and help make this dream a reality!

AS2 Reference, Tips & Tricks

139 Views | 4 Replies
New Topic Respond to this Topic

A lot of people participating in the Flash Jam might be having trouble returning to AS2 from AS3, given the relative lack of documentation (and forgetting a lot of the AS1/2 pitfalls over time). As such, I think it'd be useful to list any tips and tricks you might've thought of while programming in AS2.


AS1 is also accepted because I imagine not too many people would've programmed in "proper" AS2, and instead resort to a hodgepodge of code on movieclips and timelines alike.


The AS2 Language Reference is available here. It's got examples of each function listed therein, which is a good place to start if you're having trouble recollecting what a function's supposed to do.


Slint approves of me! | "This is Newgrounds.com, not Disney.com" - WadeFulp

"Sit look rub panda" - Alan Davies

BBS Signature

Response to AS2 Reference, Tips & Tricks 2021-01-13 19:45:09


Here's a more or less complete tutorial on AS2 and Flash, courtesy @Denvish et al.


Slint approves of me! | "This is Newgrounds.com, not Disney.com" - WadeFulp

"Sit look rub panda" - Alan Davies

BBS Signature

Response to AS2 Reference, Tips & Tricks 2021-01-15 10:21:09


At 1/13/21 07:45 PM, Gimmick wrote: Here's a more or less complete tutorial on AS2 and Flash, courtesy @Denvish et al.


Very nice, the amount of tutorials that I have found via google that just redirect to dead pages is saddening.

Response to AS2 Reference, Tips & Tricks 2021-01-15 11:12:16


I decided to check out "Bad ideas" out of curiosity... @Fire includes instructions for how to make a forkbomb in Flash, lol.


At 12/5/05 04:00 PM, Fire wrote: getURL('www.example.com/flash/idiot.swf',b
lank /* I know it isnt right */);
The flash will open itself forever, causing the user to restart his/her browser.


Although it's pointless (since even before the Flash shutdown you needed to manually run SWF files in browser) this could still be improved upon. First, call getURL twice to get that sweet, sweet exponential growth. Then make it work for any website. I seem to remember @XGen putting anti-piracy measures on their games (such as Stick RPG) by detecting the current URL. So if you used a call to that function rather than a string, the forkbomb would work regardless of where it was hosted.


Why am I even suggesting this...


If I offer to help you in a post, PM me to get it. I often forget to revisit threads.

Want 180+ free PSP games? Try these links! - Flash - Homebrew (OFW)

Response to AS2 Reference, Tips & Tricks 2021-01-25 04:43:21


Don't forget about the old As Main thread:


https://www.newgrounds.com/bbs/topic/229808/49


Scroll down a little and there is tons of code examples.