actionscript

Get ExternalInterface definitions in Javascript

雨燕双飞 提交于 2019-11-30 07:09:12
Is there a way to get a list of the exposed functions from a Flash object? For example, you could get a list of all methods in an object by executing: for (var i in object) { if (typeof object[i] == "function") { console.log(i); } } The only issue is that this won't expose any methods registered through the ExternalInterfaces API. I can try and see if the function exists ( object['method'] ) and it tells me it is a function, but I would have to guess every existing method in this manner. NOTE: Obviously, I don't have access to the actionscript. Just hit this question, a tad to late it seems,

Hidden features/tricks of Flash development, Flash language (AS2/3), and Flash IDE [closed]

我怕爱的太早我们不能终老 提交于 2019-11-30 06:13:23
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Guys, I am thoroughly surprised that there is no Flash Hidden Features post yet in the Hidden Features series that I've been tracking

What tools do I need to develop in ActionScript (in Linux)

折月煮酒 提交于 2019-11-30 04:48:23
I've never developed Flash before but I have a project where I want to use an ActionScript 3 library and I'm not sure what tools I need to start. To further complicate things my main development box is an Ubuntu box. Are there any necessary packages I need to install? Or any .deb 's I can buy? A Windows or Mac box. :-) just kidding, actually you can use the Flex 3 SDK mentioned above and compile using the CLI. If these AS3 Libraries are indeed Flex libraries (sometimes there are discrepancies between what works in Flex, what works in CS3, and what works in both) then you should be able to

How to implement the Adobe HTTP Streaming spec without using their Streaming server

寵の児 提交于 2019-11-30 02:31:41
As of Flash 10.1, they have added the ability to add bytes into the NetStream object via the appendBytes method (described here http://www.bytearray.org/?p=1689 ). The main reason for this addition is that Adobe is finally supporting HTTP streaming of video. This is great, but it seems that you need to use the Adobe Media Streaming Server ( http://www.adobe.com/products/httpdynamicstreaming/ ) to create the correct video chunks from your existing video to allow for smooth streaming. I have tried to do a hacked version of HTTP streaming in the past where I swap out the NetStream objects

WebSockets vs raw TCP sockets in Flash

China☆狼群 提交于 2019-11-29 23:06:04
What WebSockets add to raw TCP connection? Why should I use WebSockets? I'd like to hear cons and pros like: Good: WebSockets add some useful things like autoreconnection, session ids, etc. Bad: WebSockets add a lot of overhead I'll have only Flash clients, no need to support Javascript clients. kanaka You can't do raw sockets from a web application in a browser. Even "raw" socket connections from Flash are not really raw because you have to answer a policy file request to get CORS security (part of the reason for the WebSockets handshake). After the initial WebSocket handshake, WebSocket

Most useful ActionScript packages / libraries

╄→尐↘猪︶ㄣ 提交于 2019-11-29 19:06:35
What are some useful plug-ins, packages or source-code for ActionScript? Please include ActionScript version, name, link and description. Unreality Common libraries: http://casalib.org/ http://code.google.com/p/as3corelib/ Physics Engines: http://box2dflash.sourceforge.net/ http://www.cove.org/ape/ Flash 3D engines: http://away3d.com/ http://papervision3d.org/ http://alternativaplatform.com/en/ http://www.flashsandy.org/ Tweening: http://greensock.com/gsap-as/ http://www.gskinner.com/libraries/gtween/ Graph/Chart + Particles: http://flare.prefuse.org/demo/ Chart: http://pullmonkey.com/projects

Re-dispatching event in FLEX

牧云@^-^@ 提交于 2019-11-29 17:45:53
问题 In a FLEX app, I am trying to "re-dispatch" a custom event. I.e. component1 does dispatchEvnet(event), component2 registers a handler for the event, the only function of the handler being, again, dispatch(event). Finally, component3 listens for the event coming out of component2. What I am trying to do is similar to the concept of "re-throwing" exceptions (and for similar reasons). The difference is that re-dispatching does not seem to work in AS3 (Flash 10). In IE, nothing happens, and in

Why when I Update a 2 dimensional Array it give an “Error #1010”

怎甘沉沦 提交于 2019-11-29 17:43:06
In my programming class, I need to create a Tiles game with AS3 (like zelda). On a map, the tiles are initialised black in an array and, after that, they are changing randomly each time the leftpick of a song reach a certain value. When the tiles change, I need to update the Array with the new value. Actually, I always get an Error #1010: A term is undefined and has no properties. This is how the tiles are initialised: variable private var grid: MovieClip; private var nbRow: int = 6; private var nbCol: int = 12; private var oneTiles: Tiles; private var t: Tiles; public var tMap: Array = [ [1,

get string representation of a variable name in as3

本秂侑毒 提交于 2019-11-29 17:05:59
any way of doing this is as3? for example, if I have a var dog:String , how can I get "dog" out of that variable? Looking into reflection to do this, but there's got to be an easier way -- A Hope this helps. class A { var dog:String = "something"; var cat:String = "eatdog"; } function getVars(obj:*):void { for(var i:* in obj){ trace( i + " : " + obj[i]); // this will trace all properties of object. // dog : somthing // cat : eatdog } } joncys First of all if it's an instance of a custom class, you can override the toString() method. If it's a property of the class, you can use this method —

calling a Flash ExternalInterface with JavaScript

自古美人都是妖i 提交于 2019-11-29 17:05:26
I'm trying to call a function declared with ExternalInterface in a Flash swf, using JavaScript. It worked once, but all of a sudden, it stopped working. I have a debug version of the Flash Player, but no errors occur in Flash. Not even a "Security Sandbox Error" or something. The only error I get is the following error in JavaScript Error: Error in Actionscript. Use a try/catch block to find error. I'm using AS3, exporting for Flash Player 10 and testing on Firefox 3/Safari 4, on a Mac. Any assistance would be greatly appreciated. Check out ExternalInterface.marshallExceptions . It should