Import animated gif/swf via Actionscript 3

New Here ,
Feb 10, 2020 Feb 10, 2020

Copy link to clipboard

Copied

Hi,

is it somehow possible to load something animated (gif/swf)?

 

var loader:Loader = new Loader();
empty.addChild(loader);
loader.load(new URLRequest("background.gif" /* or "background.swf"*/));

 

empty.addEventListener(MouseEvent.MOUSE_DOWN, fl_ClickToDragempty);

function fl_ClickToDragempty(Event:MouseEvent):void
{
empty.startDrag();
}

stage.addEventListener(MouseEvent.MOUSE_UP, fl_ReleaseToDropempty);

function fl_ReleaseToDropempty(Event:MouseEvent):void
{
empty.stopDrag();
}

 

 

Also should change the size

empty.width =

empty.height =

Is correct?

 

 

This is everything I need

TOPICS
ActionScript

Views

99

Likes

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
no replies

Have something to add?

Join the conversation