actionscript-3

Find motherboard ID with flex builder?

北慕城南 提交于 2020-02-06 12:58:05
问题 I want to get motherboard ID in flex builder. This is my code. I follow this code to build my own Retrieve manufacturer information from device that AIR app is running on But I got this error TypeError: Error #1009: Cannot access a property or method of a null object reference. give me some solution please. <?xml version="1.0" encoding="utf-8"?> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="100%" height="100%" showStatusBar="false" verticalAlign=

Move Button into grid space of a TabNavigator's tabs in Flex Builder

不打扰是莪最后的温柔 提交于 2020-02-05 07:37:07
问题 I have a layout question for Tab Navigators in Adobe Flex 3. Is it possible to insert a button that invades the grid space of the tabs? I have a tab navigator component and I am dynamically adding sub components to tab navigator and I want squeeze a button inside the tab space. I don't want the button to be another tab. And I don't want to use a TabBar for the tabs. This graphic illustrates the problem. This is the current layout I have This is a mockup (photoshopped) of the layout I want. I

Flex: Database driven DataGrid: arrows disappearing

房东的猫 提交于 2020-02-05 05:35:51
问题 In Flex I'm using the following code to allow sorting in a DataGrid (the data is paged and sorted serverside). private function headerReleaseHandler(event:DataGridEvent):void { var column:DataGridColumn = DataGridColumn(event.currentTarget.columns[event.columnIndex]); if(this.count>0) { if(this.query.SortField == column.dataField) { this.query.SortAscending = !this.query.SortAscending; } else { this.query.SortField = column.dataField; this.query.SortAscending = true; } this.fill(); } event

How to Site-Lock a Flash Application?

允我心安 提交于 2020-02-05 03:26:11
问题 I have a flash application that I am going to put up on my website shortly. I want to be able to "lock it" to the site to prevent: Hosting the .SWF on another site (after an illicit download), and Preventing the .SWF from opening if included in an iFrame on another site While allowing: A whitelist of sites to be passed through/enabled without me having to define all the variations of a URL (ie: www.abc.com, abc.com, abc.com/game/, games.abc.com, etc.) There are commercial applications that

AS3 Delete child node from XML by child value

十年热恋 提交于 2020-02-03 05:27:37
问题 I've got an XML with a structure like the following; <items> <item>5</item> <item>3006</item> <item>25</item> <item>458</item> <item>15</item> <item>78</item> </items> How do I delete the item with the value 458. Just to clarify this, I don't know the index of that item, so simply calling delete items[index] won't do here. I have to delete by value. Any hints? 回答1: Using e4x filtering and the possibilities of using function inside the filter you can delete the node you want : xml.item.(text()

Draw 2 parallel lines between any 2 coordinates on the stage in AS3

不羁岁月 提交于 2020-02-02 13:00:52
问题 I am developping a web application, basically its a simple version of Illustrator/Flash. So soccer trainers can make schemes. I made different tools like in Photoshop (line tool, rectangle tool, ..). All of these work. However now i need to develop a tool where the user can draw a double parallel line . I would like to be able to define the distance between those 2 lines in a variable . I need to draw 2 parallel lines between any 2 points on the stage. Like the line tool in Photoshop

Flex: Listening for 'Hover' over Link in text area

前提是你 提交于 2020-02-02 03:13:12
问题 I am trying to find out when a link is 'hovered over' in a text area showing html text. I wonder if listening for a cursor change kind of event might be the way. I can't find anything in the docs. Has anyone any idea what event I could listen for here? Thanks 回答1: That's a very interesting problem. Using Cay's suggestion, I thought of a method that would return an Array of Rectangle objects, coresponding to the locations of the text. I'm using the plural because there can be multiple

How to delete all event listeners at once in AS3

天涯浪子 提交于 2020-02-01 04:58:40
问题 I'm making a small game in as3. The game contains 10 levels. When i enter 1 level everything is alright. But when i enter the second level (frame) the event listeners from the first frame are still working and a recieve a warning saying ' Cannot access an object of null objct reference'. This is because i delete every object of the first level and th add the objects from stage 2. I've tried using removeEventListeners, but it doesn't work, cause ENTER_FRAME Listeners work one more time after I

as3 Air for Android downloading and saving remote files

不羁岁月 提交于 2020-01-31 18:13:06
问题 The Code below downloads an mp3 to your phone from a server using as3 Air For Android. I want to use these files later in the app so I have the following question: How can I make it so the files save to a particular folder in the android app rather than a box opening for the user to choose a location? import flash.net.FileReference; /// It can be an mp3,jpg, png, etc... just change the url /// and the extension name. nice huh? var yourFileLocation = "http://YourWeb.com/YourSong.mp3"; var

AS3 Grammar: Most accurate

房东的猫 提交于 2020-01-31 05:12:19
问题 I'm looking for an accurate AS3 grammar (format in not an issue, but I presume ANTLR will feature the most) to use for a practice grammar I'm making. What is the most accurate grammar available for AS3? 回答1: I think this one is pretty accurate if you are looking for an ANTLR grammar: AS3.g This grammar has been originally developed a couple of years ago by Martin Schnable and then extended for the Meta-AS project. There are of course other ActionScript 3 parsers available as well, but they do