actionscript-3

Showing main menu over objects / movieclips?

允我心安 提交于 2020-01-06 07:53:05
问题 I am creating a game in Flash and I am creating a main menu for the game (With buttons like 'Play', 'How to Play', 'Hiscores' etc.) and was wondering what is the best way to go about it? All of my Actionscript code is in external .as files and I've used classes throughout but I was having trouble figuring out how to get it so that the menu will be shown as soon as the game is ran. The main problem is that there are timers in my game that have event handlers attached to them and I was trying

Showing main menu over objects / movieclips?

南笙酒味 提交于 2020-01-06 07:53:03
问题 I am creating a game in Flash and I am creating a main menu for the game (With buttons like 'Play', 'How to Play', 'Hiscores' etc.) and was wondering what is the best way to go about it? All of my Actionscript code is in external .as files and I've used classes throughout but I was having trouble figuring out how to get it so that the menu will be shown as soon as the game is ran. The main problem is that there are timers in my game that have event handlers attached to them and I was trying

how to access all item renderer of MX: Tree in?

余生长醉 提交于 2020-01-06 07:24:45
问题 my renderer contains a canvas in it, i add some title-window, every time i see my tree previously added Title-Windows are visible, i want to access each n every item in tree and remove previosly added all windows from the rendere. so can any tell me how access all the item renderer in AS3 ? 回答1: if tree having id for example " id_tree " is using XML dataprovidor then by useing the for each(var tmp:xml in rootTag.descendants()) { id_tree.itemToItemRenderer(tmp); } 来源: https://stackoverflow.com

AS3 - Changing depth of MC in relation to another

折月煮酒 提交于 2020-01-06 07:24:08
问题 I am trying to make this top-down game that uses slightly 3D sprites. I want to be able to make the player walk in front of, as well as behind, any object he comes to. Like, if he's a certain distance behind another object, he'll move behind it and if he's closer to the front of the other object, he'll move in front of it. Kind of like those old arcade games like streets of rage. Any ideas? 回答1: everytime the player moves, you need to evaluate the y position of each applicable item and sort

how to access all item renderer of MX: Tree in?

耗尽温柔 提交于 2020-01-06 07:23:25
问题 my renderer contains a canvas in it, i add some title-window, every time i see my tree previously added Title-Windows are visible, i want to access each n every item in tree and remove previosly added all windows from the rendere. so can any tell me how access all the item renderer in AS3 ? 回答1: if tree having id for example " id_tree " is using XML dataprovidor then by useing the for each(var tmp:xml in rootTag.descendants()) { id_tree.itemToItemRenderer(tmp); } 来源: https://stackoverflow.com

my object doesn't get removed in array

☆樱花仙子☆ 提交于 2020-01-06 06:57:34
问题 the problem is when i shoot down my enemy he keeps re-spawning. probably something i overlooked. i can shoot it, it gets removed from stage but gets rerenderd because it still exist in my array. thanks private function enemySpawnen():void { for(var i:uint = 0; i < hoeveelheidEnemy;i++){ var enemyShip:SpaceShip = new SpaceShip(); Enemy[i] = enemyShip; } } private function renderEnemy(e:Event):void { for(var i:uint = 0; i < hoeveelheidEnemy;i++){ if(Enemy[i] != null){ viewContainer.addChild

ActionScript3, moving objects of type movieclip

你离开我真会死。 提交于 2020-01-06 06:53:19
问题 Here i am trying to create a new movieclip type object, which is moved when function mvBall is called. When i run the code i get this err: implicit coercion of a value with static type object to a possibly unrelated type flash.display:MovieClip. Later on i want to be able to make the ball bounce back when it colides with another object. I'm new to action script and don't really know how things work so any help would be appreciated. Here's the code: private function frame(x:Event):void { var

How can I debug an Actionscript project in Flex builder?

霸气de小男生 提交于 2020-01-06 06:50:45
问题 I am trying to use Flex builder for the first time in years. I haven't used the "Run Application" option before, and when I do that now it tells me "Errors exist in required projects" and whether I should proceed. I would like to debug those errors. Does anyone know how I can do that? PS: When I click the "Debug" button, it does exactly the same thing. I don't see error output in the console views. 回答1: Ensure the Problems view is open (Window -> Show View -> Problems). That will show you

How can I debug an Actionscript project in Flex builder?

牧云@^-^@ 提交于 2020-01-06 06:50:28
问题 I am trying to use Flex builder for the first time in years. I haven't used the "Run Application" option before, and when I do that now it tells me "Errors exist in required projects" and whether I should proceed. I would like to debug those errors. Does anyone know how I can do that? PS: When I click the "Debug" button, it does exactly the same thing. I don't see error output in the console views. 回答1: Ensure the Problems view is open (Window -> Show View -> Problems). That will show you

Actionscript 3 - load and library image on increment / counter

两盒软妹~` 提交于 2020-01-06 06:42:09
问题 I have a very simple flash movie. 24 png images in the Library The image properties are set to 'Export for Actionscript' and the class named 'image1', 'image2' etc Single frame in the timeline I need to dynamically load 'image1' on the stage at the start of the movie. I have been able to do this using BitmapData ojects. On clicking the image, I need to increment an internal image and replace the image on screen with image2. When I try to pass the library class as a variable it throws an error