Last active
January 3, 2019 07:11
Revisions
-
jhiswin revised this gist
Nov 7, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,8 @@ // TODO make this not an ugly hack, assumes a lot of things // TODO add a LoadMovie to load movie in-place, need to retrieve bgcolor and frameSize and set them // for swiffy v7.4 // loadMovie only works if ends in lowercase .swf, looks for .swf.json function lcase_swf(path) { var path = path[path.length - 4] === '.' ? path.slice(0, -4) : path; -
jhiswin revised this gist
Nov 6, 2015 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,6 @@ // TODO make this not an ugly hack, assumes a lot of things // TODO add a LoadMovie to load movie in-place, need to retrieve bgcolor and frameSize and set them // loadMovie only works if ends in lowercase .swf, looks for .swf.json function lcase_swf(path) { var path = path[path.length - 4] === '.' ? path.slice(0, -4) : path; -
jhiswin created this gist
Nov 6, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ // loadMovie only works if ends in lowercase .swf, looks for .swf.json function lcase_swf(path) { var path = path[path.length - 4] === '.' ? path.slice(0, -4) : path; return path + '.swf'; } swiffy.Stage.prototype.getContainer = function () { return this['Td']; }; swiffy.Stage.prototype.getRoot = function () { return this['Ga']['O']['s']; }; swiffy.Stage.prototype.GoToFrame = function (n) { this.getRoot().stop(); this.getRoot().gotoAndStop(n + 1); }; swiffy.Stage.prototype.Rewind = function () { this.getRoot().stop(); this.getRoot().gotoAndStop(1); }; swiffy.Stage.prototype.GetMovie = function () { this.__url__; }; swiffy.Stage.prototype.SetMovie = function (url) { url = lcase_swf(url); if (this.__url__ === url) return url; this.__url__ = url; this.setSwfUrl(url); this.getRoot().loadMovie(url); return url; }; swiffy.Stage.prototype.PlayMovie = function () { this.start(); this.getRoot().stop(); this.getRoot().play(); };