//Create the URLLOader instance var myLoader:URLLoader = new URLLoader();
錯誤#1006:值不是一個函數
//the data will come as URL-encoded variables
myLoader.dataFormat = URLLoaderDataFormat.VARIABLES
//Load using an URLRequest, even beeing local
myLoader.load(new URLRequest("flash/index.php"))
//onLoad handler listener
myLoader.addEventListener(Event.COMPLETE, onDataLoad)
//add a listener for the complete event
function onDataLoad(evt:Event){
for(var i:uint=0; i<evt.target.data.cant; i++){
var mc_holder:MovieClip = new MovieClip();
mc_holder.name = "mc_holder"+i;
mc_holder.x = 30;
mc_holder.y = mc_holder.height+10;
//trace(mc_holder.y = mc_holder.height*i)
addChild(mc_holder);
var loader:Loader = new Loader()
loader.load(new URLRequest(evt.target.data["Image"+i]))
mc_holder.addChild(loader)
mc_holder.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(e:MouseEvent):void {
var my_thumb = e.target.name;
trace(my_thumb);
my_thumb.startDrag();
}
This gives me error Error #1006: value is not a function. when i click on drag