Created
November 13, 2013 06:26
-
-
Save sagarpanda/7444632 to your computer and use it in GitHub Desktop.
gotoAndPlay/gotoAndStop in swiffy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import flash.events.Event; | |
| this.addEventListener(Event.ENTER_FRAME, _oef ); | |
| var f:Number = 0; | |
| function _oef(e:Event):void { | |
| if(this.loaderInfo.parameters.call) | |
| { | |
| f = Number(this.loaderInfo.parameters.fm); | |
| this[this.loaderInfo.parameters.call](f); | |
| delete this.loaderInfo.parameters.call; | |
| } | |
| } | |
| function gotoframe(n:Number):void{ | |
| this.gotoAndStop(n); | |
| } | |
| stop(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var stage = new swiffy.Stage(document.getElementById('swiffycontainer'), swiffyobject); | |
| stage.start(); | |
| stage.setFlashVars('call=gotoframe&fm=1'); |
Works for me as well. Thanks for your post.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wanted to replay my swiffy converted HTML5 banner & i ended up with your solution.
Thanks