ActionScript 2.0 or Actionscript 3.0?

Posted: August 7, 2008 in General
Tags: ,

Ok, now im really confused.  Actionscript 2.0 is what ive seen many people use today, and even many down loadable templates are in actionscript 2.0.  Why do I feel I need to jump to version 3.0.  Many of the commands are different, there is a lot of setting classes and other stuff which really pulls me the other way?.  but still inside something tells me go with actionscript 3?.  Let me give you and example,

Below we want to call a web page when a person presses a button,  Just like in VB you capture the ‘event’ that is the release event.

Actionscript 2.0

on (press) {
    gotoAndPlay("Menu_Scenes", 1);
}

Here is the same with, ActionScript 3.0

box.addEventListener(MouseEvent.CLICK,clickHandler);

function clickHandler(evt:Object):void {
       trace("You just clicked me!");
}

Lets say you want to send some data to a web page here is, Actionscript 2.0

string="http://192.168.0.101/finddata.aspx?set_config=wake_up_time&value="+chours+":"+minutes+":00 "+ampm;
loadVariablesNum(string, 0);

Actionscript 3.0

// ----------------------- LOAD STUFF INTO SYSTEM
import flash.events.Event;
import flash.net.*;

var myRequest:URLRequest = new URLRequest("http://mywebpage/out.php");
var myLoader:URLLoader = new URLLoader();
var myVariables:URLVariables = new URLVariables();

myVariables.wonder = "first";
myVariables.world = "second";
myRequest.method = URLRequestMethod.POST;
myRequest.data = myVariables;

Yes sure you got a bunch of other features but I still think its a bit overkill… o well I think I just answered my question.
For what i’m using now version 2.0 will do fine.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s