[問題] 把兩個as檔合併的問題
以下是程式碼
package {
import flash.display.Sprite;
import org.papervision3d.objects.parsers.DAE;
[SWF(width=640, height=480, backgroundColor=0x0, frameRate=30)]
public class Gihyo2_1a extends PV3DARApp {
private var _miku:DAE;
public function Gihyo2_1a() {
this.init('Data/camera_para.dat', 'Data/flarlogo.pat');
}
protected override function onInit():void {
super.onInit();
this._miku = new DAE();
this._miku.load('negimiku.dae');
this._baseNode.addChild(this._miku);
}
}
import flash.display.*;
import flash.net.*;
import com.adobe.serialization.json.JSON;
public class MyData extends MovieClip {
private var nc:NetConnection;
private var rs:Responder;
public function MyData() {
var hd:HttpDomain = new HttpDomain(this);
var gateway:String = hd.domain +
"/flash_php_ch07/amfphp/gateway.php";
nc = new NetConnection();
nc.connect( gateway );
rs = new Responder(testResult, testFault);
nc.call('chkDB.DBtest', rs);
}
private function testResult(result:*):void {
trace( JSON.encode(result) );
}
private function testFault(fault:Object):void {
trace('Fault:' + JSON.encode(fault) );
}
}
}
會出現錯誤
5006: ActionScript 檔不能有超過一個以上的外部可見定義: Gihyo2_1a, MyData
新手 感謝回答
--
你好帥
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.43.36.79
→
03/31 21:02, , 1F
03/31 21:02, 1F
→
03/31 21:02, , 2F
03/31 21:02, 2F
推
03/31 21:33, , 3F
03/31 21:33, 3F
→
04/01 00:36, , 4F
04/01 00:36, 4F
→
04/01 00:37, , 5F
04/01 00:37, 5F
→
04/01 00:40, , 6F
04/01 00:40, 6F
推
04/01 21:59, , 7F
04/01 21:59, 7F