actionscript-3

scrolling interval in a Spark List with Tilelayout oversized while using mouse wheel after scrolling with mouseclick

我怕爱的太早我们不能终老 提交于 2020-01-06 14:27:09
问题 I have a spark List with an item renderer and a tile layout. If I scroll by clicking with the mouse on the scroll bar and trying to scroll with the mouse wheel after that, there is a problem: The interval of the scrolling is oversized, instead of scrolling one item down (or up) the List scrolls 4 items down (or up). <s:List dataProvider="{myDataProvider}" itemRenderer="MyRenderer" left="11" right="11" bottom="3" top="10" useVirtualLayout="false" > <s:layout> <s:TileLayout columnAlign=

change movieclip instance name in runtime

末鹿安然 提交于 2020-01-06 13:56:50
问题 I'm trying change movieclip instance name in runtime, with name property but I have error Error #2078: The name property of a Timeline-placed object cannot be modified. I tried to create new movieclip in runtime asign my old movie clip and change name property but I have same error... and is any way to change instance name of movieClip in runtime? 回答1: So far the only workaround I've found is to use an array: import flash.display.MovieClip; import flash.geom.ColorTransform; var t:Boolean; //

E4X/AS3, get an array of text elements without looping

无人久伴 提交于 2020-01-06 13:51:11
问题 this is part of an XML file I retrieve using AS3 E4X: <links> <link> <label>Versions</label> <href>http://mylink1</href> </link> <link> <label>Configurations</label> <href>http://myLink2</href> </link> </links> I want to retrieve the values of labels, so I write: document.links.link.label.text(); This returns VersionsConfigurations. I need this as Array ([Versions, Configurations]) but I would like not to use a loop. Is there any other way? 回答1: Well, this is a "don't try this at home"

Error 1026 Received in ActionScript 3 even with the constructor being an instance method

余生颓废 提交于 2020-01-06 12:50:59
问题 I have got a problem with my actionscript class. This is my code: package { import flash.display.MovieClip; public class Main extends MovieClip { public function Main() { ... } } } It produces the following 2 errors. /.../Main.as, Line 1 5000: The class 'Main' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type. 1026: Constructor functions must be instance methods. I don't know what is causing the errors as the do not when i press Check Syntax. I am

Error 1026 Received in ActionScript 3 even with the constructor being an instance method

会有一股神秘感。 提交于 2020-01-06 12:50:13
问题 I have got a problem with my actionscript class. This is my code: package { import flash.display.MovieClip; public class Main extends MovieClip { public function Main() { ... } } } It produces the following 2 errors. /.../Main.as, Line 1 5000: The class 'Main' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type. 1026: Constructor functions must be instance methods. I don't know what is causing the errors as the do not when i press Check Syntax. I am

JavaScript / jQuery Flash AS3 interaction

試著忘記壹切 提交于 2020-01-06 12:44:19
问题 I am designing a music player using JavaScript (jQuery) and HTML5, with Flash AS3 to fall back. Basically what I want to do is to be able to click HTML control elements and have them interact with the flash in order to play/pause and skip tracks in the playlist (playlist JSON file read by JavaScript, passes file ID to AS3, AS3 reads another JSON file to get URL, then plays audio) This enables me to only use the Flash to play the audio, thus creating the same user experience regardless of

Adobe Air - How to detect LAN servers (listening to a specific port)

亡梦爱人 提交于 2020-01-06 12:41:02
问题 I wonder how I can detect LAN servers. I made a client/server app and it all works fine but you have to manually enter the IP address of the server. Currently I'm trying to use a DatagramSocket on the client/server. The server will send a packet containing its IP address so the client can connect to that address. The packet is send it to its local broadcast IP (192.168.1.255) port 4444. The client will listen to port 4444. Then receive the packet. This works if I'm on the same computer (so

Air for iOS “Device Error: Please check if there is enough space on the device.”

我的未来我决定 提交于 2020-01-06 11:45:41
问题 So I have encountered this error. One day everything works fine, the other I can't upload the ipa to my iPad from Flash Pro CS6. Obviously I have checked there's enough space in the device. iPhone utility explorer reports the error "A signed resource has been added, modified, or deleted." when trying to install the ipa file. iTunes won't install the app either. There are no strange characters in the app name. I have redownloaded the profiles from Apple's portal and checked there were no

Air for iOS “Device Error: Please check if there is enough space on the device.”

有些话、适合烂在心里 提交于 2020-01-06 11:45:17
问题 So I have encountered this error. One day everything works fine, the other I can't upload the ipa to my iPad from Flash Pro CS6. Obviously I have checked there's enough space in the device. iPhone utility explorer reports the error "A signed resource has been added, modified, or deleted." when trying to install the ipa file. iTunes won't install the app either. There are no strange characters in the app name. I have redownloaded the profiles from Apple's portal and checked there were no

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

大兔子大兔子 提交于 2020-01-06 11:19:08
问题 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