Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

kuba sanitrak

Members
  • Posts

    2
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

kuba sanitrak's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thank you Carl, just couldn't figure it out myself. Got a bit lost in all the videos and slides filled with great stuff. The more I pushed, the more confused I got. Thanks again. Take care, kuba
  2. Hello, I have a question about accessing loaded swf files by SWFLoader class. I am loading swf file and want to play/stop its content on certain event managed by certain function, not autoplay. I have managed to access child clip of loaded swf (see sample code below). But is there a way to "play" directly the loaded swf file, so I do not have to put all my animations into child clips of loaded swf? Thanks up front for any suggestions kuba import com.greensock.*; import com.greensock.loading.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.display.*; import com.greensock.loading.data.*; import flash.display.MovieClip; var clip_var:MovieClip; var myLoader:SWFLoader = new SWFLoader("data/swf/test2.swf", {name:"nameSwf", container:container_mc, autoPlay:false, onComplete:completeHandler} ); //start loading myLoader.load(); function progressHandler(event:LoaderEvent):void { //trace("progress: " + event.target.progress); } function completeHandler(event:LoaderEvent):void { trace(event.target + " is complete!"); clip_var = myLoader.getSWFChild("clip_test") as MovieClip;//GET CHILD CLIP OF LOADED SWF (NAMED "clip_test") } function errorHandler(event:LoaderEvent):void { trace("error occured with " + event.target + ": " + event.text); } function swfPlay(e:MouseEvent):void { clip_var.play(); } stage.addEventListener(MouseEvent.CLICK, swfPlay);
×