Jump to content
Search Community

Loading Movie clips with array from XML

humastan test
Moderator Tag

Recommended Posts

Hi,

 

I have tried for a long time, but with no success, to transform movie clips loaded fron an array.

 

My array looks will just run fine when I'm running it like this

var manager_obj = new TransformManager({targetObjects:[links0,links1,links2,links4], forceSelectionToFront:true, eventHandler:onAnyEvent});

 

When I'm trying to access my array like this Transformmanager will not work

var manager_obj = new TransformManager({targetObjects:linkArray, forceSelectionToFront:true, eventHandler:onAnyEvent});

 

I' building my array in a loop like this:

linkArray.push(string(XML_LINK.objnames));

 

When I'm checking my array with trace it look just fine and exactly as it should. But it is'nt working in TransformManager.

 

Please help

Link to comment
Share on other sites

You must pass real references to the object, not just their String names. In other words:

 

BAD: targetObjects:["links0","links1","links2","links4"]

GOOD: targetObjects:[links0,links1,links2,links4] //(assuming links0, links1, etc. reference valid MovieClips)

 

XML stuff is always just String data, so you're telling TransformManager that you want to literally transform text/Strings instead of the actual MovieClips themselves.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...