Home » AS3, Strange/Bugs, flash

AS3 stop() function doesn’t work

20 January 2010 4 Comments

Here is the “configuration”:

  • One main movie that loads external movies.
  • Externals movies that have stop() functions on their timeline.

When played alone, the external movies run perfectly. The stop() functions work well and everything’s fine.
But when loaded into the main movieclip, all the stop() functions stop working… (well in a way they work “too well”)

Reason:

Conflicting classes… (I suppose)
My external movies have a base class, let’s call it “ExternalMcBaseClass”.
In my main movie, I declare that my external movies are of the type of “ExternalMcBaseClass”. When I specify their type as a simple “MovieClip”, all of the sudden, everything seems to work fine again.

Why ?

I’m not really sure and this is really annoying…
If someone knows why then feel free to explain it.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • E-mail this story to a friend!
  • LinkedIn
  • TwitThis

4 Comments »

  • Sakana said:

    Hello,

    I try to reproduce your issue without success.
    I work a lot with external swf loaded into a Main swf. Each swf having their own base class. No problem.

    Can you give more details ?

    I mean, when you say \"base class\" you mean the class linked to the document.

    Because this class should always extends MovieClip… and so stop is a properties of MovieClip.

    Regards,

    S.

  • Thomas (author) said:

    Hi,
    yes “base class” is the class linked to the document and yes, this class extends MovieClip (among others)
    I’ll try to put an example soon.

  • Adrian Parr said:

    Do you mean like this …?

    http://www.adrianparr.com/?p=124

  • Thomas (author) said:

    This issue seems different. In my case, it only happens when I specify the class as its real class type (extending the MovieClip class). But it works when I just specify it as a MovieClip.

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

Security Code: