# How to load an swf and gotoAndPlay?

**URL:** https://forum.kirupa.com/t/how-to-load-an-swf-and-gotoandplay/227366
**Category:** Uncategorized
**Created:** [May 29, 2007, 6:12pm UTC](https://forum.kirupa.com/t/how-to-load-an-swf-and-gotoandplay/227366 "2007-05-29T18:12:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![parxal](https://avatars.discourse-cdn.com/v4/letter/p/4da419/32.png) [@parxal](https://forum.kirupa.com/u/parxal)
#### Post date: [May 29, 2007, 6:12pm UTC](https://forum.kirupa.com/t/how-to-load-an-swf-and-gotoandplay/227366/1 "2007-05-29T18:12:12Z")

</div>

I need to load a swf file and make a gotoAndPlay();

var urlReq:URLRequest = new URLRequest(url);  
var loader:Loader = new Loader();  
loader.objLoader.load(urlReq);  
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,animationLoaded);

private function animationLoaded(event:Event):void{  
var movie:MovieClip = event.currentTarget.loader.content;  
movie.gotoAndPlay(3);  
}

Does not work!!! need help!
