actionscript-2

Opening a swf file from within another swf with different than default values

Hopefully this won't be taken as asking the same question twice... So I'm working on a Flash website (in AS2) which has an outer index swf which loads sub swf files using loadMovie("subfoo1.swf", placeToShowSwf). These in turn load an xml file which tells it what content to load. Everything works peachy, but we'd like to add a button to...

What might cause connection errors when using bidirectional localConnection in Flash?

I'm trying to setup a bidirectional localConnection (LC) between two flash objects on the same web page. One object is AS2 and the other AS3. I'm using one LC object to send and receive data on each swf. (This shouldn't matter, right? I tried using two objects, one for sending and one for receiving, but got the same problem). They .c...

Parsing XML/XHTML in Actionscript

Is there anything similar to getElementById in actionscript? I'm trying to make a prototype of a flash page wich gets it's data from a xhtml file. I want to have both an accessible html version (for search engines, textreaders and people without flash) and a flash version (because the customer insists to use flash even though a html-cs...

How can I make cookies in my Flash application?

How can I make cookies in my Flash application using ActionScript 2.0? ...

Can a NetStream publisher in Flash pause their stream?

I'm working on a webcam video streaming application utilizing Flash 8 (AS2) and Flash Media Server 3. Streaming the video live is fairly trivial, but I want to give the publisher the ability to pause their stream, effectively giving the people watching a snapshot instead of realtime video. NetStream has a pause() method, but the docume...

Test if an object is defined in actionscript

In actionscript, how can you test if an object is defined, i.e., not null? ...

Manipulating the hash/anchor part of the URL in Actionscript

How can you get and set the hash or anchor part of an URL in pure Actionscript? When googling for a solution I've found explainations for doing it using JavaScript, but is it possible to get it without using JavaScript? (I'm using Actionscript 2, I may consider updating the code to AS 3, but it doesn't seem to be a quite straight forward...

Get all named instances in a flash movie

Is it possible to get a list of all instances with a name in a flash movie using actionscript 2. Like an array containing all named text areas, or all movieClip instances etc. I would like to get this so the designer can add or remove text areas etc. and the actionscript can dynamically find these and get the texts from a separate dataso...

How do I set a transparent sprite background in Flash?

I'm playing with this ActionScript which generates a random 'squiggle'. Each time a 'squiggle' is placed, it appears within a sprite with a white background. If I change the background colour of the flash file to pink for example, it would still show up as white. Does anybody know how I might make the sprite background transparent? Th...

Flash Screenshot

We're trying to send an image of a large SWF file to a server to have it mailed out and we're having a bit of trouble with transmission time. The SWF is about 900px x 600px and restricted to AS2 so we've been using this Bitmap Exporter class. We've tried using several different ways to transmit the data; base10, base36 and base128 but ...

From AS2 to AS3 what is the equvalent of _root ?

I'm trying to learn Actionscript 2 or 3, with AS2 I eventually figured by trial and error that I could get any named instance and modify it using a string with its name using var theinstance = "titletext"; // actually exctracted from an array _root[theinstance].htmlText = "New text with <b>HTML!</b>"; but when trying to convert the co...

From AS2 to AS3 loading external images

I'm converting some Actionscript code from AS2 tp AS3, and I've eventually managed to get most of it to work again (it's allmost a totally different language, sharing just a little syntax similarity). One of the last things that still doesn't work, is the code for loading an external image. Perhaps this has changed in AS3 but I really t...

MouseWheel not working when published movie has wmode="transparent"?

I'm experiencing a bug with a published flash movie. When I embed the movie in an HTML page (with SWFObject 2.1), and assing it the wmode param value of 'transparent', all my functions based on the MouseWheel event stop working. The movie is based on AS2. Anyone familiar with this bug? ...

Detecting mouse double-click in Flash (AS2)

Is there a way to detect mouse double-click on a button object using ActionScript 2.0? ...

getUrl without opening window AS2

How do you call a URL from ActionScript 2 without opening a new window ? I've tried "getUrl" and various methods of "LoadVars". ...

Calling ActionScript 2.0 events from another project

I have an ActionScript 2.0 file that contains a small library. This library parses an XML file. I have assigned an onComplete function on the onLoad function of the XML. For example: ------------ mysmalllib.as -------------- r_xml = new XML(); r_xml.onLoad = onComplete; function onComplete(success:Boolean) { // some stuff ...

Using amfphp with Flash CS3 and AS2

All, I've starting experimenting with amfphp. I've gone through a few great tutorials (particularly those by Lee Brimlow at gotoandlearn.com). As long as you're using AS3, it works great, since AS3 includes the built-in NetConnection class. However, I'm looking to use amfphp on a bunch of existing AS2 projects. The problem is that AS...

ReSharper-like addon for the Flash IDE?

Sometimes its necessary to code in AS2 to target Flash Player 8, so we're forced to write within the Flash IDE. Any refactoring tools / plugins available for Actionscript?... Within or without the Flash IDE, that's no problem, as long as it builds for Flash Player 8, AS2. ...

Flash AS2 Command Line compiler capablities

Although the MTASC command-line compiler can compile ActionScript class files into an SWF, I need specific insights into its capabilities, via the command-line switches. Configure which Flash Player version you're targeting, 6 / 7 / 8 -version n : specify SWF version : 6 to generate Player 6r89 compatible SWF or 8 to access Fl...

Where's the HXML docs?

I've looked all over the HAXE Flash Command-line compiler website but was unable to find any detailed documentation of the HXML files (scroll down to the "Changing SWF properties" section) which describe the compile. Anybody know of a reference source? Found HXML: -swf MyApp.swf .... Compile to SWF -main MyAppClass .... Entry-point...