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

FLASH AS2 Controlling main swf plaback from loaded swf

New Here ,
Nov 16, 2015 Nov 16, 2015

Hello,

I have two swf files. The main swf (main.swf) that loads another swf (external.swf).

Current code in my main swf that loads the external swf is:

stop();

this.createEmptyMovieClip ("holder", 1);

holder.loadMovie ("content/swf/M01/disclaimer.swf");

Then the loaded swf should unload on a click event and the main swf movie should resume play.

The code in that swf file is:

on (release) {

_level0.gotoAndPlay("hideMSG");

_parent.unloadMovie("content/swf/M01/disclaimer.swf",1);

}

The external swf loads and unloads perfectly, but the main movie does not seem to resume.

When I try to use _level0.play, it seems to reload and restart the main.swf file.

Any help would be greatly appreciated.

Laura

TOPICS
ActionScript
782
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

correct answers 1 Correct answer

New Here , Nov 17, 2015 Nov 17, 2015

No, there is no stop in that frame, there's actually a play(); which is exactly what I want.

I managed to get it working using variables instead.

Thanks,

Laura

Translate
Enthusiast ,
Nov 16, 2015 Nov 16, 2015

I am not sure but maybe there's a stop() method on the frame "hideMSG" try to go to the next frame and play.

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
New Here ,
Nov 17, 2015 Nov 17, 2015

No, there is no stop in that frame, there's actually a play(); which is exactly what I want.

I managed to get it working using variables instead.

Thanks,

Laura

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 ,
Nov 17, 2015 Nov 17, 2015
LATEST

if holder is on the main timeline of your level0 swf, in the loaded swf you would use:

on (release) {

_level0.gotoAndPlay("hideMSG");

_level0.holder.unloadMovie();

}

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