actionscript

Return focus to Editor after clicking a button in floating window of MAC

旧街凉风 提交于 2019-12-04 19:26:01
I have created a virtual keyboard library in adobe flex. I have already created an ANE for Windows to set the keyboad always on top and non focusable. Using: int exstyle = GetWindowLong(hwnd3, GWL_EXSTYLE); exstyle |= WS_EX_NOACTIVATE; But now I have to create an ANE for the mac (OS 10.7) I have to access the keyboard (keywindow) from the running flex application Set it always on top and non focusable(even if I click on the keys or select keyboard language from combobox of the keyboard it will not get focused). So that the cursor will always stay in the editor. I have tested a sample mac

as3 get zip file on phone from app - file path then unzip

纵然是瞬间 提交于 2019-12-04 18:27:47
The following code when run in air works great on the desktop. It allows you to select the file and unzip it and write it. However, when I run it on my phone only "Audio", "Video" , "Images" files become avail able and I can't access a zip file I want to unzip from my phone. Here is the full code: import com.coltware.airxzip.ZipEntry; import com.coltware.airxzip.ZipError; import com.coltware.airxzip.ZipFileReader; import com.coltware.airxzip.*; import flash.filesystem.File; import flash.utils.ByteArray; import flash.net.FileReference; import flash.net.FileFilter; import flash.filesystem

Actionscript 3: Slice a Bitmap into tiles

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 18:23:42
I have the Bitmap data from a Loader object and I would like to slice it up into 32x32 squares to use as tiles. What is the most efficient way to do so? I have done the work for you. The basic idea is to use the BitmapData function copyPixels, see Adobe Reference for the same . It lets you copy pixels from one region(specified by a Rectangle) in the source BitmapData, to a specific Point in the destination BitmapData. I have created a new BitmapData for each 32x32 square and looped through the loaded object to populate the squares with copyPixels. var imageLoader:Loader; function loadImage(url

Flash actionscript - save a text file on server

↘锁芯ラ 提交于 2019-12-04 18:17:48
Good day to all. I have a little problem. Can anyone tell me or give a link or something on how to save a text file on the server with some data a user inserted? I need to do this: I have a text box and after pressing enter I need to create/append a file with a log of what a user entered. I have created the box, add listener but I don't know how to create the file. Thank you for help. Use flash.net.URLRequest to send the data to a script on the server that saves the data to a file. The Flash Player cannot access the server directly, as it runs on the client computer, so you need to do it that

KEY_UP event of ctrl key blocks KEY_UP event of 'c' key

痞子三分冷 提交于 2019-12-04 17:47:24
I am trying to capture Ctrl + C . I have noticed that many times, there is no KEY_UP event for C key. I believe it happens in cases KEY_UP event for C key should be thrown just before or after KEY_UP event for Ctrl key. Why does this happen? How can I catch the KEY_UP for C key? Eugene Everything works fine: <?xml version="1.0" encoding="utf-8"?> < s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"> <fx:Script> <![CDATA[ protected function myButton_keyUpHandler(event:KeyboardEvent):void { myButton.label="

Algorithm to determine Daylight Saving Time of a date?

送分小仙女□ 提交于 2019-12-04 16:14:55
Originally I am looking for a solution in Actionscript. The point of this question is the algorithm, which detects the exact Minute, when a clock has to switch the Daylight Saving Time. So for example between the 25th and the 31th of October we have to check, if the actual date is a sunday, it is before or after 2 o'clock... There is no real algorithm for dealing with Daylight Saving Time. Basically every country can decide for themselves when -and if- DST starts and ends. The only thing we can do as developers is using some sort of table to look it up. Most computer languages integrate such a

iOS TextInput displayAsPassword doesn't displayAsPassword

元气小坏坏 提交于 2019-12-04 16:10:57
I'm building an app to launch across Android, iOS, and desktop simultaneously. The app includes a login that is attached to a vBulletin system and I've run into a significant issue (that the client is adamant must be fixed). On iOS, if you are typing in a TextInput that has its displayAsPassword set to true, it will show plain text while typing. Once you click out of the TextInput, it displays properly. Here is the code I am using within Flex <s:TextInput id="inputField" width="100%" styleName="loginFields" text="Password" focusAlpha="0" focusEnabled="false" autoCorrect="false" /> I then

Create Linked List in AS3

允我心安 提交于 2019-12-04 16:00:52
how can I create a linked list in actionScript 3.0? I have a project that I should get some integer numbers from the user and sort them by a tree algorithm for example heap-sort and show the tree in flash, I think I should use linked list to sort the data by tree algorithms. so anybody know how can I create a linked list which I can insert nodes, delete nodes and pass over the nodes, just like C++ linked list. Thanks. SA You can use or take as an exmaple as3Commons linked list implementation . They provide very beautiful implementation with very good abstraction layer. If you have access to

ActionScript event handler execution order

怎甘沉沦 提交于 2019-12-04 15:24:50
问题 I have been trying to understand the way ActionScript's events are implemented, but I'm stuck. I know that AS is single threaded, which means that only one event handler will be executing at a time, and also means that handlers will be executed in a deterministic order*. For example, consider the following code: 1: var x = {executed: false}; 2: foo.addEventListener("execute", function(){ x.executed = true; }); 3: foo.dispatchEvent(new Event("execute")); 4: assert(x.executed); If ActionScript

Accessing an ActionScript function via Javascript

与世无争的帅哥 提交于 2019-12-04 13:43:26
问题 I'm trying to call a function in an action script using the ExternalInterface.addCallback API, but I can't seem to get it to work. Here's what I have: ActionScript: //MyClass.as package { import flash.display.Sprite; import flash.external.ExternalInterface; public class MyClass extends Sprite { public function MyClass() { ExternalInterface.addCallback('getStringJS', getStringAS); } public function getStringAS():String { return "Hello World!"; } } } NOTE: I'm compiling this into an swf using