Robert and others,
There were many questions in Robert's email, I've tried to address each one of them.
Check below my signature and let me know if you have any questions.
Cheers,
Tom Higgins
Product Specialist - Director Team
Macromedia
+++++
> Interesting. I take it that this means you could put a stub
> swf with no content in your Director movies as a factory for
> spawning XML parser objects that work properly? This might
> be a good thing...
You could most certainly do that.
+++++
> In fact, do you even need an embedded Flash asset to access
> the Actionscript object library, or can you just drop them
> into your code wherever you want them, like script Xtras?
You do not need a sprite on stage as there are global Lingo commands available in
addition to sprite-based methods. But keep in mind that using the global methods has
the same memory impact as a single Flash sprite on stage would. When you issue the
global methods the Flash Asset Xtra essentially creates an invisible sprite/member
combination for you and uses that instance to contain _all_ globally created objects.
Therefore this single-sprite performance hit is the same if you use the global methods
to create one object or one hundred.
Here is what the code would look like to create objects using the sprite methods and
the global methods, notice how similar they are?
-- create a reference to the Math object
tMath = sprite(1).newObject("Math")
-- do it again but using the global method
tMath = newObject("Math")
The syntax is identical, just remove the sprite reference and it's a global method.
Therefore you can simply sprinkle in objects whenever needed in your movie without
worrying about carrying along some Flash sprite on stage.
+++++
> If so, how many other useful objects are there in Flash that
> are currently missing from Director, or not working, that
> this effectively fixes?
There are many objects from ActionScript that can now be created and referenced in
Lingo and I'm not sure about what exact "fixes" you're hoping to find. The easy way to
see the list of objects is this:
- Open Flash MX and the open the Reference window
- Look under Objects
- anything that uses the 'new' creator method can be used in Lingo
On top of those you can also create Camera, Microphone and Math object references.
These don't use the 'new' method as they are implicitly global, but we special-cased
them to be exposed.
+++++
> How does the performance compare to native Director objects, and
> are all the features generally compatible with Lingo (i.e., are
> there any datatype conversion issues, etc.)?
To be honest I don't have this kind of performance data handy. As far as data type
conversion issues and other similar troubles, yes there are some. Flash and Lingo have
some data types that are different and you must be carefull when setting property
values to recognize what values to use. For example I got bit in a case where I kept
trying to set a Flash variable to a Lingo point value (tMyFlashVar = point(x,y)),
ActionScript doesn't understand that data structure so I had to use two integer values
instead. Also there are gotchas that Lingo folks might stumble over, like the fact
that ActionScript zero-indexes arrays (their lists), and as such:
tFlashArray = newObject("Array","entry1","entry2")
put tFlashArray[0]
-- "entry1"
put tFlashArray[1]
-- "entry2"
and when using ActionScript objects you gotta use ActionScript syntax:
put tFlashArray.length
-- 2
So be prepared, if you're going to dabble in two languages be ready to know about both
of those languages.
+++++
> On a related topic, one of the biggest questions I want
> answered about the new tighter integration of Flash is
> whether we can now have as many Flash sprites on the stage
> as we want without instantly crippling performance.
Well, I never like phrases like "have as many Flash sprites on the stage as we want
without instantly crippling performance". You may want 15, but the next guy wants 50.
;) That aside, we did not change the fact that each Flash sprite gets its own instance
of the Flash Xtra and thus the memory and performance demands of multiple SWF sprites
is the same as in previous releases. We are most definitely looking into changing this
so that all Flash sprites play under one Xtra instance but that's a *significant*
change to the Xtra that we felt was far too much work to accomplish in this release
given everything else that is going on. We have a keen eye on this moving forward as
it would be a big boost for using multiple assets in a single movie.
+++++
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]