Answered
Problem accessing variables in loaded Captivate swfs when run locally
I'm loading Captivate 3 swfs into a custom Flash player. Here
is pseudocode that just gets to the point:
var cp1_mc:MovieClip = this.createEmptyMovieClip("cp1_mc", 1);
cp1_mc.loadMovie("captivate1.swf");
[wait for (cp1_mc.rdcmndGotoSlide != undefined) via setInterval]
// ***** cp1_mc.rdcmndGotoSlide is FOUND
var cp2_mc:MovieClip = this.createEmptyMovieClip("cp2_mc", 2);
cp2_mc.loadMovie("captivate2.swf");
[wait for (cp2_mc.rdcmndGotoSlide != undefined) via setInterval]
// ***** cp2_mc.rdcmndGotoSlide REMAINS UNDEFINED INDEFINITELY
The thing is, this problem does not happen when testing the movie in Flash, nor does it happen when the player.swf is run on a server. It happens when the player.swf is playing locally in an html page.
Can anyone give me a clue as to what's going on? My best guess is that it has something to do with Flash Player Security, because it only happens locally in a browser, but I just don't get what's happening.
var cp1_mc:MovieClip = this.createEmptyMovieClip("cp1_mc", 1);
cp1_mc.loadMovie("captivate1.swf");
[wait for (cp1_mc.rdcmndGotoSlide != undefined) via setInterval]
// ***** cp1_mc.rdcmndGotoSlide is FOUND
var cp2_mc:MovieClip = this.createEmptyMovieClip("cp2_mc", 2);
cp2_mc.loadMovie("captivate2.swf");
[wait for (cp2_mc.rdcmndGotoSlide != undefined) via setInterval]
// ***** cp2_mc.rdcmndGotoSlide REMAINS UNDEFINED INDEFINITELY
The thing is, this problem does not happen when testing the movie in Flash, nor does it happen when the player.swf is run on a server. It happens when the player.swf is playing locally in an html page.
Can anyone give me a clue as to what's going on? My best guess is that it has something to do with Flash Player Security, because it only happens locally in a browser, but I just don't get what's happening.