I think there is a lot of truth in this
ncannasse.fr/blog/the_failure_of_as3
JLM 2009.08.08, 05:21AM —
I still like AS1, but really like haXe as well, maybe you would you like haxe more than AS3?
Storm 2009.08.19, 06:30PM —
so, my latest project.....
* rant alert!! *
I have written custom Events for all actions now to bubble up to the Controller. (LOOK AT ME ALL OOPING AND SHIT!!)
BUT the Events that my Controller listens to still shows the event:Event as event:MouseEvent. OMG! A custom Event dispatched is still a MouseEvent? I dont' get it.
yeah not even bothering to post code...it's a rant.
DontBogartMe 2009.08.20, 06:51AM —
Originally posted by: Storm
BUT the Events that my Controller listens to still shows the event:Event as event:MouseEvent. OMG! A custom Event dispatched is still a MouseEvent? I dont' get it.
that's cos you haven't coded it right
Storm 2009.08.20, 02:10PM —
Thank you Mr Obvious 2009.
Adobe's documentation sucks so a little guidance on getting it to work (custom event bubbling) would be nice and the lack of good learning documentation would be nice in Flash itself to figure it out.
Storm 2009.08.20, 05:46PM —
ok honest question this time......someone please explain clearly why....
I have a class that extends MovieClip. It is a MovieClip and the class declares it as such. My assumption is it brings in all methods and properties of a MovieClip object. My further assumption is that parent is a property available to MovieClip once it is added as a Display Object.
Why does that MC have no access to the Display Object's property of parent.
eg. written right in the class
this.parent.textbox.text = "Hello."
but
MovieClip(parent).textbox.text = "Hello."
works.
Why is there recasting needed? And why is parent now available in a recasting if it isn't a property of MovieClip but of DisplayObject?
DontBogartMe 2009.08.21, 06:59AM —
have you tried tracing out what the parent actually is? e.g.
trace("parent = " + parent);
Note also that MovieClip(parent) is casting the parent, not your class, so perhaps the parent you add your class to isn't a MovieClip?
TBH I don't get it either though. Try that trace, see what it churns out.
DontBogartMe 2009.08.21, 09:07AM —
I'm thinking Storm that the problem is that
this.parent
returns a DisplayObjectContainer, not a MovieClip.
And you then try to refer to a textfield you have on the stage called textbox:
this.parent.textbox
It seems that with MovieClips you can refer to on stage items in that way, but with DisplayObjectContainers you can't. This is why you needed to cast the parent to a MovieClip, and that's why
MovieClip(parent).textbox ...
works.
Does that make any sense to you?
DontBogartMe 2009.08.21, 09:10AM —
and in this case, the keyword "this" is a bit of a red herring, your code would work fine without it. e.g.
this.parent
works the same as
parent
Storm 2009.10.28, 04:41PM —
Getting back to the subject.....
No matter where I go on the web, I continually get ActionScript errors because of the debug player of Flash being on this machine....with the worst being from Adobe themselves on the Adobe TV site. Pop up after pop up of runtime errors.
My assumption is that NO site should gave errors showing up at all especially an Adobe site but it's almost like what I said is completely true. They altered ActionScript to be more like other programming languages which were full of hacks and cracks to make things work but never really accomplished the goal of being a complete language able to do everything. While AS2 needed improvements and was not an eloquent language, you were very able to control a lot of what was going on by having a solid foundation of how the timeline triggered things and the ability of any MC on stage to talk to and control functions in any MC on stage at that time. Now, it seems like more and more apps have issues just like normal programs.
tv.adobe.com/watch/flash-downunder/designing-an-air-application/
TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::SecurityErrorEvent@130fcee9 to flash.events.IOErrorEvent.
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/redirectEvent()
I get this shit multiple times per day and on so many different sites.
persist 2009.11.02, 04:50PM —
You're running the sdk player, which is going to highlight concerns as well as actual errors. Most of those errors are going to be silent to the user who has the release player.
So in fact while AS 3 enforces strict compile time typing, coercion and dynamic typing isn't exactly disallowed, it is tolerated. Most of those errors that I see are domain sandbox warnings, and don't even qualify as an error, and are simply a warning for the developer.
Run firefox for a little while during the day, then press ctrl-shift-j and select all. Watch how many BS errors it has thrown over the course of the day.
I don't blame the language in either case, I blame the verboseness of debuggers flagging infractions and no way for a developer to set a hierarchical level of error threshold to throw.
Errors arent the end of the world. IN fact they can be a great indicator of the flexibility and tolerance built into the runtime/vm. errors != bugs
Storm 2009.11.02, 05:01PM —
I blame a lot of things and I know the majority of users never see that. Not my point. My point is in the failure of Adobe in converting the one application that worked for design and development by trying to convert it to purely development without providing proper options into a proper IDE that coordinates with that language is where I place the blame. They need to do better before Flash becomes a serious tool again.
persist 2009.11.02, 05:33PM —
I disagree. While Flex/As 3 raised the bar for scripted and custom, dynamic, and responsive UIs, the Flash IDE is simpler than ever with CS 4, aligning with design tools such as photoshop, after effects, and illustrator.
The CS4 IDE has no problem compiling 4 different AS versions, with complete documentation, code hinting and behaviors. Motion presets, and the return of the commons library makes putting together simple UIs a snap. And even then if you need/want your As 2 or As 1 back, that can be done, and behaviors are even still there. You want to develop for flash 4? That's still there. Tell me any other IDE, runtime and language that has full support for legacy.
What I see as the frustration is designers now having to compete with pure AS 3 AND Haxe developers. It feels like the IDE has shifted to development because there's a lot of "wow" coming out of that space right now, and designers no longer own this niche of web development.
Any self respecting programmer is going to weigh project requirements when choosing haxe or AS 3. JS, or legacy AS. In the case of a bank client I chose NOT to use haxe because the source files needed to be archived and the greatest pool of available developers to modify the code needed to be retained. Selecting an esoteric, snobby language isn't going to help anything. It's like building a server solution in erlang when the staff is certified java devs.
Use whats best for the client. There's BS in any solution.
Storm 2009.11.02, 06:19PM —
fine I'll submit to your knowledge and shiny good looks on this as I am unfortunately still on CS3. I reserve my next disagreement when I can have a chance to rescind or confirm issues in CS4. But I will agree that that we designers are reluctant to share.
persist 2009.11.02, 06:27PM —
I see your objection to my slighting designers a bit. I deserve that.
Regardless of the state of AS, Flash has remained a fun platform for the dedicated.
Storm 2009.11.02, 06:31PM —
I feel like I'm in love with a crack whore. 
[edit] honest question though...
have you never seen an AS Tween just stop in the middle of a tween even though there are no other events happening at the same time?
have you never seen anything weird and unpredictable with AS3?
there's just a lot of things that leave me saying WTF??? to myself whereas I never had anything unpredictable in AS1 or AS2. If shit broke you knew you screwed up.
DontBogartMe 2009.11.06, 09:05AM —
Originally posted by: Storm
I feel like I'm in love with a crack whore.
[edit] honest question though...
have you never seen an AS Tween just stop in the middle of a tween even though there are no other events happening at the same time?
have you never seen anything weird and unpredictable with AS3?
there's just a lot of things that leave me saying WTF??? to myself whereas I never had anything unpredictable in AS1 or AS2. If shit broke you knew you screwed up.
haha @ the crack whore

99 times out of a 100 (or more) that I've been saying "this is a Flash bug, this is a Flash bug" it eventually turned out that I'd fucked up.
I would say that you had more exp with AS1 and AS2 so knew better what to look out for, but AS3 is still new and you're not so comfortable with it, so you feel that it's more quirky and unpredictable.
I've seen plenty of Tweens just stop like you describe - the fix was to store the tweens in a class variable rather than a local variable - if you just make it a local var then it gets garbage collected at the end of the method (or whenever the garbage collector feels like it) and your tween stops.
I guess they've tightened up the nuts between AS2 and AS3 and in doing so made a lot of things you used to get away with fail. You could think of AS1/AS2 like quirks mode in HTML, when you start using the Strict doctype all your old hacks (although you likely didn't know they were hacks) suddenly stop working.
Yeah, this quirk with the Tweens was annoying and very confusing, and could have been documented better. But who the hell reads the manual anyway?
Storm 2009.11.18, 07:45PM —
ok so I've since put the tween in the class.
First of all, I've stated before Flash used to be democratic. Now it's segregated totalitarian. I liked that MCs could talk to each other at anytime and that a tween worked consistently because local variable tweens were JUST AS IMPORTANT as class variable tweens. There is no justifiable reason why a tween in a class is garbage collected any differently than a local variable tween.
I actually read the manual. It's how I learn and how I've always learned. I learned Flash 2 the day it was released to write curriculum for it. The documentation now gives me a headache and leaves me queasy like I just banged the dirtiest hooker on the street immediately after everyone on my baseball team just banged her. argh...
ok, so back to the point....the tween is in a class. Elastic, while imported, no longer works on the tween and it goes backwards. Instead of going from -200 to 0. It goes from 0 to 200. But it's the same fl.transitions.Tween class. Someone please explain how I fix that or where I could possibly going wrong using the same class on the timeline versus using it in a class.
var animInTween:Tween = new Tween(this, "y", Elastic.easeOut, -200, 0, 3, true);
And, I'll say it one more time just to maybe get some answers. I am on CS3 and I have NEVER had a working debugger. EVER. I have never been able to look at any variables in the AS3 debugger in CS3. Is there something blocking the debugging because of how the IT geniuses at H**** installed my CS3? I have never had a debugger since my move to AS3 which limits my learning because I'm a visual learner and not a CompSci geek. I'm still a designer.
JLM 2009.11.18, 10:28PM —
Storm
I think most devs are using blog.greensock.com/tweenlite/ in AS3, and feffects in haXe, so maybe its just a matter of using better tools, come and try haxe? I found out its not just me that hates CS4 IDE, I am hoping they get CS5 right... my advice is stick with CS3 for graphics and switch to haXe for code, and the difference between haXe and AS3 is not so big so persists argument above seem unvalid, I brought someone up to speed on haXe in no time, and chances are the same code will compile in latest haXe compiler in 5 yrs time I doubt that will be true of any as3 you use now.
As for debug 'try' is your friend.
I am actually wondering if a better IDE could be created, its very heavy and areas like fonts are still a mess.
Cheers ;j
