actionscript-3

flex 4 title window + custom component + skin problem!

白昼怎懂夜的黑 提交于 2019-12-24 16:17:02
问题 I'm trying to put my components in a window container that can be closed by "x" moved on the stage, resized and so on. And I wonder which is the best way to do it. I want to use a skin class and the component class. The "solution" that is not working looks like this: take a look at this and if you have a better idea on how to implement this, you are welcome. (: thanks a lot! I have in the main app: // imports... public function init():void { // runs on creationComplete event PopUpManager

AS3: Copying a Loader from one object to another

杀马特。学长 韩版系。学妹 提交于 2019-12-24 16:12:59
问题 I have two classes, call them A and B. They both contain a Loader object. In class A I load content into the Loader object. public class A { var loader:Loader; public function A():void { loader = new Loader(); this.addChild(loader); loader.load(...); } } public class B() { var loader:Loader; public function B():void { loader = new Loader(); this.addChild(loader); } } I need to now assign A's Loader to B's Loader (after the load is complete). In some other class I have an instance of A and B.

Approaches of detection of custom protocol in chrome and Safari browsers

一世执手 提交于 2019-12-24 16:06:11
问题 What could be the best way the detecting the custom protocol (like foo://) in Safari and chrome browser. I was looking at the following options: Browser extension which can check the existence of custom protocol invoker software. (Not sure if it is possible and how to do it) Browser plugin or java applets( since NPAPI is now going to deprecated so probably this will not be good idea). Flash Action script with java script(since Flash is sand boxed then again it seems not good idea to use it)

ActionScript: what's the defined order for initializing internal/static/instance variables?

你离开我真会死。 提交于 2019-12-24 15:53:25
问题 Consider a .as file which looks like this: package foo { class Foo { public static var a:* = getA(); public static var b:* = getB(); public var c:* = getC(); public static function d():* { ... } public function Foo() { trace("initializing"); } } } // internal functions/variables var e:* = getD(); function f():* { ... } What is the defined order for initializing each of the variables/functions a..f ? (I know I can do experiments to find out… But I'm looking for the actual specified definition)

Nested Functions, how are they garbage collected in flash actionscript 3?

旧城冷巷雨未停 提交于 2019-12-24 15:48:50
问题 I have a very complex function in as3. The function is composed of many other functions which are nested inside of it. The main function has variables and all it's nested functions also have their own variables. Some of the nested functions are called by events that were added in the main function or in another nested function. Now I want to know, when will my main function be garbage collected? When will the code be out of the main function? And when will the variables and the events and the

How to automatically delete Event Listener from an object in AS3

血红的双手。 提交于 2019-12-24 15:45:08
问题 I am working on small flash game. The game contains 20 levels and main menu. The transition between levels is made by deleting every object on the frame and also all event listeners. Then the code adds objects from the next level... Catching and the removing event listeners is done by this code: override public function addEventListener(type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void { super.addEventListener(type, listener,

Summary of ActionScript 3 strict mode

假如想象 提交于 2019-12-24 15:41:26
问题 Where can I get a summary of differences between ActionScript 3.0 strict and standard mode? In other words, what are the things I can do in standard mode but not in strict mode? 回答1: Damn, I was trying to remember all night long where I've seen theses differences and I suddenly had a total recall in the shower this morning :p http://books.google.fr/books?id=gUHX2fcLKxYC&pg=PA135&lpg=PA135&dq=essential+actionscript+3.0+compiler+standard+strict&source=bl&ots=cuTT2kfUE-&sig

How to tell if Flash AS3 is running in desktop or mobile browser

前提是你 提交于 2019-12-24 15:39:54
问题 I am developing a full-Flash site (Player 10.2). I need to know at runtime if code is running on a desktop/mouse computer or a mobile/touch device, so that I can differentiate the input mechanism. Is this by any means possible? 回答1: How's flash.system.Capabilities.version look? 回答2: Use flash.system.Capabilities.os to check. 回答3: For AIR 3.9: Capabilities.manufacturer returns "Adobe iOS" on ipad2, "Android Linux" on Galaxy s4. Capabilities.version returns "IOS 11,9,900,117" on ipad2 and "AND

how to allow javascript to communicate with flash (Object #<HTMLObjectElement> has no method

寵の児 提交于 2019-12-24 15:16:53
问题 I'm trying to send a simple test message from javascript to flash, but I'm getting the error: Object #<HTMLObjectElement> has no method "listenToJS" I've read a number of questions on this on stack, but I feel like either the browser is not getting the proper reference to my flash object, or within my actionscript I am not putting my flash function in the proper place. So within html I am embedding flash with SWFObj: <div id="flash_content"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8

{FlashDevelop} Building iOS with AIR and FlashDevelop

你离开我真会死。 提交于 2019-12-24 15:14:10
问题 I'm having trouble using the following tutorial and flashdevelop template to build a flash project for iOS. http://www.codeandvisual.com/2011/exporting-for-iphone-using-air-27-and-flashdevelop-part-four-creating-an-air-certificate-and-compiling-to-ipa/ Whenever I compile my project (using FlashDevelop 3.3.4) I get an error from adl.exe saying "Error loading initial content". Using the iOS applicationpackager.bat, I get an error saying: application.xml: error 305: Intial window content SWF