gnash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash] Using gnash to play swf file


From: Meryl Silverburgh
Subject: Re: [Gnash] Using gnash to play swf file
Date: Mon, 26 Feb 2007 10:25:44 -0600

On 2/26/07, strk <address@hidden> wrote:
On Mon, Feb 26, 2007 at 09:06:28AM +0100, strk wrote:
> On Sun, Feb 25, 2007 at 01:34:34PM -0600, Meryl Silverburgh wrote:
>
> > Using flare to decompile the player2.swf, I think the swf creates an
> > object 'Movie' which inherits from the MovieClip (buildin in Flash),
> > but overloading the 'setMovie' and 'playMovie' functions.
> >
> > // the decompile code of player2.swf:
> > logic.Movie extends MovieClip;
> >        var v2 = v1.prototype;

BTW, where is 'v1' defined ?


I think v1 is an anonymous function, see below.
I have attached the complete flare output of player2.swf as well.

 if (!_global.logic.MovieController) {
       var v1 = function () {
         super();
         this.pause_button._visible = false;
         var o = this;
         this.play_button.onRelease = function () {
           o.movie.playMovie();
         };

         this.pause_button.onRelease = function () {
           o.movie.pauseMovie();
         };

         this.stop_button.onRelease = function () {
           o.movie.stopMovie();
         };

         var v6 = function () {
           o.slider_down = true;
           o.slider.highLight();
           this.onEnterFrame = function () {
             var v1 = o._xmouse;
             if (v1 < o.full_progress_bar._x) {
               v1 = o.full_progress_bar._x;
             } else {
               if (v1 > o.full_progress_bar._x + o.full_progress_bar._width) {
                 v1 = o.full_progress_bar._x + o.full_progress_bar._width;
               }
             }
             o.slider._x = v1;
             o.movie.peekSeekRatio(o.getScale());
           };

         };

         var v7 = function () {
           o.slider.normal();
           o.movie.setSeekRatio(o.getScale());
           o.slider_down = false;
           delete this.onEnterFrame;
         };

         this.slider.onPress = v6;
         this.full_progress_bar.onPress = this.slider.onPress;
         this.slider.onReleaseOutside = v7;
         this.slider.onRelease = this.slider.onReleaseOutside;
         this.full_progress_bar.onReleaseOutside =
this.slider.onReleaseOutside;
         this.full_progress_bar.onRelease = this.slider.onReleaseOutside;
         var v3 = this.getBounds(this);
         this.left_justified_elements = [this.play_button,
this.pause_button, this.stop_button, this.ldiv,
this.full_progress_bar];
         for (var v5 in this.left_justified_elements) {
           this.left_justified_elements[v5]._xstart = v3.xMin -
this.left_justified_elements[v5]._x;
         }
         this.right_justified_elements = [this.timer, this.mrdiv,
this.sound_control, this.rdiv, this.regular, this.small, this.min,
this.max];
         for (v5 in this.right_justified_elements) {
           this.right_justified_elements[v5]._xstart = v3.xMax -
this.right_justified_elements[v5]._x;
         }
         this.full_progress_bar._xend = v3.xMax -
(this.full_progress_bar._width + this.full_progress_bar._x);
       };

       logic.MovieController = v1;
       logic.MovieController extends MovieClip;
       var v2 = v1.prototype;
       v2.registerMovie = function (m) {
         this.movie = m;
         this.sound_control.registerMovie(m);
         var o = this;
         m.onPauseMovie = function () {
           o.showPlay();
         };

         var old_handler = m.onPlayMovie;
         m.onPlayMovie = function () {
           o.showPause();
           old_handler();
         };

         m.onSeek = function (ir, r) {
           o.showSeek(ir, r);
         };

         m.onProgress = function (ir, r) {
           o.showProgress(ir, r);
         };

       };




--strk;

Attachment: player2.flr
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]