Ticket #80 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

fix FLEX embedding by removing pre-skinning MC dependencies

Reported by: jeroen Owned by:
Priority: Milestone: Flash 4.0
Component: Keywords:
Cc: Forum thread:

Description

Hi Jeroen. First, I'd like to say I love your player and am in the process of selling my employer on the idea of an unlimited license for it. I'm really interested in building it under the free FLEX SDK from Adobe, and have a couple of questions for you about the design. I've gotten it all to compile with mxmlc (the flex compiler), but I'm hitting some runtime errors because of the way I bootstrap the thing, which is apparently different from the way it gets bootstrapped when building with Flash.

I built a trivial wrapper (jw.as) that serves as the root movie, which looks like this:

package {

import flash.display.MovieClip; [SWF(width="320", height="240", frameRate="24", backgroundColor="#FF00FF")]

import com.jeroenwijering.player.Player; import Log;

public class jw extends Player {

public function jw() {

Log.debug("jw()+"); Log is my class that just does a trace( ) and calls a JS trace method via ExternalInterface Log.debug("jw()-");

}

}

}

This is built using 'mxmlc jw.as' and outputs jw.swf (note that there are no assets built in; something I plan to deal with next). The problem comes from the Player constructor: it appears that it either expects a MovieClip to be passed in, or it expects thisplayer? to be a MovieClip. This is the part I don't understand. Later, Model expects this same object to have a 'display' property (skin.display.thumb, etc), but MovieClips do not have such a property, so AS3 complains about this code.

I guess my question is: what object is the Player constructor expecting to find? Is it some legacy object from AS2? I must confess I was never an AS2/Flash programmer, so I'm not familiar with the environment that's automatically set up for you when you build a .FLA.

Change History

comment:1 Changed 5 years ago by jeroen

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.