actionscript-3

AIR and sqLite : if table exists conditional

余生长醉 提交于 2019-12-22 11:08:41
问题 How do I get a Boolean value in AS3 whether a table or an entry exists in the database? 回答1: As opposed to finding it manually with SQL you should use the built in Schema information classes/functions. Here is an example of how it would work. public function doesTableExist(connection:SQLConnection, tableName:String):Boolean { connection.loadSchema(); var schema:SQLSchemaResult = connection.getSchemaResult(); for each (var table:SQLTableSchema in schema.tables) { if (table.name.toLowerCase() =

is it possible to use flash sockets and websockets simultaneously with socket io?

别说谁变了你拦得住时间么 提交于 2019-12-22 10:53:49
问题 I have been struggling with this for some days now, trying to find information everywhere but I couldn't solve it. Basically, I have a flash client app and a browser - chrome based app connected to a socket io - nodejs serve instance. As you know, Chrome works over websockets and my flash app works over flash sockets. Everything works well between chrome and node, but when I make any interaction from my flash app, that degrades the connection type to flash sockets instead of websockets making

Stage resizing and getting the right variable

家住魔仙堡 提交于 2019-12-22 10:39:55
问题 In my Flash Application (AS3), I want to get the stage size and use that so my objects (which the user controls) can't go outside of the screen. However, when I use: stage.stageWidth; stage.stageHeight; The values I get aren't actually what I want. They give me the stage size, but if I resize the window, the numbers change as well. Now, in a html page, I don't think that will matter, because the user can't resize it... however, I'd like for it to be more solid than relying on the window size.

Android App ID prefix problem

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 09:56:30
问题 I am building an Adobe Air for Android App and I have a big problem, i published an app to the android market using an old flash air extension that saved the app id with a prefix 'app.' Now that i have upgraded the extension it now saves the app id with a prefix 'air.' What this means is that I can no longer publish updates to my applications; so what can I do? The problem with using the outdated extension is that after publishing the update the user is not able to open the app until the

Reading JPG into BitmapData in ActionScript 3 (JPG is inside APK file)

坚强是说给别人听的谎言 提交于 2019-12-22 09:49:00
问题 I'm using Adobe AIR to make APK file for my Android phone. Inside the APK package there is a SWF file and in the same folder as the SWF file there is a subfolder named "images", which contains image.jpg. I'm trying to read that image.jpg into the program at runtime but can't get the location of it (the program doesn't seem to find it. Here's what I'm trying: var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete); loader.load(new URLRequest(

Load xml file in flex before application start/initialises

余生颓废 提交于 2019-12-22 09:31:19
问题 I've got a configuration xml file that I need to parse for values before a flex application laods. I've created a static class that allows for the values in the xml config file to be retrieved. I'm initialising this class when the application first loads but as the xml file is loaded with a Loader class that loads a synchronously the class is being asked for values before the xml file is actually loaded - so it is throwing a error. Is there a way to load this xml file synchronously or can

How can I detect the Android OS version in Adobe AIR?

不羁岁月 提交于 2019-12-22 09:18:05
问题 On iOS, Adobe AIR's Capabilities.os may be something like "iPhone OS 5.1.1 iPad3,1 " - very clearly identifying the OS version as well as the device model. On Android, it looks more like " Linux 2.6.35.7-59465-g42bad32 ". Wikipedia lists the following Linux kernels for android versions: 2.6.29: 1.6, 2.0, 2.1 2.6.32: 2.2x 2.6.35: 2.3x 2.6.36: 3.x 3.0.1: 4.0x Are these set in stone or will some systems report different Linux versions? Is there a better way to determine Android OS version using

AS3 USB game controller support

有些话、适合烂在心里 提交于 2019-12-22 09:12:09
问题 How can I make a USB controller control my AS3 game. I'm using the keyboard right now and I have thought about mapping the keys but I have to use a plugin for that and I just want users to be able to buy a simple controller that doesn't need any driver downloads/configuration. They should be able to plugin the USB controller and play the game through Flash Player in a browser. 回答1: One possibility... you can tell your users to download joy2key. http://electracode.com/4/joy2key/JoyToKey

How to find the ip address in as3?

徘徊边缘 提交于 2019-12-22 08:53:22
问题 Ii am trying to find the ip addres by using as3 in adobe Flash professional cs5. I don't how to do this. Is it possible to find the Ip address using as3? 回答1: No, it is not possible from AS3 without using any server side technology. You can use a loader and load something like http://whatismyip.org/ to get the IP. But without any server (i.e. from pure flash) it is not possible. 回答2: Setting Air 2.5 Target output in CS5 is the way of getting ip address. import flash.net.InterfaceAddress;

Looking for CSS parser written in AS3

▼魔方 西西 提交于 2019-12-22 08:35:48
问题 I need to load and apply CSS at runtime in my Flex app. I know that the adobe docs say that you need to compile the CSS before loading it but I would like to find a work around. I know that you can set individual styles like this: cssStyle = new CSSStyleDeclaration(); cssStyle.setStyle("color", "<valid color>); FlexGlobals.topLevelApplication.styleManager.setStyleDeclaration("Button", cssStyle, true); I was planning on parsing a CSS file and appling each attribute as above. I was wondering if