AS3 vs AS2

Hi there
AS3 starts roaming around. I feel a little bit silly to continue with AS2 so I am thinking of switching. My question is: What, in AS2, are changed in AS3? Is there any change in syntax?

Thanks a lot

[FONT=Times New Roman]I have not yet upgraded from (Macromedia’s) Flash 8 to Adobe’s CS 3…[/FONT]

[FONT=Times New Roman]Mainly because it does not have a single feature that I’m impressed with. I guess there is good import features that’s about all I’ve seen. [/FONT]

[FONT=Times New Roman]Time has passed , AS3 has been out now for a while now. [/FONT]
[FONT=Times New Roman]Can anyone tell me what you can do in AS3 that you can not do in AS2? What are it’s selling points?[/FONT]
[FONT=Times New Roman]Is it true you can only code on frame one? - what’s that about[/FONT]
[FONT=Times New Roman]From what I’ve see you can do more with AS2 than you can with AS3, and a ton of less issues. True or false? I do not know.[/FONT]
[FONT=Times New Roman]How do you like AS 3? - and why?[/FONT]
[FONT=Times New Roman]Give me good reason to upgrade – in what it can do, that I can’t already do with AS2. I’m not interested in hearing “I’m learning it because that’s where flash is headed.” I need better reason than that. What can it do? And what can’t it do? It seems like there is a whole lot of this.[/FONT]

[FONT=Times New Roman]Is AS3 more restrictive? If so what’s the point of that? Why is functionality downplayed?[/FONT]
[FONT=Times New Roman]Still a lot of Bugs?[/FONT]

[FONT=Times New Roman]Thanks to any that replay. [/FONT]

[FONT=Times New Roman]PS: I don’t see a single thing on that list that i can’t do in AS2– if anything the list is comprised of restrictions. [/FONT]

[FONT=Times New Roman]Note: i’m not a fan of Flex or components - don’t like them. (i’ll give you reasons if you want) mainly that’s what scripting is for. I’d rather not have a heavy component, thank you. And i do like to venture out from frame 1 from time to time. [/FONT]

[FONT=Times New Roman]I wish Macromedia was back.[/FONT]

[LIST]
[]Video rendering/codecs are a HUGE plus.
[
] 3D API’s (that supports more than 10 polygons and is easy to use).
[] Way a way faster drawing API.
[
] You don’t have to pay for the Flash IDE (but you sound like your new to programming so you probably want your timeline).
[] Organization… having a fully OOP structure to work from helps a ton in long projects.
[
]People are treating it as a programming language and more sites are adopting it now as such, so were seeing more useful classes to make things even simpler.
[*]Flash Player 10 is really fun to play with all the new features.
[/LIST]
Trust me man the sooner you switch to AS3 the happier you will be in the end. Most of the members here have made the switch and I can say they are far happier for it.

Thanks for the responce.
Some good reasons -

But it seems that flash is still along way from a good 3d engine - flash paper is nothing to get excited about.

I think alot of people don’t understand the power of the timeline. Esp running many timelines that work with one another. It’s very powerful. think about it. to think of all things as moving is the future. I can put a timer on any code/language - multiple visual timelines is what makes flash powerfull. I hope you can understand that.

ps: i ment to say papervision. nothing to get excited about.

Name any other way i can code 100 timelines to do all differnt things and all work with one another in a matter of a few days. - that’s power.

Hi

A few things certainly usefull :

  • Events (inheritance from EventDispatcher class) : now, don’t need to create lots of listener objects, simply define a listener function which’ll be called.
  • Now, a new class came : Sprite. Basically, its the first graphical object level which has interaction events. Like MovieClip but without severals lots of functions and properties mostly not used. So finally very light. In the case of a 3D application with objects fully drawn with API, it will be really faster.
  • Library : linkage on bitmap symbols -> export dynamically bitmap from code without creating some of MovieClips.
  • Strict typing : really usefull for debugging, when wrong vars
  • OOP : overriding, final var, more similar to other OPP language like Java.
  • faster flash player virtual machine (the time when 10 movieclips were slowing the player has left)

I think your reaction is tycpically of someone who feels frustrated…like i as before ;p
Frustated from to learn all again…which took so long time.
After learning, i think you’ll be

ps : oops soory, didn’t noticed there was an answer!

“I think alot of people don’t understand the power of the timeline. Esp running many timelines that work with one another. It’s very powerful. think about it. to think of all things as moving is the future. I can put a timer on any code/language - multiple visual timelines is what makes flash powerfull. I hope you can understand that.”

Think of it this way. Using a timeline is allowing time itself to be a restriction on your application. When you ascend to the mentality that frames are not needed you are essentially becoming god, with the power to control the flow of time in whatever crazy way you desire. All moments of time can and sometimes do exist at one point, the now.

On a more serious note, it can be a difficult change in mentality to go from timeline to no timeline, but it is definitely worth it. And you can of course still work with timeline’s if you wish.

Coming from a programmers perspective AS3 is miles and miles ahead of AS2. While non-programmers or beginners may hate the strict typing, lack of _root and _global, etc; for everybody else it’s so much better there is just no comparison.

Strict typing saves your butt. Sure there are more errors reported, but that’s actually a GOOD thing. No longer will flash fail silently when calling a function whose name you spelled incorrectly. It’ll let you know when you are passing the wrong type of thing into a function, it makes working on projects with other people much easier and it allows Flash Player to run much faster.

AS3 uses a completely different Virtual Machine to run on. These “restrictions” as you put it, allow the Flash player to run code often more than 2x as fast.

Also, use Flash Develop. One look at the intellisense you can get and you will never want to use the Flash IDE again.

And to get all of this benefit you don’t even have to program using OOP if you don’t want to. Although I highly recommend learning it as it’s excellent. And all you guys who are getting 3x as much code in AS3 vs AS2 should probably take a look at your design, it shouldn’t be that big of a difference.

Of course AS3 isn’t perfect, it’s still missing some really useful features (function overloading!!!) but it’s a giant leap ahead of AS2.

tycpically of someone who feels frustrated…
." It might be that way with most, but i have not even tried it. Not even felt the need.

Events (inheritance from EventDispatcher class) : now, don’t need to create lots of listener objects, simply define a listener function which’ll be called.

  • can do that with a function in AS2

was just reading about the Library unsure - but I thinks it’s just the simple concept of “object referencing” - can do it in AS2. am i wrong? = just set it to a var.

OOP : - will look into …

Faster ? sounds great - is there proof in the pudding?

Strict typing - i do that on my own.

As for needing the timeline, no… you really don’t. You’ve got to think about this from a different perspective. Use objects and an event based model instead. Why restrict yourself to only running code on a per frame basis? You could be running code on all kinds of events (not just time-related ones). Each object can be handle all their own functionality (data encasuplation) and your document class can tie it all together.

You wouldn’t even need an FLA file.

Putting code on various frames of your main timeline and movieclip’s timelines makes your code look like spaghetti. Maybe you aren’t working with anybody who has to try and figure out your code, and you have no problem remembering where everything is, but come back in 6 months or a year and try to remember where all your code was hidden.

Classes make it simple and easy to organize your code. Other people can read it and use it easily.

Anyway, AS3 and OOP are very useful but if you don’t like them then don’t use them. If you’re frustrated then take a break and try again later. AS3 is worth learning.

**I want to thank you all for teh replies thus far. - all logical … **I’ll have to prove my theory on the power of timeline code. - will make it my next project – will keep you posted even if i’m wrong - or you can prove me wrong. As for working alone - you are correct … :slight_smile:

PS: the power is when there are massive amounts of timelines to work with that would be impossible any other way… - with out years of coding.

Developing in AS3 doesn’t stop you from putting code onto the timeline. I dunno who told you could only put code in the first frame but they are wrong. You can still put code onto whatever frame you want in the main timeline and in separate movieclip timelines.

You cannot however put code inside of components anymore.

I don’t use this method myself, as I think OOP is much better but AS3 doesn’t stop you from doing it.

So don’t let that stop you from learning AS3.

AS3 uses a completely different Virtual Machine to run on. These “restrictions” as you put it, allow the Flash player to run code often more than 2x as fast.

ahh… i see.

what’s up with " Iamthejuggler " – lol . I’m out gunned here.

^Yes you are… hehe.

@Gundark, Well said, I think he was getting a bit misguided in his research.

Just start learning and you will begin to love adobe and all the changes they have made. Plus they constantly add stuff that developers ask for in each CS release.

If you have any questions just ask all, the basic questions get answered very quickly around here.

Trust me man the sooner you switch to AS3 the happier you will be in the end.

I’m going to trust you templar… And i should not have downplayed your comments - any step foward with 3d is great. _

yea … you guys have alot of folk around here. :slight_smile:

all good posts … TY guys… will be back, can’t tell you have much i’ve learned from this site (over the years) - even though i never logged in…

i’ll choose to get on the buss instead of watch it go by. -better a bit late then never …

out…

[quote=blitzzz;2344402]ahh… i see.

what’s up with " Iamthejuggler " – lol . I’m out gunned here.[/quote]

Haha. I had just come out of a fairly intense meeting. My mind wasn’t quite working as it usually does! Feet are firmly back on terra firma now. Glad to hear you are gonna give AS3 a go. :slight_smile: