[英]How to remove a specific symbol from stage when clicking on it in Flash AS3?
[英]how to add more animations to the stage when clicking a button in flash
我想通過單擊一個按鈕向我的閃光魚缸添加更多魚..我嘗試了此代碼,但是單擊按鈕后我的魚動畫沒有動畫..並且我正在使用動作腳本3 ..
function fl_MouseClickHandler_2(event:MouseEvent):void
{
// Start your custom code
// This example code displays the words "Mouse clicked" in the Output panel.
trace("Mouse clicked");
addChild(f3);
addChild(eat) ;
addChild(hello) ;
addChild(f2) ;
addChild(f1) ;
// End your custom code
}
f1,f2,f3,吃,你好是我的魚。
這是我的無限滾動代碼。所有的魚都位於單獨的層中,所以對於每一層,我只需更改實例名稱和函數就可以放置此代碼。
f3.addEventListener(Event.ENTER_FRAME, fnewm);
function fnewm(evt:Event)
{
if(f3.x + f3.width <= 0) //movieclip is outside left side of stage
{
//set new position
f3.x = stage.stageWidth;
}
else
f3.x -= 5;
}
當您在控制台中不顯示“鼠標單擊”消息時,我可以采用以下兩個選項之一:
我無法確切告訴您,但是您可以嘗試手動設置按鈕的深度。 有關如何執行此操作的更多信息,請參見此處
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.