Skip to main content
Participant
June 6, 2008
Answered

Problem accessing variables in loaded Captivate swfs when run locally

  • June 6, 2008
  • 1 reply
  • 137 views
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.
    This topic has been closed for replies.
    Correct answer eric_v
    Turns out it was a Flash Player security issue and I had to set security settings to "always trust" for my local directory.

    1 reply

    eric_vAuthorCorrect answer
    Participant
    June 6, 2008
    Turns out it was a Flash Player security issue and I had to set security settings to "always trust" for my local directory.