The following as3 is inside a movie clip of instance name 'counter_int' on root level and the targeted movieclip instance name 'win_message' lives separately on root level too.
Prior to using the listener/function and if statement method below, this worked perfectly and the 'win_message' movicelip played fine WHEN entering a new frame within 'counter_int' which contained the same as3, minus the listener and if statement.
All still works except i.e. it still communicates with targeted movicelip due to the fact, it, the 'win_message' movieclip stops on frame 2, instead of continuing to play. There are no stop(); commands in the targeted movieclip other than on frame 1 btw.
addEventListener(Event.ENTER_FRAME, success);
function success(ev : Event) : void
{
if (linked_total.text == (5).toString () )
{
Object(root).win_message.gotoAndPlay(2);
}
}
Any help would be much appreciated! Apologies if I'm not great at explaining my problem!
Thanks