actionscript-2

Why does my SWF file size not decrease when reducing content?

限于喜欢 提交于 2020-02-04 03:25:13
问题 Often I find if my SWF file size is on the large side, when deleting media altogether or perhaps deleting and re-inserting compressed versions of images, sound etc, it has little or no effect on the resulting SWF's file size. I have tried deleting the SWF to allow Flash to recreate it from scratch but it makes no difference. Has anybody else experienced this and/or know of a solution? Thanks. 回答1: Make sure you are deleting all your references to the files in your library. For example, if you

Procedurally accessing a function's parameter list in actionscript 2.0

不想你离开。 提交于 2020-01-24 17:23:05
问题 I can already get at all of the functions in a class by doing something like the following. for (var member in obj) { if (obj[member] instanceof Function) { var f:Function = obj[member]; ... } } Is there a way to get at a function's parameter list in actionscript? For example, can I write a function that does something like this? function getFunctionArguments (f:Function) : Array { var argumentArray:Array = new Array(); for (...) { ... argumentArray.push({ name:<argumentName>, type:<argument

What is the best way to implement google analytics tracking for Actionscript 2?

我的梦境 提交于 2020-01-17 03:13:45
问题 I am looking for code, examples, library, components for using google analytics event tracking with my Actionscript 2 Flash movies. I can find info about AS3 on the google code site but not AS2. What is the best resource for tutorials and examples about tagging my Flash files to use the asynch google analytics code. I have found some old information about the old google analytics code. thanks 回答1: I've had to do a lot of mainenance on AS2 projects, so I know where you're coming from. Here's

How can I load a Fusion Tables csv from a client application?

和自甴很熟 提交于 2020-01-15 12:37:08
问题 I was just playing with Google Fusion Tables and I was wondering how I could load a csv from the client side. So far I've tried several options: From actionscript 3.0: var r:URLRequest = new URLRequest("https://www.google.com/fusiontables/exporttable?query=select%20*%20from%203685185%20"); r.method = URLRequestMethod.GET; var l:URLLoader = new URLLoader(r); l.addEventListener(Event.COMPLETE,loaded); l.addEventListener(HTTPStatusEvent.HTTP_STATUS,onHTTPStatus); function onHTTPStatus(event

Flash ActionScript 3 capabilities lacking in ActionScript 2

我的未来我决定 提交于 2020-01-11 07:32:08
问题 Ever since Adobe introduced ActionScript 3 with Flash Player 9, many of us have been slow to switch over. In short I'd like to know what AS3 as a framework can do, that is simply impossible or significantly difficult in AS2. I'm not talking about readymade components, but built-in classes such as for web remoting, binary data manipulation, XML handling, etc. 回答1: well, actually, AS3 is a language, not a framework ... the flash player API has framework like traits ... but ok, let's not argue

Class property looses scope AND can't be set after setTimeout

爷,独闯天下 提交于 2020-01-07 06:57:13
问题 Here's a very simplified version of my project. I have a class file: class MyClass{ public var myNumberStoredInClass:Number; // constructor function MyClass(myNumber:Number){ this.myNumberStoredInClass = myNumber; }; // some method function DoStuffMethod(){ trace(this.myNumberStoredInClass); }; }; // end class I have a normal .as file from which I can access this.myNumberStoredInClass with no problems with MyClass.myNumberStoredInClass until I call setTimeout for a method in the class:

AS2(!) : best crossbrowser way of calling javascript functions?

家住魔仙堡 提交于 2020-01-06 20:24:44
问题 I have a AS2 project here that makes some troubles on certain browsers. Can someone tell me, what's the most crossbrowser compatible way to call javascript functions out of a AS2 project (compiled for Flashplayer 8)? GetURL or ExternalInterface.call? What to pay attention to? Sorry if the question is somewhat ambiguous, but i don't want to track a specific bug, just to find another one appearing with some other browser then. thanks! 回答1: I've used both without any issues in a wide range of

Anyone able to translate sIFR into AS3 (for hyphenation and with the help of a converter)?

[亡魂溺海] 提交于 2020-01-05 04:12:09
问题 One thing asked for a lot with sIFR is hyphenation. Now I almost solved it with integrating Hyphenator.as http://vis4.net/blog/2010/05/as3-hyphenation/. The only problem is that Hyphenator.as is written in AcionScript 3, while sIFR is in ActionScript 2. I found an AS2 to AS3 converter www.5etdemi.com/blog/archives/2006/11/as2-to-as3-converter-createtextfield-geturl-handling/ but the result examples.bezel.be/sIFR-as3.as is not working yet. Anyone able to contribute to making hyphenation work

Mix multiple sounds in flash

末鹿安然 提交于 2020-01-02 10:20:55
问题 I have several sound objects in flash, I would like to mix different points in these sound files to create a single masterpiece and save it as an mp3. I've seen various "mixer" applications online and would like to know what area(s) to look at to be able to do this myself. 回答1: To create the music or whatever you're trying to create, you'll have to Import your wav and mp3 files into your library and drag them onto the movie area to add them to your timeline. Use multiple layers to help

Best practice for ActionScript 2 events - is there a way to simulate ActionScript 3-style events?

橙三吉。 提交于 2020-01-01 02:51:26
问题 I love the AS3 event model - it helps keep my code clean and lossely coupled. When I used to work on AS2 projects, my code was not so neat and classes were more reliant on one another. Due to AS2's strange handling of scope I never really got on with the AS2 event system. As I still occasionally have to work in AS2, my question is: Has anyone managed to simulate the AS3 event API in AS2, and if not, what is the best practice for listening to and dispatching events and handling scope? 回答1: Its