actionscript-2

Going from Flash 8 to CS3

After many years of using Flash 8, I'm moving to CS3 at work. I know I'll have to learn AS 3.0 so, does anyone have any good references or summaries of the major/most noticeable changes? Also, are there any tips/tricks for the flash environment? After spending a few minutes in CS3, I noticed that you can't directly attach actionscript...

What's the best way to resize an FLV without lowering the video quality?

I'm making a flash site. And there's a video playing, and it moves around and changes size as the user navigates around the page. I notice when it gets small, the video quality gets bad on it. Any ideas on how to retain its quality, and resize it in a different way? To note: The video quality was bad when the css for the flash video was...

ActionScript 2: How do I determine the number of keys in an associative array without iterating?

Is there a function that allows me to determine the number of keys in an ActionScript 2 associative array without iterating over that array? // ascertain the length/size of an associative array var o:Object = new Object(); o["k1"] = "v1"; o["k2"] = "v2"; o["k3"] = "v3"; I'd expect there to be an "o.size" or "o.length" that would retur...

Finding correct scope of an Object for a callback

I'm working on writing a tweening class in as2 that has a callback variable and I can't seem to find a good way to get the scope without specifically passing in a scope variable as well. This tweening class needs to work in classes as well as on the timeline. Here's what my codes looks like right now. params.scope[ params.onComplete ]( ...

as2 tweening and consistent speeds

I'm tweening a movieclip from startX to finishX. The value of startX varies but finishX is a constant. But as the startX increases in value the animation appears to be quicker. How do I adjust the speed of the tween to ensure a consistant speed regardless of the value of startX? Thanks ...

Is there a tutorial on how to display search results using Actionscript 2 and Flash?

I have been looking for a tutorial that shows or explains how to display the contents of a search engine like 'Google' or 'Youtube' inside Flash. No luck so far... Can any of you please forward a link or a good book that talks about the subject...? Thanks... ...

Getting rid of & in ActionScript 2

I have a flash 8 app that's reading an XML file. In the file are nodes containing the & character. When these values are rendered they come out as "&" How do I stop this? ...

Equivalent of Event.MOUSE_LEAVE in AS2

What is the equivalent of this AS3 code in AS2? stage.addEventListener(Event.MOUSE_LEAVE, callbackFunc); private function callbackFunc(e:Event):void { // do something } ...

Flash Dynamic text in embedded movie

Hi I have my movie in the main timeline and then have a smaller clip in which there is a dynamic text box. In that smaller movie I have some actionscript myVars = new LoadVars(); myVars.load("http://preview.domain.co.uk/inc/loadVars.php"); myVars.percentage myVars.onLoad = function() { text_box.text = this.percentage; }; but wh...

Actionscript - Loop until mouseover then goto frame x.

I've been trying to get this to work for a while. I have 25 frames I want to loop, but on a mouseover I want it to jump to frame 26 and continue. Any suggestions? Actionscript 2 or 3 is fine... ...

How to add a preloader

Hi there! First post here. I have a xml video background and need to add a preloader before the video is buffering. The problem is that I am loading the video from xml file and from what I've tried the preloader works for the swf file but not for f4v video loaded externally. Any thoughts? You can check the preview here: http://www.free...

input text and check button

hai guys... My project is to get a input text from user and user can check their answer by simply click on the button check, if their answer is true a message "good job" will be display. but,my code have an error..can u help to check this code 4 me? your help i really appreciate... ans1_box.restrict = "0123456789"; var setUpProblem:F...

Flash - how to load movie and start at a particular frame

I'm new to flash and action script 2, and I am trying to load an external movie and have it start at frame 3. It's the start at frame 3 that I'm having trouble with. The following code does not work: on release { loadMovie ("myMovie.swf",this); gotoAndStop (3); } or: on release { loadMovie ("myMovie.swf",this); gotoAndPlay (...

comparing date objects in as2

I must be missing something. date1 = new Date(2010, 01, 10, 12, 10, 30, 000); date2 = new Date(2010, 01, 10, 12, 10, 30, 000); trace(date1 == date2); // returns false However, date1 = new Date(2010, 01, 10, 12, 10, 30, 000); date2 = new Date(2010, 01, 10, 12, 10, 30, 000); trace(date1.toString() == date2.toString()); // returns tru...

Why are animations sometimes done using steps based on the amount of time that's passed?

I've noticed that some programmers animate objects based on the difference in time. I am not sure why or even if this is logical. Does anyone know the significance? Below is a snippet of code that explains what I mean: var timePassed:int = getTimer()-lastTime; lastTime += timePassed; var newBallX = ball.x + ballDX*timePassed; var newB...

overriding subclasses in actionscript

Trying to find a straight answer for this. I am going to be creating some sub classes in actionscript 3. I was wanting to know if it is possible to override the parent class. If so, do I need to put a override assigner on the parent class method or what. Thanks guys ...

FLVPlayback.load results in all sound, no video

I'm trying to change the source of the FLVPlayback component on my stage with the load() method. When the new video loads I hear the audio playing but I see no video. Any idea what could be going on here? The videos are rtmp streams from a Flash Media Server. The load command looks somethink like this... flv1.load("rtmp://192.168.1.111...

Flash AS2.0 and JavaScript/jQuery (ExternalInterface) Communication

Hi there, Im trying to use JS to send data to my Flash AS2.0 music player with ExternalInterface, except there are no good tutorials or guides on ExternalInterface that I can find. I want to be able to change the current song in the player by clicking a JavaScript link, and on page / window load without clicking, play a default song. ...

How to get all the variables in _level0 using ActionScript 2.0

I have a loader loading two files. One can be anything, and the other is the one im working on. It has a textField.text within which it should list the variables in _level0 for both files. I dont mean objects or info like what os im using (which is all i can get now). I mean the vars defined in the AS. Like what you get when you debug yo...

flash action script 2: getUrl('url',_mylevel) - when using a specific level, swf is not loaded

Hi. i want to load another swf that i build and use it's functions. but it seems that when i use getURl('url','_mylevel') it doesn't load the flash file and i get no error. only when i use getUrl('url','_blank') it opens the browser with that url. i want to be able to use the functions in that swf like the following example: _root._m...