Link to home
Start Free TrialLog in
Avatar of butterhook
butterhookFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Calling function within movieclip from _root level

Seems like a stupid question  but.....

1. I have created a movie clip
2. Inside that movie clip I have defined a function, in this case call it this

function TestDemo(ImageURL:String):Void {

    trace(ImageURL);

}

3. I have created two instances on the _root level, named 'ClipOne' and 'ClipTwo'
4. When I call my function from the _root level like this:

ClipOne.TestDemo("credits/1.jpg");
ClipTwo.TestDemo("credits/2.jpg");

Nothing seems to happen at all, I don't get the trace result at all.
Is there something stupid I have done, or can I not call a function like this in Studio 8? I did it all the time in Flash 5.....

Cheers,

Butterhook
Avatar of trigger-happy
trigger-happy
Flag of Philippines image

seems perfectly fine to me, i suggest you check your publish settings (file menu). Try to see if the "omit trace actions" check box is checked, if so, uncheck it.

--trigger-happy
Avatar of butterhook

ASKER

Found the problem - I was attempting to call the function in the first frame of the _root timeline. Moved it to the second frame and it worked perfectly. Thanks
good to know that you solved your problem :)

--trigger-happy
ASKER CERTIFIED SOLUTION
Avatar of DarthMod
DarthMod
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial