actionscript-3

Starling game resolution in multiplataform

…衆ロ難τιáo~ 提交于 2020-01-03 04:18:11
问题 We're building a game in starling, and we want it to be multiplataform, but we found some problems with resolutions, we have designed the game for iPad, and we want it to run in samsung galaxy tab 10.1 and iPhone, The problem we have in SGT 10.1 is that we want to center the content and add an extra background to fix the black tires in the sides, and in iPhone 4, the content is bigger that the screen... do you know a way to solve it? Thanks 回答1: Here is a link that explains how to develop for

Does the workflow differ between Flash Builder and Flash Professional?

ⅰ亾dé卋堺 提交于 2020-01-03 04:10:29
问题 What is the workflow for creating an AIR application in Flash Builder and how does it differ from Flash Professional? I am familiar with Flash Professional, but I'm trying top wrap my head around FB, but I'm coming from a stint in iOS development and Flash Pro is driving me crazy. (I have difficulty with classes mixed with the timeline, but I think that MXML might be a good substitute for the timeline.) (Bonus: What are some good online resources for learning MXML?) 回答1: This is a hard

Does the workflow differ between Flash Builder and Flash Professional?

与世无争的帅哥 提交于 2020-01-03 04:10:08
问题 What is the workflow for creating an AIR application in Flash Builder and how does it differ from Flash Professional? I am familiar with Flash Professional, but I'm trying top wrap my head around FB, but I'm coming from a stint in iOS development and Flash Pro is driving me crazy. (I have difficulty with classes mixed with the timeline, but I think that MXML might be a good substitute for the timeline.) (Bonus: What are some good online resources for learning MXML?) 回答1: This is a hard

PHP send var to AS3 with AJAX or POST

流过昼夜 提交于 2020-01-03 03:51:47
问题 All tutorial i found use some file xml, txt, or php with echo. to give vars to AS3 is there way to do it without echo or file. Say i query PHP page.php from flash with AS3 somehow and process response from page.php var loader:URLLoader = new URLLoader(); var request:URLRequest = new URLRequest("http://mysite.com/test.php"); loader.load(request); loader.addEventListener(Event.COMPLETE, completeHandler); loader.addEventListener(IOErrorEvent.IO_ERROR, loaderIOErrorHandler); loader.dataFormat =

how to create a AS3 dynamic class and how to use it?

↘锁芯ラ 提交于 2020-01-03 02:39:09
问题 What is a dynamic class and what are its uses and how to create and use a dynamic class? Can anyone guide me to a good tutorial please? 回答1: Here You can find basic info : http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/statements.html#dynamic Dynamic class allow You to add additional dynamic params to object in run-time . For example : Sprite isnt dynamic , so You cannot do thing like : var sprite:Sprite = new Sprite (); sprite["value"] = 10; // this will throw

Monitoring file upload progress in Actionscript 3

只谈情不闲聊 提交于 2020-01-03 02:22:09
问题 I'm trying to track the progress of a file upload in AS3, and I'm getting strange behavior. When I select a file and upload it, the progress is instantaneously 100% even if the file is 10 or more megabytes, but it's not finished. The onComplete event is fired about 30 second to a few minutes later (depending on file size) when the file has really finished uploading. I've tested this locally and on the server, the behaviour is the same. Has anyone else experienced this? Very frustrating ...

Override Clone() in custom event for AS3… need help

扶醉桌前 提交于 2020-01-03 01:37:08
问题 I have created a custom even class which is pretty basic. But when calling an event and then relaying that event to another class I have encountered the "cannot transform thisEvent into thisOtherEvent" error. I realize this is because I needed to override the Clone function in my custom event like so: package com { import flash.disply.*; import flash.events.Event; public class MyCustomEvents extends Event { public static const SOME_EVENT:String = "some_event"; public var info:Object; public

Resize images in Flex using as3

跟風遠走 提交于 2020-01-02 21:51:07
问题 I am loading an image using a Loader. Once loaded, I can get the bitmap data using Bitmap(event.target.loader.content).bitmapData . However since the images I am loading are quite large (around 2000 x 1600), I would like to reduce the size and create a new smaller bitmap maybe 200 or 300 pixels wide, sort of like a thumbnail. I think it has to do with creating a new BitmapData with the new size. However I am not able to get that working properly. Any ideas? 回答1: Not tested, but this should

Canvas total width (visible width + hidden scrollable part)

≯℡__Kan透↙ 提交于 2020-01-02 20:25:29
问题 It's probably a no brainer, but I've spent the last 40 minutes or so looking for it to no avial. I have a Canvas control with a fixed width and a horizontal scrollbar. I'm trying to find the actual width of the control. The .width (fixed width) + the part being revealed by the scrollbar. I tried explicitWidth, width + maxHorizontalScrollPosition, and some other combos but non of them hit the spot. 回答1: Well as it seem width + maxHorizontalScrollPosition is indeed enough. The problem was with

Connecting any database directly from flex

徘徊边缘 提交于 2020-01-02 19:37:10
问题 Is it possible to connect any database from flex directly? 回答1: Not unless you use Adobe AIR for desktop at which time you'd be using the SQLLite api's to create/connect to a sqlite database file. http://livedocs.adobe.com/flex/3/html/help.html?content=SQL_01.html Anything else is going to require a back end service to handle such transactions. 回答2: You can use asSQL as mentioned by michael, or use the Adobe Air runtime. However, this must be said about using this library: It is EXTREMELY