Answer Posted / dindayal dhakar
AS2 uses a lot of attributes that start with an underscore
(._x, ._alpha, etc). In AS3 the underscores are removed
(ie. .x, .alpha), if you see underscores you're probably in
2.
Second, look for variable typing. It's not required in
either version but a lot more people type their variables
in AS3...if variables are being typed (ie. var a:Number =
5) you're probably in 3.
Lastly, look for function return types. The majority of
functions in either language will be returning void...in
AS2 look for a capitol V (function():Void{) and in AS3 that
got lowercased (function():void{).
Another difference is the fact that all events in AS3 are
called with addEventListener function, instead of using
the "onEventName" property of each object.
• To add event listeners in ActionScript 2.0, you use
addListener() in some cases and addEventListener() in
others, whereas in ActionScript 3.0 you use addEventListener
() in all cases.
• There is no event flow in ActionScript 2.0, which
means that the addListener() method can be called only on
the object that broadcasts the event, whereas in
ActionScript 3.0 the addEventListener() method can be
called on any object that is part of the event flow.
• In ActionScript 2.0, event listeners can be either
functions, methods, or objects, whereas in ActionScript
3.0, only functions or methods can be event listeners.
• The on(event) syntax is no longer supported in
ActionScript 3.0, so you cannot attach ActionScript event
code to a movie clip. You can only use addEventListener()
to add an event listener.
| Is This Answer Correct ? | 52 Yes | 7 No |
Post New Answer View All Answers
why script is client dependant.
how can i get two different fonts in a single line
Why we use Action Script(Multimedia Flash) rather than using other scripting languages (JAVA,VB...etc) ?
How can you convert QTP 8.2 scripts to QTP 9.2. Please give some inputs ASAP.
How do you insert record into scripting using siebel crm
Difference between the SAP MDM vs IBM MDM in approach, the tools used , ease in handling/implementing.
how do invoke OS task through ANT?
Need a batch file or VB script to delete old (more than 90datys) roaming profiles
how can we move to the next column in excel sheet in file operation using descriptive programming inQTP?
Hi Guys, I am very new to QTP tool , In real time environment how to test the application with this tool, 1. How to load application in QTP tool 2. How to write test script in QTP. 3. In manual testing we test login box (user id , password) how can we test this kind of testing with QTP tool with examples . Please guys put some focus on my questions , real time ecperienced answers would be appreciate, advance thanks ,please guys i am expecting ur answers as soon as posible
How applet differ from Swings in java ?
why do u need an ANT?
Would you tell me that what is test script? and how to write it? are there some templates?
I have deducted tds on pay slip for employees ist month tell me how to deposit this amt to govt. by bank or any form is available fill the same and deposit the govt. department. Pls explain me which form to be used for deposit the same with due date.
If we add regular expressions to a script recorded in QTP, will it effect the performance of the script?