actionscript-3

MOUSE_OUT events not firing on child when parent is mouseEnabled=false, mouseChildren=false

血红的双手。 提交于 2020-01-06 11:18:25
问题 I make a sprite, then add a child sprite. I add a listener to the child for MOUSE_OUT events. If my mouse is in the child sprite when I set the parent sprite mouseEnabled=false and mouseChildren=false, MOUSE_OUT is not fired on the child. But then, when I move the mouse, MOUSE_OUT is fired on the child. MOUSE_OUT is also fired if I click. MOUSE_OUT is not fired if I mousewheel. So, what's going on here? This is a related question. After studying back2dos' code, I discovered what I am doing

MOUSE_OUT events not firing on child when parent is mouseEnabled=false, mouseChildren=false

假如想象 提交于 2020-01-06 11:18:12
问题 I make a sprite, then add a child sprite. I add a listener to the child for MOUSE_OUT events. If my mouse is in the child sprite when I set the parent sprite mouseEnabled=false and mouseChildren=false, MOUSE_OUT is not fired on the child. But then, when I move the mouse, MOUSE_OUT is fired on the child. MOUSE_OUT is also fired if I click. MOUSE_OUT is not fired if I mousewheel. So, what's going on here? This is a related question. After studying back2dos' code, I discovered what I am doing

Getting data from custom classes (an OOP question)

◇◆丶佛笑我妖孽 提交于 2020-01-06 09:53:27
问题 How can I get some var / data from a custom classes? The XML class package classes { import flash.net.URLLoader; import flash.net.URLRequest; import flash.events.Event; import flash.display.MovieClip; public class videoData extends MovieClip { private var myXML:XML; private var myXMList:XMLList; public function videoData() { var myXMLLoader:URLLoader = new URLLoader(); myXMLLoader.load(new URLRequest("playlist.xml")); myXMLLoader.addEventListener(Event.COMPLETE, processXML); } private

separating data in an array for display in Flex

不问归期 提交于 2020-01-06 08:48:09
问题 I'm new to flex/flash builder, i need to read in data from a text document, then slice it into pieces i set out in my custom class. all of this so far worked var theCustomer:Customer=new Customer(name,address,phoneNo,comment,custNo); custArray.addItem(theCustomer); So now what i want to do is display only the name from each entry of the array into a combobox - and then on close it will display all the details into a list box If i just bind the custArray to the combobox it displays name

Trigger event from child to parent in AS3

梦想的初衷 提交于 2020-01-06 08:32:29
问题 I have a MovieClip with a MouseEvent function associated to CLICK event. Inside of this MovieClip I have a TextField. So, when I click on my MovieClip, the handler works fine. Now I need the same behaviour when I click on this TextField, but without change my handler function. I mean, I don't want to change e.target to e.target.parent if user clicked on TextField instead of MovieClip. How can I do this? Some of my source code: public function Main(){ var m = new menu(); menuMng.addChild(m); m

Trigger event from child to parent in AS3

寵の児 提交于 2020-01-06 08:31:27
问题 I have a MovieClip with a MouseEvent function associated to CLICK event. Inside of this MovieClip I have a TextField. So, when I click on my MovieClip, the handler works fine. Now I need the same behaviour when I click on this TextField, but without change my handler function. I mean, I don't want to change e.target to e.target.parent if user clicked on TextField instead of MovieClip. How can I do this? Some of my source code: public function Main(){ var m = new menu(); menuMng.addChild(m); m

Play MP3 in AIR app for iOS and Android

两盒软妹~` 提交于 2020-01-06 08:15:26
问题 I was wondering if someone could shed some light on the best method to embed, select and play audio files in an AIR app built for iOS and Android? I have an app where a user can select a file to play from a list of 10 audio files. These are selected when a slider moves left or right. I currently would create 10 individual embed snippets and classes [Embed(source="assets/audio/file1.mp3)] public static const file1:Class; [Embed(source="assets/audio/file2.mp3)] public static const file2:Class;

How to create DialogBox in blackberry tabOS & how call next screen after click on button using Adobe flex4.5?

99封情书 提交于 2020-01-06 08:15:06
问题 i am new to Blackberry application development. now i am trying to make new app using adobe flex4.5 for Blackberry TabOS.. can anyone please guide How to create dialog box and how to call another screen by clicking on button????can anyone give sample code for the same...? i am trying this code: private function showLoginDialog():void { login = new LoginDialog(); login.title = "Device is locked"; login.message = "Please enter your username and password:"; login.addButton("OK"); login.addButton

How to create DialogBox in blackberry tabOS & how call next screen after click on button using Adobe flex4.5?

六月ゝ 毕业季﹏ 提交于 2020-01-06 08:14:21
问题 i am new to Blackberry application development. now i am trying to make new app using adobe flex4.5 for Blackberry TabOS.. can anyone please guide How to create dialog box and how to call another screen by clicking on button????can anyone give sample code for the same...? i am trying this code: private function showLoginDialog():void { login = new LoginDialog(); login.title = "Device is locked"; login.message = "Please enter your username and password:"; login.addButton("OK"); login.addButton

Showing main menu over objects / movieclips?

女生的网名这么多〃 提交于 2020-01-06 07:54:06
问题 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