actionscript-3

Flash duplication of an Object - Cloning library?

Deadly 提交于 2020-01-13 11:14:52
问题 This is probably a very simple question, I just don't have the foggiest how to go about it. I have an Object that I want to duplicate, and don't know how to go about it. Here's my attempt: var myObj = new ObjectClass(); var duplicate = myObj; duplicate = null; myObj.function(); // Error: Null reference The ObjectClass is very large, inherets and creates children of it's own, and I'm sure there's probably a few singleton classes in there. Is there a way to duplicate something easily? Edit:

Flash duplication of an Object - Cloning library?

时光总嘲笑我的痴心妄想 提交于 2020-01-13 11:14:00
问题 This is probably a very simple question, I just don't have the foggiest how to go about it. I have an Object that I want to duplicate, and don't know how to go about it. Here's my attempt: var myObj = new ObjectClass(); var duplicate = myObj; duplicate = null; myObj.function(); // Error: Null reference The ObjectClass is very large, inherets and creates children of it's own, and I'm sure there's probably a few singleton classes in there. Is there a way to duplicate something easily? Edit:

Playing AAC (ADTS) file with Netstream Appendbytes

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-13 07:20:52
问题 I want to know if it's really possible to play an AAC (ADTS header) file with Netstream.appendbytes. I'm talking about files that end .aac not AAC audio inside M4A or MP4 containers. I'm aware Netstream can't parse ADTS headers etc so I already have a class for parsing the data and gives back correct info such as channels, bitrates, framelengths etc. Putting this together gives silence: Make FLV header (+ append) ->> Make audio tag header (+ append) ->> now append with raw/headerless AAC

General Password Security && Implementation in Actionscript 3

陌路散爱 提交于 2020-01-13 07:15:23
问题 My project for this summer is to make a multiplayer online flash game. I could use some advice as I've never implemented a secure login system before, let alone done so in Actionscript. My setup right now is a .swf sending/receiving game data to/from a Java server which communicates with a MySQL database about account info. 1) How should I proceed in general? I was thinking that maybe I should have my .swf encrypt the password, send it, (have my server encrypt it again?), then store it in the

problems with loading embedded swf files in air app

。_饼干妹妹 提交于 2020-01-13 06:53:27
问题 I have a game file which I create using flash cs 5.5. I have another swf file which is hint file which I embedded in that game file. It works fine in pc. I got problems when I tried to load that game file with embedded swf file. I got the following error: SecurityError: Error #3226: Cannot import a SWF file when LoaderContext.allowCodeImport is false. Can anyone tell me why is this happening ? 回答1: I suppose you're working with adobe air for mobile on your android device. In air for mobile,

Flash AS3 - Wait for MovieClip to complete

怎甘沉沦 提交于 2020-01-13 06:15:32
问题 I'm writing some code that (I think) requires sequentially playing MovieClip objects. I would like to be able to leave this at a single frame and using only external source files. The way I wish to use this is to switch between sections of my program. remove current child construct movieclip add new child wait for completion of new child and goto next step Is this posisble? Edit: Other than the ENTER_FRAME method. Running a handler every frame seems wasteful when a signal surely could be sent

JSON in Action Script: how to get the properties and values on a JSON object?

怎甘沉沦 提交于 2020-01-13 04:49:07
问题 supposed i have this JSON, and supposed the properties may change... '{"srcLocation":"pc","filename":"name","fileext":"jpg","url":""}'; first I want to get all the properties on them (srcLocation, filename etc) and using the properties I got I want to get the corresponding value.. how can I do that in action script? 回答1: First of all you need to decode the JSON, probably using as3corelib: var jsonString:String = '{"srcLocation":"pc","filename":"name","fileext":"jpg","url":""}'; var decodedObj

custom AS3 Loader class that uses a custom LoaderInfo class?

回眸只為那壹抹淺笑 提交于 2020-01-12 06:16:26
问题 This is a question specifically about creating a custom Loader class as a followup to How do I modify existing AS3 events so that I can pass data?. If this wasn't the right way to go about this, let me know. I have a custom Loader class and a custom LoaderInfo class. What I can't figure out is how to have the Loader class use the custom LoaderInfo class as it's contentLoaderInfo property. package com.display { import flash.display.Loader; import com.display.CustomLoaderInfo; public class

Multiple Inheritance in ActionScript 3

耗尽温柔 提交于 2020-01-12 03:36:29
问题 Multiple Inheritance in ActionScript 3? Is it possible? I have read somewhere that it is possible in as3. If yes then how? this is my Doucument Class A.as package { import flash.display.MovieClip; public class A extends MovieClip implements B { public var value1:Number=10; public function A() { trace("A Class Constructor"); } public function hit():void { trace(value1+' from hit'); } } } Another is interface B.as package { public interface B { trace(' interface '); function hit():void; } }

Asynchronous function call in Flex

萝らか妹 提交于 2020-01-12 01:37:59
问题 Is it possible to call a function asynchronously in Flex? I want to parse a file at regular intervals without blocking the rest of the application, what is the recommended approach for this? 回答1: Actionscript doesn't support multithreading, which I think is what you are really asking about here. While the functionality isn't inherent in actionscript (or Flex) you could set up a mock system using events and timers. I'm a little unclear on your exact question, so I'll give two answers: 1) You