actionscript-3

Array subclasses cannot be deserialized, Error #1034

懵懂的女人 提交于 2019-12-23 23:48:07
问题 I've just found a strange error when deserializing from a ByteArray , where Vector s cannot contain types that extend Array : there is a TypeError when they are deserialized. TypeError: Error #1034: Type Coercion failed: cannot convert []@4b8c42e1 to com.myapp.ArraySubclass. at flash.utils::ByteArray/readObject() at com.myapp::MyApplication()[/Users/aaaidan/MyApp/com/myapp/MyApplication.as:99] Here's how: public class Application extends Sprite { public function Application() { // register

How do I manage library symbols with linked classes in Flash CS4 to compile/debug in Flash Builder 4?

这一生的挚爱 提交于 2019-12-23 23:19:57
问题 I'm building a video player using Flash CS4 (hereby referred to as "Flash") to create the graphic symbols and compiling and debugging with Flash Builder 4 ("FB4"). Here are the steps I take in my current workflow: --Create the graphic symbols in Flash. I've created a few different symbols for the player, but I'll focus on just the play/pause button ("ppbutton") here. --In the Library panel, I go to the ppbutton symbol's Linkage properties and link to a class named assets.PlayPauseButtonAsset

Drag, Drop and Clone - Flash AS3

假装没事ソ 提交于 2019-12-23 22:28:48
问题 I am a teacher trying to make a simple Flash AS3 game where students can drag any letter from a-z(movieclips) out to the middle of the stage to create words. I am a total amateur with Flash and so using code snippets, I have been successful in allowing users to drag and drop letters but what I would really like is for users to be able to drag and drop a letter leaving the original letter movieclip in place and clone a new one as many times as is necessary. Is anyone able to help me with the

TypeError: Error #2007: Parameter child must be non-null

元气小坏坏 提交于 2019-12-23 22:21:48
问题 I am running the following piece of code: package { import fl.controls.Button; import fl.controls.Label; import fl.controls.RadioButton; import fl.controls.RadioButtonGroup; import flash.display.Sprite; import flash.events.MouseEvent; import flash.text.TextFieldAutoSize; public class RadioButtonExample extends Sprite { private var j:uint; private var padding:uint = 10; private var currHeight:uint = 0; private var verticalSpacing:uint = 30; private var rbg:RadioButtonGroup; private var

reference variable AS3

女生的网名这么多〃 提交于 2019-12-23 22:13:26
问题 I am trying to create a simple AS3 code in Flash Professional CS6 which references a variable. Example: var1:int = 1; varref = "var1"; (this is the "reference" variable, but ofcourse this is not how it's done in as3) if (var1 == 1) { varref = 50 } If this is run, it would try to make the string from the variable varref which is currently "var1" into an int of "1'. I want it to reference the variable, not be a variable of it's own. A simple example of how to do this would be great. (From what

Haxe — Embed files like in ActionScript?

主宰稳场 提交于 2019-12-23 21:07:42
问题 In ActionScript, you can do something like this: [Embed(source = "src/myfile.xml", mimeType = "application/octet-stream")] private var xml : Class; and it will embed your file to be used in code. How can i do something similar in Haxe? 回答1: Haxe allows you to provide external resources info for embedding in hxml. You may refer to the doc. 回答2: Things have changed since the time the question was asked. With a modern version of haxe one can do: @:bitmap("test.png") class TestBMD extends

External Config file in Actionscript 3

岁酱吖の 提交于 2019-12-23 20:55:08
问题 I need to be able to load external configuration files into my flex app. I've read that this is possible using embeds, so long as the mimeType is set to application/octet-stream. package learning { import org.flixel.*; public class PlayState extends FlxState { [Embed(source = "../../data/tiles.png")] private var _tiles:Class; [Embed(source = '../../data/map.txt', mimeType = "application/octet-stream")] private var ExternalMapData:Class; public var txt:FlxText; public var player:FlxSprite;

Inviting facebook friends in Air app for iOS

孤人 提交于 2019-12-23 20:12:35
问题 I'm working currently on an Air app for iOS and i have some hard time trying to make "invite friends" button. I'm using facebook-actionscript-api 1.8.1 with air 3.3 and I have something like this in my code: invite_button.addEventListener(MouseEvent.CLICK, facebookInvite); private function facebookInvite(e:MouseEvent):void { var dat:Object = new Object(); dat.message = 'I invite you to this awesome app!'; dat.title = 'Super Extra Max Facebook App'; dat.filters = ['app_non_users']; Facebook.ui

ASC2.0 and Frame metatag

雨燕双飞 提交于 2019-12-23 20:11:10
问题 Apparently, the new ActionScript Compiler 2.0 no longer supports the old [frame] metatag which allowed you to add preloaders to pure actionscript projects. I've verified this IntelliJ - switching the "Prefer ActionScript Compiler 2.0 for pure ActionScript build configurations" makes a difference between the preloader being instantiated and executed, and the main class being instantiated and executed. Googling yield no result, so is there currently any way around this issue - use ASC2.0 but

Preloader in actionscript 3 - Reference Error on getDefinition()

穿精又带淫゛_ 提交于 2019-12-23 20:11:06
问题 I'm writing a preloader: package { import flash.display.DisplayObject; import flash.display.Sprite; import flash.text.TextField; import flash.display.LoaderInfo; import flash.events.MouseEvent; import flash.events.Event; import flash.events.ProgressEvent; import flash.system.System; public class Preloader extends Sprite { private var t:TextField = new TextField(); private var ver:String = "1000"; public function Preloader() { t.y = 570; addChild( t ); t.text = ver; addEventListener( Event