Questions tagged [actionscript-2]

ActionScript 2.0 is a scripting language used by the Adobe Flash software, introduced in Flash MX 2004.

ActionScript is an object-oriented language originally developed by Macromedia Inc. (now owned by Adobe Systems). It is a dialect of ECMAScript (meaning it has a superset of the syntax and semantics of the more widely known JavaScript), and is used primarily for the development of websites and software targeting the Adobe Flash Player platform, used on Web pages in the form of embedded SWF files.

Flash MX 2004 introduced ActionScript 2.0, a scripting programming language more suited to the development of Flash applications.

References:

https://en.wikipedia.org/wiki/ActionScript#Timeline_by_ActionScript_version

1963 questions
3
votes
2 answers

How do you find the URL to the SWF file using ActionScript 2?

I'm looking for a way to find out the URL of a SWF using ActionScript 2. In ActionScript 3 this is done by using root.loaderInfo.loaderURL, but I haven't found any equivalent in ActionScript 2. Please note that I'm not looking for the URL to the…
Theo
  • 131,503
  • 21
  • 160
  • 205
3
votes
1 answer

ActionScript 2 load another SWF that loads other files - relative path/url problem

Few facts first: 1. I can only use ActionScript 2. 2. All files are within the same domain (i.e "http://www.example.com"). I have a loader SWF which acts as a selection tool ("auto_magic.swf") located at "/" in the website (the root folder). A…
Poni
  • 11,061
  • 25
  • 80
  • 121
3
votes
3 answers

AS2 Inventory System

I'm attempting to create an Inventory System written in action script 2 (flash as2) I'm trying to create one that has inventory spots dynamically created and a movie clip remotely loaded into the mc in the inventory spot. I cannot find any online…
Daniel
  • 3,017
  • 12
  • 44
  • 61
3
votes
1 answer

JSON vs. XML parsing speed in Flash AS2

All, I'm working on a Flash AS2 project in which I have a choice of receiving a dataset in either XML or JSON. The dataset is probably about 100-1,000 rows of data; each row has roughly 50 fields; most values are numeric. If I use XML, I'll be able…
mattstuehler
  • 9,040
  • 18
  • 78
  • 108
3
votes
1 answer

Parse JSON string containing a colon

The class I am using to parse JSON does not allow you to have colons in any string. For example, this would cause an error in parsing: { "Test:": "Just a test" } Any ideas on how to make this class ignore colons that are in a string? Here is…
Matt
  • 93
  • 2
  • 11
3
votes
5 answers

What is the difference between the onMouseUp/Down and onPress/Release events in Flash?

In Flash, there seem to be two sets of mouse click events: onMouseUp, onMouseDown onPress, onRelease Is there any actual difference between these events? I can't tell from the documentation, and I haven't noticed anything in actual usage, but it…
Herms
  • 37,540
  • 12
  • 78
  • 101
3
votes
2 answers

Avoiding LocalConnection's 40k size limit when data object may be larger than 40k

Flash's LocalConnection mechanism has a 40k size limit on individual messages passed to send(). I'm running into a situation where I have a complex object that I need to send which may end up being too large. I can break up the object into multiple…
Herms
  • 37,540
  • 12
  • 78
  • 101
3
votes
9 answers

What are the pros and cons of migrating an application from AS2 to AS3?

I have a client asking me "What are the pros and cons with upgrading from AS2/Flash to AS3/Flex?" He is having performance and maintainability issues with his app. I sorta hate these questions because I just want to say "AS3/Flex is going to be…
Tony
  • 18,776
  • 31
  • 129
  • 193
3
votes
1 answer

flash: after loadSound finishes loading, song plays from start again

i have this simple code var mySound:Sound = new Sound(); mySound.loadSound("128kbps_stereo.mp3", true); it does load the sound and plays it. however, the song plays for a little while and then starts over again! so the sound plays twice in a short…
user151496
  • 1,849
  • 24
  • 38
3
votes
1 answer

Actionscript 2.0 scoring system

I'm new to flash and I need to make a scoring system where in when you click on a symbol (button) in the stage it will add to the score textbox. I have this simple code: on(release) { _root.points++; _root.score.text = _root.points; } that…
Yme Potxpotx
  • 45
  • 1
  • 1
  • 4
3
votes
1 answer

Actionscript to play/pause audio on different buttons

I've created a few buttons in Flash. I'm trying to make it so that if you click one button, the audio starts playing for that button. If you click another button, the active audio stops and the new audio of the button you clicked last start…
Anil_ramnauth
  • 55
  • 2
  • 7
3
votes
2 answers

How do I change a button, onclick, in ActionScript? Show/hide?

Using ActionScript 2.0, how do I show or hide a button onclick? I am making a simple mp3 player, and would like my pause button to change to a play button when clicked, and vice versa.
Zack Burt
  • 8,257
  • 10
  • 53
  • 81
3
votes
1 answer

Flash as2 collision optimization

Right now I'm working on an as2 project that requires a large number of bullets and enemies to be present on the screen at any given time. The problem is that for each bullet to collide properly I must loop through every enemy to see if the distance…
user1621941
  • 148
  • 4
3
votes
3 answers

Quadratic Bezier Interpolation

I would like to get some code in AS2 to interpolate a quadratic bezier curve. the nodes are meant to be at constant distance away from each other. Basically it is to animate a ball at constant speed along a non-hyperbolic quadratic bezier curve…
user132295
3
votes
4 answers

What's the best way to port an application from ActionScript2 to ActionScript3?

Our application is written in ActionScript2 and has about 50.000+ lines of code. We want to port it to ActionScript3 and we're trying to find out what our options are. Do we have to do it manually or can we use a converter, and what problems can we…
user16094