Been using CS3 for a bit now, getting to grips with AS3, and what feels
like excessive handholding at first is now flowing naturally, and i feel
far less prone to silent failures than before. To me this is entirely
excellent, good show!
The IDE however, i am less impressed with, and i am hoping to be wrong
or ignorant so some of you can correct me in my ridiculous ways.
Overall, i feel as though AS3 integration in the Flash 9 IDE appears
tacked on, or retrofitted. Experimenting with AS3 early on in flex and
with apollo gave a far, far stronger impression of the strengths of the
language than how it appears when used in tandem with the IDE,
particularly in how AS3 handles sound and the library.
AS3's substitution of attachMovie for the movieclip constructor is,
while logical on the surface, somewhat baffling to me in practise. In
AS2, extending MovieClip required you to declare variables to gain
references to clips already instanced in the library movieclip. For
instance, extending a movieclip containing a textfield with instance
name "nameField" would require var nameField:TextField to gain control
of that field in the class. What this gives you on script level is an
overview of relevant movieclip members, as well as code completion. In
AS3, declaring variables to refer to hand placed movieclip members
throws an error:
1151: A conflict exists with definition x in namespace internal.
This effectively forces us to write notes about movieclip members in
comments or the like, and denies us code completion. I'm not sure how
i'd deal with this more effectively, but i do sorely miss being able to
do this in the old fashioned way. If there is a faster, more convenient
workflow, please inform me :)
Secondly, where the Timer class allows us a "safe" way to
programmatically trigger callbacks without the setInterval danger of
orphaned intervals, the new Sound/SoundChannel symbiose allows us to
freely orphan sounds, while forcing us to keep track of separate class
instances to have specific control of individual sounds, easily lost
should the reference to the relevant SoundChannel be overwritten.
The current sound toolkit appears eclectic, almost chaotic, and in my
opinion performs even worse than its previous incarnation
Sound: Loads and plays streamed audio, provides close() method to stop
streaming sound, dispatches events to keep track of load progress, takes
a soundtransform instance
SoundChannel: gives playback and level information and an event when
sound playback ends. Contains another method to stop sound, which
DOESN'T work for streamed sound, yet a SoundChannel instance is
nonetheless required to alter properties of streaming sound during playback.
SoundTransform: Encapsulates all pan and volume properties previously
associated with the Sound class.
SoundMixer: static class containing global methods and properties for
all sounds.
Out of these 4, the Sound/SoundChannel relationship with their dual stop
methods makes me wonder what the rationale behind it all really was. The
SoundChannel class in my opinion has no logical place in the hierarchy
given that it doesn't actually give us any real control of the channel
in question. Were we able to declare a SoundChannel and pass it Sounds
to play it'd be a different matter. In addition, the name SoundMixer is
a complete misnomer, as the class offers absolutely no channel-specific
controls, nor does it keep track of currently playing channels.
I applaud being able to source audio externally, but i'm bewildered by
the choices of terminology and the weird sound/channel symbiose. The
docs insist the API is powerful, but i don't see how it is, aside from
external sourcing of audio.
So overall, i enjoy AS3, but its integration with IDE workflow seems
unfinished and awkward.
Anyone want to correct me? Please? :)
--
mvh
Andreas Rønning
Senior Flash developer
-----------------------------
Rayon Visual Concepts
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com