MovieClip isPlaying bug


isPlaying bug updated [check main list :: CS5]:
2: isPlaying implemented.
This property is part of the MovieClip object, it can be use to check if a movieClip is currently playing or not.
Warning DON’T USE IT ! Even after all these years since the release of this API [It’s 2019 now], Adobe never fix this issue/bug that has been known more than 3 years ago !!!:
Unless you EXPLICITLY call the MovieClip’s play()/gotoAndPlay() function, isPlaying will ALWAYS return false EVEN IF/WHEN the MovieClip is actually playing as it will by default if no stop() code is implemented !

Chronological Development of ActionScript 3

So I would argue “not a bug”

and in fact it is very interesting

from Flash 5-8 to then Flash9
you basically have 2 virtual machines

AVM1 for AS1/AS2 Flash 5-8
and then AVM2 for AS3 with Flash 9

and for MovieClip related methods you have this thing happening

on the timeline (which is basically a MovieClip)
calling stop() is not exactly the same thing as calling this.stop()

stop() is the bytecode call from AVM1 used for AS1/AS2
this.stop() is the bytecode call from AVM2 used for AS3

and the real difference is then with AS3 you have the new display list architecture

so something like isPlaying a getter function introduced with the AS3 API
it does not have any equivalent with the AVM1 bytecode and AS1/AS2

to have everything working as intended you need then to go AS3 all the way
any code you put on the timeline should be added “as if” it was declared in an AS3 class
eg. always use this.stop() , never use stop()

and yeah it is pretty hard to debug or even to spot

my point is you can not really mix and match AS1/AS2 world with the AS3 world


I love love love and appreciate having an argument [he he he] about AS3, so glad anyone would even bother ! It makes me feel I am in a safe space where people who love what I love is with me, that I am with my kind.

Sure let’s play this silly argument out because outside this safespace where we are alone, we are faced with a world that would say “Action what ? It’s dead bro, I am learning react-native/vue/framework 7/ionic now” to which I will say “fuck you I love AS3” he he he

Puts on cowboy hat, grass straw in mouth, southern country music playing in the background - I am a simple man…manual say isPlaying is a new feature to detect exactly what it says it does, it doesn’t work, I’ll call that a bug…I am a simple man.

Oh by the way, you mentioned AVM1 for Flash 5 to 8, you are about to educate me on some history now…so…what is the AVM before Flash 5 ?

On yet another subject you brought up, the display list; to me the display list is one of the greatest innovation brought to the table so much so that future JS frameworks are all trying to emulate its concept, it is such a FUCKING WASTE that starling engine didn’t use it [they couldn’t, not their fault] because Adobe didn’t bother to rewrite the display list to NATIVELY support internally all the MoleHill/Stage3D so that as far as the developer is concern, there are no changes at all and it just become automatically better. Haiz…they didn’t go that route…

The same way they didn’t go the route of allowing developers to code in AS3 and output to HTML5 but instead use some bastardized sorry excuse CreateJS shit, what an utter betrayal to developers who sink their life into all the intricacies of AS3 over the years, what a big Fuck You…


I saw the issue long time ago but from the top of my head

when you wrote stop() in bytecode you obtained something like 0x33x44
and when you wrote this.stop() in bytecode you obtained something like 0x77x88

this is due to the evolution of the tags in SWF files along the years

if you have a quick look here swf tags
let’s say for example the tag DefineBitsJPEG
some more features got added with DefineBitsJPEG2,
same for DefineBitsJPEG3, then DefineBitsJPEG4

you have about the same for the actions you can do on a timeline like play/stop/etc.

if you look at SWF File Format Specification Version 10 (PDF)
Chapter 3 - The Display List

see the difference between PlaceObject and PlaceObject2
and in the later ClipActions eg. “SWF5 and later: Clip Actions Data”

PlaceObject was used from SWF1 to SWF4
PlaceObject2 from SWF5 to SWF8
and then PlaceObject3 from SWF9

then look at Chapter 5 - Actions
you will see the evolution in features of the SWF action model

the “bug” is expecting to write stop() so then it call the method of the MovieClip instance
when in fact it calls the “global” stop() bytecode valid from previous SWF format

both are pretty similar, but in one case the stop act at the bytecode level and is not connected to the class, and the other case it is connected to the class

so in pseudo code it is as stupid as

// stop()
public function native_stop():void
    // code to stop the movieclip
    // not connected to the logic of the class

// stop()
public function native_start():void
    // code to start the movieclip
    // not connected to the logic of the class

public class MovieClip
      // this.stop()
      public function stop():void
            // code to stop the movieclip
            _isPlaying = false; // class logic

      // this.start()
      public function start():void
            // code to start the movieclip
            _isPlaying = true; // class logic

do the test yourself, 2 same SWF, both published fro SWF9
first one use stop(), start() so without this
second one use this.stop(), this.start() so explicitly using this
check the difference in behaviour of the property isPlaying

it is not a silly argument, I don’t have more time to go into the details of it
just trying to explain why you see a difference of behaviour that you consider a “bug”

you have many different ways to do things in Flash
use scene, use layers, use timelines, associate class to symbols, etc.

some way works a bit better than others that’s all :slight_smile:

so from the top of my head , pre-actionscript it was not really a VM but a kind of associative table that called “actions”, so when a SWF bytecode was streamed, just by reading the bytecode you call associate a table index to call

also for the rest try to stick to 1 subject per thread, and not expand the thread to 3 or 4 other different subjects, it tends to give endless discussion