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

Import animated gif/swf via Actionscript 3

New Here ,
Feb 10, 2020 Feb 10, 2020

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

Have something to add?

Join the conversation