Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

parent talking to child fails some of the time?

Contributor ,
Apr 29, 2014 Apr 29, 2014

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

TOPICS
ActionScript
304
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 29, 2014 Apr 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 30, 2014 Apr 30, 2014

I'll test that

Thanks Kglad.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 30, 2014 Apr 30, 2014
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines