actionscript-2

Flash actionscript 2 preloader quicky

Hello, just a quick question reguarding how to make a preloader animate backwards. So the bar decreases in width as the load number gets larger. Here's my code onClipEvent (enterFrame) { loading = _root.getBytesLoaded(); total = _root.getBytesTotal(); if (percent == undefined) percent = 0; percent -= (percent-((lo...

fire event in actionscript on swf load?

I am trying to get a bit of content to load on pageLoad instead of as a clickable event (but still keep the clickable event on the menu). Here's the actionscript: import mx.utils.Delegate; /** * This is the menu that comes up at the bottom with various analysis and navigation options when a thumbnail is selected. */ class imagegal....

Flash storing strings as keys in array

in php I could do: $prices['ford']['mondeo']['2005'] = 4500; $prices['ford']['mondeo']['2006'] = 5500; $prices['ford']['mondeo']['2007'] = 7000; and could do: echo sizeof($prices['ford']); // output 1 echo sizeof($prices['ford']['mondeo']) //output 3 how can I achieve it in Flash. Flash doesn't seems to like STRINGS as ARRAY KEYS,...

How do I load and external swf AND gotoAndPlay() with ONE button

I've made an interactive tour. Which can be seen here: http://www.92YTribeca.org/Tour The main swf is the nav at the top. And I load 4 external swfs into the main (About, Rentals, Floorplan, Neighborhood). I need a button in Floorplan.swf to load Rental.swf AND gotoAndStop("CAFE") - a frame within Rental.swf. This is the code that I ...

Preloader problem in flash actionscript2.0

I am having two problems in the loader, the bar "bar" does not increase and mc_home get the position y = 0 no matter where I place the pages_mc nor their place the pages_mc._y = 100; import gs.TweenLite; import gs.easing.* var mcLoader = new MovieClipLoader(); var mclListener:Object = new Object(); mclListener.onLoadError = function(ta...

Flash loads xml differently on Windows and Mac

Hi there I am loading an xml file using AS2.0. On Mac, all the elements load completely, but as soon as I run it on Windows, only the first element of type item loads. When I run it on Mac, the elements are loaded in and all item's are separate buttons. When I run it on Windows, only one button appears and its name is ch1. Virgin Group ...

Main Flash swf won't work once uploaded to server

Hi I have a 1 frame main SWF. In the first frame I include codeAS2.as like so: #include "codeAS2.as" (sorry, might sound primitive) When I test the movie in Flash CS4, everything works fine, it loads all the data from the XML file menu.xml which is in the same folder. Using the Simulate Download function from Flash, it also runs fine,...

Writing Local SharedObject in AS3 swf and reading it in loaded AS2 swf

I am trying to share data between an as3 swf and a as2 swf that it loaded. The problem is, I can't seem to get my as2 swf to read the localshared object written by the as3 swf. It simply returns undefined when I try to get a reference to the shared object // AS3 _SharedObj.objectEncoding = ObjectEncoding.AMF0; _SharedObj.data.blah = 's...

ActionScript 2: Is it possible to test is the mouse is pressed without setting up an event ?

Is it possible to read the mouse key, like you do with Key.isDown(), ie. without setting up an unPress event/callback? ...

How to control a movieclip that was loaded using loadclip() in AS2?

This is in AS2. I'm loading an external AS2 swf using the loadclip funtion. But I don't know how to call its gotoAndPlay or stop functions. How do I reference to them? When I trace the loaded file it says _level0.mcContainer.instance42 The object path always varies every load like now it's instance42 sometimes it becomes instance7 o...

Problem in a function actionscript

How do I add a variable that varies with the dummy variable in a loop: function resetAll(menuNum){ trace(menuNum); for (i=0; i<=7; i++){ if(menuNum != 1){ menu_all_mc.this["btn_"+i].gotoAndStop("off"); } } } this["btn_"+i] don`t work I need pass the btn name like: btn_1 and next loop btn_2 ... ...

UnitTest frameworks for AS2?

I have just tried out ASUnit and it wasn't a success, so I'm looking for something simpler, no need for fancy UI. trace output is fine. ASUnit was not a success because it for some strange reason generated AllTests.as files in all subdirs of /Applications. I can't figure out how to stop this from happening, so I'm looking for something ...

Is there any 'FindBugs like' plugin for Adobe Flex Builder or Flash Builder?

Is there any 'FindBugs like' plugin for Adobe Flex Builder or Flash Builder ...

flash paths binding, constants

is it possible to use string as path ? instead of _parent._parent.myVar=123; use something like this: var path = '_parent._parent'; and then use it as path.myVar=123'; ...

actionscript 2 to actionscript 3

so I have a lot of classes in actionscript 2. But I need to modify my application to use the soundchannel object for audio monitoring. as far as i know this is only in actionscript 3. so it it possible to write one class in AS3 and leave the rest in AS2? if not is there a conversion tool which can make the process easier? ...

as2 dynamically change flash movie clip colour onRollover

Hi I have a flash map of the world onRollover a region changes color onRollout changes back no probs BUT I dont want to tween these as my flash file is massive Can any point me to a tutorial or have any ideas at all. I cannot do buttons as i need smooth transition also between rollover and rollout. I have trawled the net ...

Sound visualization in ActionScript 2.0

I need to create a basic bar chart distribution in ActionScript 2.0 based on sound output. I realize that ActionScript 3.0 has a very nice sound visualizer class SoundMixer.ComputeSpectrum but the limitations of my project require me to use ActionScript 2.0. Im wondering if you know of A. Any third party libraries that I can use or ...

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 smaller ones, but I want to do so in an efficient way. It's possible that I could end u...

Flash getTextSnapshot does not want to highlight when I select text, any idea?

Hello, I tried to find the answer on the Internet but haven't found one yet. I am not a Flash coder, but I am learning quickly. Here's the question: I am trying to highlight a part of the text inside a frame (let say movie clip) and I am not able to make it work 100%. Here's my code (highlighting): var my_snap:TextSnapshot = _root....

How can I wait for a button press in a loop?

Say I have simple program that emulates a board game with a number of players who take turns rolling dice to move across a board. The players can be human or computer. If this was a command-line style game, I could simply make a loop to iterate over the players which would call the diceRoll function for that player. If the player is ...