flash

super が実行されないーと悩んでいたら、パブリッシュ設定が flash 5 だった。

flash 5 でも 6 でも、動くように組みたいと思っているのですが、なかなかむつかしいです。

sample (flash 6 のみ)

/*--------------------------------------------------*//* 親クラス*//*--------------------------------------------------*/_root.parentClass = function ( str1, str2 ){	this.init( str1, str2 );};/*--------------------------------------------------*//* init	初期化*//*--------------------------------------------------*/_root.parentClass.prototype.init = function ( str1, str2 ){	trace ("parentClass.init : " + str1 + ", " + str2 );};//----------------------------------------------------//----------------------------------------------------/*--------------------------------------------------*//* 子クラス*//*--------------------------------------------------*/_root.childClass = function ( str ){	this.init( str );};_root.childClass.prototype = new _root.parentClass();/*--------------------------------------------------*//* init	初期化*//*--------------------------------------------------*/_root.childClass.prototype.init = function ( str ){	trace ("childClass.init : " + str );	super.init ( str ,"qwert" );};//--------------------------------------------------// インスタンス生成test = new childClass( "zxcv" );

出力

parentClass.init : , childClass.init : zxcvparentClass.init : zxcv, qwert