How to jump to a specific frame in a swiffy converted file without modifying the original swf file?

I want to go to a specified frame in an animation to show the different stages.

With original SWF file, this works great when I call the Javascript function

Here's the original HTML:

<OBJECT id="flashname" data="'.$flashmovie.'"  type="application/x-shockwave-flash" width="600" height="332">
    <PARAM NAME=movie VALUE="'.$flashmovie.'"> 
    <PARAM NAME=quality VALUE=autohigh>
    <PARAM NAME=bgcolor VALUE=#FFFFFF>
    Your Browser is not able to show this object.
</OBJECT>

      

In javascript, I was just calling:

flashname.TGotoFrame('_flash0',frameNumber);

      

Now I have a Swiffy HTML file and want to have the same effect. But it doesn't work.

The swiffyobject is displayed, but always the first frame. By default, I couldn't switch to another frame.

I tried

var stage = new swiffy.Stage(document.getElementById('flashname'), swiffyobject, {  });

stage.start();
stage.gotoAndStop("frame");
stage.flashname.TGotoFrame('_flash0', 1);
stage.TGotoFrame('_flash0', 1);
flashname.TGotoFrame('_flash0', 1);

      

Any ideas how to solve this problem?

+3


source to share


2 answers


Currently Swiffy runtime v7.3:

stage.Ka.N.o.gotoAndStop(frameNumber)

      

EDIT: Swiffy runtime v7.4 stage.Ga.OsgotoAndStop



Note: "o" is sort of a root. _level0, etc. available under "o".

How I found this: Look for a prototype constructor with gotoAndStop()

and family and set debugger breakpoints. Then I traversed the call stack (in debugger: exit, go to constructors referencing the object, repeat if applicable) to find where it was created and then referenced.

It would be nice if Apple and Google open up the original parts of Swiffy so they can be hacked / tweaked / improved upon. If anyone knows how to contact them, please write.

+2


source


stage.Ka.N.o.gotoAndStop(frameNumber)



And as requested by user120242, I am giving a link that explains the features in Swiffy https://gist.github.com/trongthanh/3095503

0


source







All Articles