|
|||
|
I use this code to open a form
Code:
bp = new Form; bp.movie = getMovies()[1]; bp.showCaption = true; bp.canDrag = true; bp.caption = "Array Window"; bp.show(false) or is there another way of opening the extra swf as a window, without building it as a separate executable?
__________________
Awaiting Swf Kit V3 |
|
|||
|
There is no putArray method for forms. But it's very easy to make one:
Code:
function myPutArray(form, fsArray, asArrayName)
{
for (var i = 0; i < fsArray.length; i++)
{
form.setVariable(asArrayName + "." + i, fsArray[i]);
}
}
|
|
|||
|
ok, I understand how that part works
however: in AS Code:
var simpleVar:Array = Array();
fscommand("FFish_Run", "MakeArray");
function updateArray() {
fscommand("FFish_Trace", simpleVar.length);
for (i=0; i<simpleVar.length; i++) {
fscommand("FFish_Trace", "Array: "+simpleVar[i]);
}
}
Code:
simpleArray = []
for (var i=1;i<15;i++){
simpleArray.push(i);
}
function myPutArray(form, fsArray, asArrayName)
{
for (var i = 0; i < fsArray.length; i++)
{
form.setVariable(asArrayName + "." + i, fsArray[i]);
}
}
myPutArray(bp ,simpleArray, "simpleVar");
bp.setVariable("test_trigger.fArg","")
"test_trigger.fArg" launches the AS function "updateArray"
__________________
Awaiting Swf Kit V3 |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|