as2 vs as3

33
1 ® Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Condential. AS2 vs AS3 Yash Mody CTO | Tekno Point [email protected]

Upload: yash-mody

Post on 08-May-2015

2.043 views

Category:

Technology


3 download

DESCRIPTION

My presentation from the Flash CS4 launch in India.

TRANSCRIPT

Page 1: As2 vs as3

1

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

AS2 vs AS3

Yash ModyCTO | Tekno [email protected]

Page 2: As2 vs as3

2

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Overview

ActionScript 3.0 Overview

Top Misperceptions

Top Bene!ts

Migration Examples

Page 3: As2 vs as3

3

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Top 5 Misperceptionsabout ActionScript 3.0

Page 4: As2 vs as3

4

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Misperception #1

ActionScript 3.0 is difficult to learn

Page 5: As2 vs as3

5

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Misperception #2ActionScript 3.0 is only for Class based

object-oriented programming

Page 6: As2 vs as3

6

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Misperception #3Using ActionScript 3.0 reduces the

Flash Player base that you can target

Page 7: As2 vs as3

7

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Misperception #4You can’t write code on the timeline

with ActionScript 3.0

Page 8: As2 vs as3

8

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Misperception #5ActionScript 2.0 development is faster

that ActionScript 3.0 development

Page 9: As2 vs as3

9

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Top 5 Benefits ofActionScript 3.0

Page 10: As2 vs as3

10

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Benefit #1

Performance

Page 11: As2 vs as3

11

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Benefit #2Ability to leverage new Flash Player

APIs and technologies

Page 12: As2 vs as3

12

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Benefit #3

Leverage Community Libraries and APIs

Page 13: As2 vs as3

13

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Benefit #4

Easier and faster to debug code

Page 14: As2 vs as3

14

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Benefit #5Future proofed, multi-platform

development

Page 15: As2 vs as3

15

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

•Use of underscore•Void / void•Alpha value range• Event Model•Code and events on Symbols

ActionScript 3.0Gotchas

Page 16: As2 vs as3

16

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

underscores

ActionScript 2.0 ActionScript 3.0

Page 17: As2 vs as3

17

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

void

ActionScript 2.0 ActionScript 3.0

Page 18: As2 vs as3

18

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

alpha

ActionScript 2.0 ActionScript 3.0

0-100 0.0-1.0

Page 19: As2 vs as3

19

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Events

Page 20: As2 vs as3

20

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

no code on symbols

Page 21: As2 vs as3

21

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Migration Examples

Page 22: As2 vs as3

22

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Create a VariableCreate a FunctionCreate an if statement

Page 23: As2 vs as3

23

Page 24: As2 vs as3

24

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Loop Through anArray

Page 25: As2 vs as3

25

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

_root

Page 26: As2 vs as3

26

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Handling Button Clicks

Page 27: As2 vs as3

27

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Opening a URL

Page 28: As2 vs as3

28

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Dynamically Attach aMovieClip

Page 29: As2 vs as3

29

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Load an Image

Page 30: As2 vs as3

30

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Play a Sound

Page 31: As2 vs as3

31

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Load and Parse XML…the E4X way

Page 32: As2 vs as3

32

Some more stuff Runtime Exceptions - increase in conditions Sealed Classes - !xed set of values - better

maintainability

Method closures - Themx.utils.Delegate not required

Regular expressions - nativesupport for better string manipulation

Page 33: As2 vs as3

33

®

Copyright 2008 Adobe Systems Incorporated. All rights reserved. Adobe Con!dential.

Get onto AS3 today