Groups | Blog | Home
all groups > macromedia mobile and devices flashlite > january 2005 >

macromedia mobile and devices flashlite : Flash LIte 1.0 Instance Call


mars_d
1/27/2005 12:23:27 PM
Hi,

I had been developing using Flash Lite 1.1 for quite some time, but for an
another live project, I need to work with the older version of FL

Everything so far seemed to be working fine until I came across a small but
significant problem. Accessing variables and other movieclips on the main
timeline from within the timeline of a particular MC does not seem to register.
Say for example I have a an MC named "control". I write a script in it's
timeline, to set the position of another set of MCs on the root (say a1, a2,
a3, a4, a5). The script would be -

scrollNum = 32;
for(x=1; x<=5; x++){
nm = "a" add x;
setProperty("/" add nm, _x, _x+scroll_num;
setProperty("/" add nm, _y, _y+10);
}

This works fine in the authoring environment, but when I test it on the i-mode
emulator, it does not set the properties as mentioned in the script. It does
not recognize "/" add nm in case of MCs or eval("/" add nm) in case of variable
values. Any suggestions on this??
CAD Monkey
1/27/2005 12:40:53 PM
Hi mars_d,
I have had this problem too, sometimes it seems some ways work for some
sections of code but not for others!, here are two other ways that work in 1.1
(not sure about i-mode sim tho).

scrollNum = 32;
for(x=1; x<=5; x++){
nm = "/a" add x;
setProperty(nm, _x, _x+scroll_num;
setProperty(nm, _y, _y+10);
}

or
scrollNum = 32;
for(x=1; x<=5; x++){
nm = "_level0/a" add x;
setProperty(nm, _x, _x+scroll_num;
setProperty(nm, _y, _y+10);
}

you could also try
nm = eval("/a" add x);

all of these work on the tests i have done in certain places but not in others
with the exact same code!

Hope this helps
Paul
mars_d
1/27/2005 12:49:02 PM
nickgerig
1/27/2005 2:05:15 PM
have you tried:

.../

or

_level0


cheers

nickgerig
1/27/2005 2:09:41 PM
also for testing, maybe isolate the problem by trying it without other variables:

setProperty('/nm1', _x, 10);
setProperty('/nm1', _y, 10);
AddThis Social Bookmark Button