actionscript-3

load unknown number of external images without XML

☆樱花仙子☆ 提交于 2019-12-25 05:26:12
问题 I need to know how to load unknown number of images from external folder without using XML help me please, thank you 回答1: So from your comments I'm assuming this is an AIR Application, so you can access the filesystem via File class. First of all, you need to get a File object that points to your folder, the easiest way is to hardcode it. A slightly more complex approach would involve opening a dialog, where the user can select his desired folder (using File.browseForOpen). Let's take the

embedded font flash.text.engine

拥有回忆 提交于 2019-12-25 05:19:06
问题 I've completely run out of ideas on this. It follows, and is part of my previous question: embedding a font in a swf using as3 I just don't seem to be able to get the flash.text.engine to use my embedded font. NB the font has to be loaded into the application (as embedded in swf) after the user has chosen the two languages (for translation to and from). There seems to be a little info implying that it is now necessary to use the fontswf application which is in the sdk. I have tried this and

FlashDevelop AS3 Project: Adding child from other class not visible; Keyboard input doesn't move child visually

不想你离开。 提交于 2019-12-25 05:18:47
问题 I am starting a new project that is done 100% in FlashDevelop as an AS3 Project. To clarify, I am not creating an FLA in Adobe Flash at any point; Adobe Flash will never be used. In the document class of my AS3 project I will need to create and reference movieclips that are set up in separate .as class files. The document class will have eventlisteners that watch for keyboard presses and move the movieclips when required. Movements via the keyboard inputs work fine when the movieclip is set

How to access Function from one script to another script in same mxml

ぃ、小莉子 提交于 2019-12-25 05:15:47
问题 this is one script in my.mxml <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; public function __changeSel():void{ } ]]> </fx:Script> another script in component tag in same my.mxml <fx:Component> <s:ComboBox change="changeSel(event)"> <s:id>selID</s:id> <s:dataProvider> <s:ArrayCollection> <fx:String>Less Than</fx:String> </s:ArrayCollection> </s:dataProvider> <fx:Script> <![CDATA[ public function changeSel(even:Event):void{ __changeSel(); } ]]> </fx:Script> </s:ComboBox> </fx

Transfer bitmap from Flash movie to Javascript

我们两清 提交于 2019-12-25 05:15:46
问题 I would like to know what is the most efficient way to transfer BitmapData object from Actionscript to Javascript, so an image can be displayed on webpage. So far, I've managed to craft a string containing image data using data URI scheme in Flash and then I transfered it to the Javascript using ExternalInterface.call("<function_name>", data) . While it is working fine, it seems wasteful to convert image to its textual representation just to transfer it. Is there a cleaner/more efficient way

How to load xml data and present it across multiple frames in AS3

流过昼夜 提交于 2019-12-25 05:14:24
问题 I'm trying to load data from an xml file, load them in arrays and present words from these arrays in different frames in a dynamic text field. So for example, WordArray[0] will be presented for two frames in the DynText textfield. Following this presentation, WordArray[1] will be presented for four frames in the same text field and then KeyWordArray[0] will be presented for one frame in the same text field, etc. Here is the code I have so far: var xmlLoader:URLLoader = new URLLoader(); var

How to load xml data and present it across multiple frames in AS3

喜夏-厌秋 提交于 2019-12-25 05:14:15
问题 I'm trying to load data from an xml file, load them in arrays and present words from these arrays in different frames in a dynamic text field. So for example, WordArray[0] will be presented for two frames in the DynText textfield. Following this presentation, WordArray[1] will be presented for four frames in the same text field and then KeyWordArray[0] will be presented for one frame in the same text field, etc. Here is the code I have so far: var xmlLoader:URLLoader = new URLLoader(); var

is it possible to run multitouch Flash (AS3) Apps on Microsoft PixelSense (formerly Surface) Table?

旧城冷巷雨未停 提交于 2019-12-25 05:14:10
问题 I'd like to develop a simple multitouch game for a Microsoft PixelSense (formerly Surface) table. So my question is if it's possible to use Flash (ActionScript 3) to create the game or if I have to learn the PixelSense SDK and use Visual Studio - which would cost a lot of time ;) 回答1: Update: Yes, it's possible ;) With the Multitouch capabilities of Flash it's possible to develop for the PixelSense table. 来源: https://stackoverflow.com/questions/11931463/is-it-possible-to-run-multitouch-flash

AS3 Facebook canvas app - need to post image to friend's feed (wall) - can it be done?

眉间皱痕 提交于 2019-12-25 05:12:43
问题 I have a Facebook canvas app, written in AS3, and using the Adobe Facebook API. I can connect, get a list of friends, pick a friend, all that stuff is working fine. The problem is when I try and post to a friend's wall. I am trying to post an image. That's it, just an image. The image is 200x200, which meets the facebook guidlines of not being smaller than 50x50 and outside of a 3:1 ratio. I have searched all over the interwebz for an answer and have tried all examples I can find. I have

(Actionscript 3) Pixel-perfect collision detection between the walls and player?

感情迁移 提交于 2019-12-25 05:12:19
问题 I am trying to make a flash game in which there is collision detection between the player and the walls. However, when I try using Wall11.hitTestPoint(), I cannot get the collision detection to be perfect. Then, I decided to use bitmap but it is hard to code this because the wall is irregularly shaped (it is not a square, rectangle, circle or any regular shape). Is there anyway to improve the collision detection with walls? function checkCollision(_debug:Boolean = false):Boolean { var bmd1