[swfmill] declaring moredimensional arrays?
Timo Dinkler
tdinkler at meuter.de
Tue Jul 25 05:04:43 EDT 2006
i tried it the other way:
i built a swf with the correct array in flash and used swf2xml. but i
don't understand the result. only so far that it has to do with the
<StackDictionaryLookup index="n"/>. maybe somebody can remove all
from the xml that's not necessary:
source-fla/swf:
test= [];
test[0]=[];
test[0][0]="teststring1";
test[0][1]="teststring2";
test[1][0]="teststring3";
test[1][1]="teststring4";
output xml:
<?xml version="1.0"?>
<swf version="8" compressed="1">
<Header framerate="12" frames="1">
<size>
<Rectangle left="0" right="11000" top="0" bottom="8000"/>
</size>
<tags>
<UnknownTag id="0x45">
<data>AAAAAA==</data>
</UnknownTag>
<SetBackgroundColor>
<color>
<Color red="255" green="255" blue="255"/>
</color>
</SetBackgroundColor>
<DoAction>
<actions>
<Dictionary>
<strings>
<String value="test"/>
<String value="teststring1"/>
<String value="teststring2"/>
<String value="teststring3"/>
<String value="teststring4"/>
</strings>
</Dictionary>
<PushData>
<items>
<StackDictionaryLookup index="0"/>
<StackDouble value="0.000000e+00"/>
</items>
</PushData>
<DeclareArray/>
<SetVariable/>
<PushData>
<items>
<StackDictionaryLookup index="0"/>
</items>
</PushData>
<GetVariable/>
<PushData>
<items>
<StackDouble value="0.000000e+00"/>
<StackDouble value="0.000000e+00"/>
</items>
</PushData>
<DeclareArray/>
<SetMember/>
<PushData>
<items>
<StackDictionaryLookup index="0"/>
</items>
</PushData>
<GetVariable/>
<PushData>
<items>
<StackDouble value="0.000000e+00"/>
</items>
</PushData>
<GetMember/>
<PushData>
<items>
<StackDouble value="0.000000e+00"/>
<StackDictionaryLookup index="1"/>
</items>
</PushData>
<SetMember/>
<PushData>
<items>
<StackDictionaryLookup index="0"/>
</items>
</PushData>
<GetVariable/>
<PushData>
<items>
<StackDouble value="0.000000e+00"/>
</items>
</PushData>
<GetMember/>
<PushData>
<items>
<StackInteger value="1"/>
<StackDictionaryLookup index="2"/>
</items>
</PushData>
<SetMember/>
<PushData>
<items>
<StackDictionaryLookup index="0"/>
</items>
</PushData>
<GetVariable/>
<PushData>
<items>
<StackInteger value="1"/>
</items>
</PushData>
<GetMember/>
<PushData>
<items>
<StackDouble value="0.000000e+00"/>
<StackDictionaryLookup index="3"/>
</items>
</PushData>
<SetMember/>
<PushData>
<items>
<StackDictionaryLookup index="0"/>
</items>
</PushData>
<GetVariable/>
<PushData>
<items>
<StackInteger value="1"/>
</items>
</PushData>
<GetMember/>
<PushData>
<items>
<StackInteger value="1"/>
<StackDictionaryLookup index="4"/>
</items>
</PushData>
<SetMember/>
<EndAction/>
</actions>
</DoAction>
<ShowFrame/>
<End/>
</tags>
</Header>
</swf>
Am 25.07.2006 um 10:29 schrieb daniel fischer:
>
> 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/
>
> _______________________________________________
> swfmill mailing list
> swfmill at osflash.org
> http://osflash.org/mailman/listinfo/swfmill_osflash.org
More information about the swfmill
mailing list