[swfmill] declaring moredimensional arrays?
daniel fischer
dan at f3c.com
Tue Jul 25 04:29:34 EDT 2006
Hey Timo,
> <?xml version="1.0" encoding="iso-8859-1" ?>
> <movie width="550" height="400" framerate="31">
>
> <DoAction>
> <actions>
> <PushData>
> <items>
> <StackString value="arrayData"/>
> <StackString value="four"/>
> <StackString value="three"/>
> <StackString value="two"/>
> <StackString value="one"/>
> <StackInteger value="4"/>
> </items>
> </PushData>
> <DeclareArray/>
> <SetVariable/>
> <EndAction/>
> </actions>
> </DoAction>
>
> </movie>
>
> and i got exactly something like with actionscript:
>
> arrayData = new Array("one", "two", "three", "four");
>
> how do i modify to get more dimensions? and what about the "<array
> name='arrayData'/>"-tag that i read about in an archived post?
> thanx alot!
uhm- i know nothing about <array> (i might have forgot, tho). a multidimensional array is just an array of arrays in flash, no? then you could get lucky if you <DeclareArray/> the first row, but then not <SetVariable/>, but leave it on the stack, declare the second (and further) rows (then you should have a bunch of (one-d) arrays on the stack), finally <DeclareArray/><SetVariable/> your new (top) array.
also, please post your results. i would think a few others could use this well, too.
-dan
--
http://0xDF.com/
http://iterative.org/
More information about the swfmill
mailing list