Skip to main content
paul_james123
Inspiring
April 29, 2014
Question

parent talking to child fails some of the time?

  • April 29, 2014
  • 1 reply
  • 346 views

Hi All,

Have others found that sending a value (stored in a variable) from a parent (main timeline) to a child (movie clip) fails some of the time but only when the movie is running as a .swf (it never fails when testing in authoring)?

My main timeline's actionscript has:

XYZ_ChildMC.variableA = false; //parent talks to child movie clip

In the child MC script:

import fl.video.*;

var variableA;

function completeHandler(e: fl.video.VideoEvent): void

{

     if (variableA == false)

          {

             myFLV.seek(0);

             myFLV..play();

          }

}

This seems to fail about 5% of the time when running/rerunning the .swf in a browser.

Anyone have a similar experience?

Thanks

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
April 29, 2014

never had that problem.  most likely you have a timing issue.

use the trace function or textfield to determine if completeHandler is executing before variableA is assigned.

paul_james123
Inspiring
April 30, 2014

I'll test that

Thanks Kglad.

kglad
Community Expert
Community Expert
April 30, 2014

you're welcome.