[swfmill] Help grokking SWFML basic (newbie)
Daniel Fischer
dan at f3c.com
Mon Jun 25 11:05:17 EDT 2007
Emmet,
sorry for the long delay. Maybe i can still shed some light:
Emmet Caulfield <emmet-osflash at caulfield.info>, on Wed, 20 Jun 2007 23:25:12 -0400:
> Now, the way it appears (to me) to work is this:
>
> * There is one cumulative invisible stack from which things are
> added and removed for each slide. From reading online stuff, it
> appears to be called the "stage".
right.
> * The Define{Shape3,Text,Bits{JPEG3,Lossless2}} elements are
> declarations that define individual components of each slide, such
> as a run of text or a picture, and associate an objectID with it.
also correct.
> * PlaceObject2 places an object, identified by objectID, on the
> stage.
again.
> * RemoveObject2 removes an object, identified by objectID, from the
> stage (presumably placed there before the last <ShowFrame/>)
also right. I've noticed some strange behaviours with RemoveObject2, but cannot currently recall what exactly...
> * Each <ShowFrame/> element renders the current contents of the
> stage for viewing (opening the curtains, perhaps?)
still right.
> I surmised that I should be able to re-order the elements to put all
> the Define* elements at the beginning, then have only <PlaceObject2/>
> and <RemoveObject2/> elements between the <ShowFrame/>s. I implemented
> a simple XSL-T to do this, generated the SWF, and it works as
> expected.
>
> In any case, it appears that each slide is not an "addressable" object
> in its own right that can be shown or hidden (under ActionScript
> control?).
You're completely on the right track in understanding SWF :)
> Is there some way that I can put the blocks (currently between
> <ShowFrame/>s) of <PlaceObject2/> and <RemoveObject2/> tags inside
> some other element to make them identifiable in whatever sense I need
> them to be to show/hide them via ActionScript?
Yes, you can wrap them in a new Sprite, i.e. create a new DefineSprite in which you place all the PlaceObject2's. You can then place (and use from script) this new sprite and regard it as "a slide".
> Alternatively, could I achieve the same thing, but eliminate the
> <RemoveObject2/> tags and, instead, put in whatever sequence of
> <PlaceObject2/>s would constitute the background (not sure how I would
> identify them yet, but that's a different problem) after clearing the
> stage in some way? Is there a stage-clearing command that would help?
I think you could PlaceObject2 a new object at the same ID as, say, an older slide and it should get replaced. there is some "replace" attribute on PlaceObject2 which you might have to use.
> There is an <UnknownTag id="0x309"/>. Is this going to bite me?
probably not :)
> Finally, am I barking up the wrong tree altogether?
nup, as far as i can see your guessing is correct. My knowledge of SWF is also mostly based on guessing, though.
hth,
-dan
More information about the swfmill
mailing list