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

How can I unload external SWF?

Community Beginner ,
Nov 26, 2015 Nov 26, 2015

Copy link to clipboard

Copied

I am using the following code to load an external SWF file. I would like to unload the same SWF file (Clock.swf) after 10 seconds (automatically). How can I? I am using greensock Class.

import com.greensock.*;

import com.greensock.easing.*;

import com.greensock.plugins.*;

import com.greensock.events.LoaderEvent;

var mySwf1:SWFLoader = new SWFLoader("Objects/Clock.swf", {width:200, height:200, container:ClockContainer, onComplete:completeHandler1});

mySwf1.load();

function completeHandler1(event:LoaderEvent):void {

TweenLite.to(event.target.content, 0,{alpha:0});

TweenMax.fromTo(event.target.content, 3, {x:0, y:0, width:200, height:200, alpha:.1}, {x:0, y:0, width:200, height:200, alpha:1, delay:.5});

}

TOPICS
ActionScript

Views

302

Translate

Translate

Report

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

Enthusiast , Nov 26, 2015 Nov 26, 2015

Unload:

mySwf1.dispose(true);


Unload after 10 seconds:

setTimeout(function () {mySwf1.dispose(true);}, 10000);

Votes

Translate

Translate
Enthusiast ,
Nov 26, 2015 Nov 26, 2015

Copy link to clipboard

Copied

Unload:

mySwf1.dispose(true);


Unload after 10 seconds:

setTimeout(function () {mySwf1.dispose(true);}, 10000);

Votes

Translate

Translate

Report

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 Beginner ,
Nov 26, 2015 Nov 26, 2015

Copy link to clipboard

Copied

Thanks a lot.

Votes

Translate

Translate

Report

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
Enthusiast ,
Nov 26, 2015 Nov 26, 2015

Copy link to clipboard

Copied

LATEST

You're welcome.

Votes

Translate

Translate

Report

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