[swfmill] declaring moredimensional arrays?

Timo Dinkler tdinkler at meuter.de
Tue Jul 25 04:54:22 EDT 2006


hey dan,

i found no way to work it out. i tried it as i think you described it:

<?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/>
		<PushData>
			<items>
				<StackString value="arrayData2"/>
				<StackString value="4"/>
				<StackString value="3"/>
				<StackString value="2"/>
				<StackString value="1"/>
				<StackInteger value="4"/>
			</items>
		</PushData>
		<DeclareArray/>
		<SetVariable/>
			
		<EndAction/>
	</actions>
</DoAction>

</movie>


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