Skip to main content
paul_james123
Inspiring
April 29, 2014
質問

parent talking to child fails some of the time?

  • April 29, 2014
  • 返信数 1.
  • 343 ビュー

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

このトピックへの返信は締め切られました。

返信数 1

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
paul_james123作成者
Inspiring
April 30, 2014

I'll test that

Thanks Kglad.

kglad
Community Expert
Community Expert
April 30, 2014

you're welcome.