I'm working in a framework for the first time (Gaia). I'll be including games on some of the site's "pages," and most of the games will need to load a few external SWFs.

In the (AS2) class file for the page I'm trying to modify, I'm trying to add this code inside the class constructor function (which is provided in the Gaia AS template), so that the SWF is loaded when the page is initialized:

--code begins--
  private var posterMc:MovieClip = this.createEmptyMovieClip('posterMc',100);
  this.posterMc.loadMovie('adv_saleposter.swf');
--code ends--

The second line of the above code is producing a compile error that says "This statement is not permitted in a class definition." (The script is actually full of lines that produce the same error, which indicates I'm way off base.)

Can someone help me pull my head out of my AS2 and tell me what's wrong with my approach? I'm sure this points to a bigger design problem than I realize...

TIA,
Jim
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to