In answer to my own problem...

The pause issue was unrelated to my code - it was a problem with relative / absolute URL's that has been plaguing me for the last 2 days.

I had tried to clean up my Flash app and separate my swf's from my HTML, etc.

In my HTML I had loaded in the flash using the "base" parameter to tell the swf where it was loaded from.

For some strange reason this caused some bizarre behaviour in an otherwise stable application...

Watch out people.

Glen

Glen Pike wrote:
Hi,

I have implemented a pause / restart mechanism in my Animation class as shown below. unpause is supposed to make the animation jump back a few frames before it starts.

  function pause() {
      Log.info("pause " + this);
      mPlaying = false;
      dispatchEvent( { type:"pause", frame:_currentframe } );
      this.stop();
  }
    function unpause() {
      var frm:Number = _currentframe - 12;
      if(1 > frm) {
          frm = 1;
      }
Log.info("unpause " + frm + " was " + _currentframe + " total " + _totalframes); trace("unpause " + frm + " was " + _currentframe + " total " + _totalframes);
      this.gotoAndStop(frm);
      this.play();
  }

  play() & stop() are overridden in the class too and work fine.

Externally loaded swf's are cast as Animations by meddling with the prototype (http://chattyfig.figleaf.com/mailman/private/flashcoders/2006-October/174431.html)

The problem I am having is that unpause jumps back correctly if I test in the IDE, but not in the browser from a website - localhost & live. My trace & logger outputs correlate, but gotoAndStop sends the movie back to the first frame when using the browser.

  Have cleared cache, deleted ASO files, etc.

  Can anyone shed some light on this?

  Thanks

  Glen


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to