
Код AS1/AS2:
import net.flashXpert.videoPlayer.Controller;
class net.flashXpert.videoPlayer.VideoPlayer extends MovieClip
{
/** The Movieclip that contains the Controll Bar */
private var mcController : Controller;
/** The main XML */
private var settingsXML : XML;
/** The class that handle the main XML */
private var xmlManager : XMLManager;
public function VideoPlayer()
{
this.mcController._visible = false;
this.settingsXML = _root.settings;
this.settingsXML.ignoreWhite = true;
settingsLoaded();
}
/**
* Called when the main XML is loaded and initializes player's components: Controll Bar, Video Display and Share
*/
private function settingsLoaded() : Void
{
trace(" --- need init controller --- " + mcController);
trace(" --- need init controller --- " + mcController._alpha);
trace(" --- need init controller --- " + mcController.init);
mcController.init(this);
}
}

Код AS1/AS2:
import net.flashXpert.videoPlayer.VideoPlayer;
class net.flashXpert.videoPlayer.Controller extends MovieClip
{
/** The main class */
private var mcVideoPlayer : VideoPlayer;
private function Controller()
{
public function init(pMcVideoPlayer : VideoPlayer) : Void
{
trace(" --- init controller --- ")
this.mcVideoPlayer = pMcVideoPlayer;
}
}

Код AS1/AS2:
// traces
--- need init controller --- _level0.mcVideoPlayer.mcController
--- need init controller --- 100
--- need init controller --- undefined