我已经研究了几天的问题,但直到现在我还没有找到解决方案.我对ASP有0个知识.而我只是希望能够从ASP传递并获取var/text.
任何人都可以指导我如何从这里开始?
private function loadASP():void {
var aspSend:URLRequest=new URLRequest("testASP.asp");
var aspLoader:URLLoader = new URLLoader();
aspLoader.load(aspSend);
trace("did send");
//aspLoader.addEventListener(Event.COMPLETE, processASP);
}
private function processASP(e:Event):void {
}
Run Code Online (Sandbox Code Playgroud) 如何将位图设置为按钮,以便我可以在其上应用按钮模式和鼠标事件,而无需将位图添加到影片剪辑?
var bmpFull=new Bitmap(event.currentTarget.content.bitmapData);
bmpFull.smoothing=true;
bmpFull.name="photo";
bmpFull.alpha=0;
//fullMC.buttonMode=true;
fullMC.addChild(bmpFull);
Run Code Online (Sandbox Code Playgroud) 如果有多个对象,如何排列它以使行x列中的每个对象数量形成一个近似正方形?
exp:14个对象排列如下:
0 0 0 0
0 0 0 0
0 0 0 0
0 0
Run Code Online (Sandbox Code Playgroud) 在我完成一个补间之后,我想改变我的变量,然后只有我的鼠标移动才会开始运行一些函数,但似乎onComplete函数会立即解决所有问题.是不是onComplete函数只会在动作完成后运行?在运行Tween.to代码行之后还有其他任何方式,只有它会运行第二行更改变量吗?
stage.addEventListener(MouseEvent.MOUSE_MOVE, movevC);
public static function showSection(obj:DisplayObject):void {;
var sect2X=((obj.stage.stageWidth/2)+(obj.stage.stageWidth/4))+lg.width;
var sect2Y=((obj.stage.stageHeight/2)-(obj.stage.stageHeight/4))+lg.height;
switch (obj.name) {
case "section2" :
//onComplete run instantly??
TweenLite.to(vC, 10, {x:sect2X, y:sect2Y, rotation:0,ease:Elastic.easeInOut, onComplete:currentPage=2});
/*if ((vC.x=sect2X)&&(vC.y=sect2Y)) {
currentPage=2;
}*/
break;
}
}
private function movevC(event:MouseEvent):void {
if (currentPage==2) {
TweenLite.to(vC, 2, {x:mouseX, y:mouseY});
}
}
Run Code Online (Sandbox Code Playgroud) 我发现如果使用getChildAt/getChildByName,我无法定位主MC内的对象.它会回报我
Error #1119: Access of possibly undefined property someProperty through a reference with static type flash.display:DisplayObject.
Run Code Online (Sandbox Code Playgroud)
我试图用类似的东西
this.getChildAt(0).getChildByName("objectName")....
Run Code Online (Sandbox Code Playgroud)