actionscript-2

Why doesn't setMask work is this example after it worked once.

I'm trying to use setMask to create 3 "windows" of masked movieClips in AS2 (CS3). The main window is masked fine. After clicking a button, I'm creating two additional windows, but the refuse to be masked No error, it's just that the mask is not applied, and the mask rectangle is still visible. All 3 windows are masked using the same ...

How do I run a line of actionscript when a flash video has finished playing?

I am including a video within a flash banner. When the banner loads, in the space where the video will play I have prepared 'click to play' graphics, with a button which invokes nextFrame – taking the main flash movie's play head to the frame where the actual video is. The video then plays fine, but finishes on a blank, black screen. W...

Split a string in actionscript?

How do I accomplish this in actionscript (example in c#): string[] arr = { "1.a", "2.b", "3.d", "4.d", "5.d" }; int countD = 0; for (int i = 0; i < arr.Length; i++) { if (arr[i].Contains("d")) countD++; } I need to count a character in an array of strings ...

How to get different country time into single page using flex or flash (action script 3) because getTime() used for get current time only.

i am beginner dont know how do display all country time into a single page using action script 3 in flex . do u know any example time code refer me . i will try that code . ...

new to flash, errors in actionscript compile

Hello all. I'm adding a small .swf object (XSPF Web Music Player) to a site I'm working on. I need to add two lines of code to make external javascript calls, so, I guess I need to re-compile to actionscript (please forgive me, I'm extremely new to flash). I'm using MTASC to compile at the command line. I'm getting errors at the start of...

Closing a dropdown by clicking outside in AS2 app?

I'm maintaining a ActionScript 2 application which uses createEmptyMovieClip to create dropdown lists (the list items being attached as movieclips). I can close the dropdown directly via removeMovieClip and such, obviously. My problem is this: the dropdown should not only be closed when an item is clicked or the button creating it is tr...

Limite the size of the modal of a “PopUp” in Flex ?

private function tileList_itemClick2(evt:ListEvent):void { img = new Image(); img.maintainAspectRatio = true; img.addEventListener(Event.COMPLETE, image_complete); img.addEventListener(ResizeEvent.RESIZE, image_resize); img.addEventListener(Mo...

Reload current frame in AS2?

What's the sanest way to achieve something along the lines of this.gotoAndStop(this._currentframe)? What I want is that Flash re-loads the current frame as if I was using gotoAndStop (which does nothing if it is given the current frame as target frame). ...

Passing youtube video id from video feed to flash

I'm working on a flash web application (Actionscript 2.0) for my honours project but am having trouble embedding youtube videos. Basically the user selects symbols which queries the youtube api with certain tags depending on the symbols chosenand a random video is then picked from the first 30 videos. I have this working using the follow...

Place a movie clip on the stage via Actionscript

I have an assignment where at one point, I have to put a movieclip on the stage. I can't just drag it and place it and set it to visible at some point in time, I have to use Actionscript to pull it from the library and make it appear on the stage at certain X/Y coordinates. My assignment says that the function attachMovie() would be use...

Latest version of XML not loaded in Firefox though works OK in IE

I am using AS2. I load an XML file in my movie. Somehow, the XML file is loaded. Now. if I change the XML file, the latest XML file do not appear in FireFox while lates XML file appears in IE. Can anybody tell what is the problem ...

What is the right way to embed a Flash movie for XHTML compliance?

I have a simple movie that has a tiny bit of Actionscript 2.0. What is the best way to embed a flash movie for XHTML compliance? Which version should I export for? The code that Flash automatically outputs is so bloated, I'm not sure what I need. Also, I noticed that a Macromedia URL is in the code, and now that Adobe owns Flash, I w...

How do you recompile a Flash project?

Firstly, thanks for your help. Here's my situation: I'm trying to edit the code for a flash mp3 player, specifically the xspf music player located here http://musicplayer.sourceforge.net/ (I'm using the slim version). I downloaded the latest release and got a compressed file containing a .as file, a .fla file, and a .swf file. I've got ...

AS2 Buttons to AS3

How do I convert these AS2 Buttons to AS3? on (press) { nextFrame(); } on (press) { prevFrame(); } ...

ActionScript2: Split a text with two delimiter, Help

I try to create a project with use a Split in AC2. this I have in_pers = 3x5+5x3+6x8; var tmp:Array = in_pers.split("+"); trace(tmp); //output == 3x5, 5x3, 6x8 but, how if in_pers = 3x5+5x3-6x8-4x2; how can I get the result 3x5, 5x3, 6x8, 4x2 how to use the split with two delimiter. Best regard.. ...

Trouble with frogger on flash

For starters: I'm working with Flash CS3 and Actionscript 2.0 I'm trying to remake the frogger game, and I'm kinda stuck with putting the cars on the screen. For those of you who don't know frogger: http://www.actionscript.org/showMovie.php?id=1157, but I'm not implementing the logs. The big problem is that I have 3 cars, all of which...

Reading HTTP Header in ActionScript2

In AS2, I need to get a URL. In the header of the HTTP response, a cookie is set. Is it possible to read the header of the HTTP response and get the cookie's data? ...

YouTube api audio doesn't stop playing

OK I have built an application which uses the youtube API. It loads a video into the application when the user clicks a button. If the user clicks another button a new video is loaded in it's place. You can see it here: http://www.grantanderson.net/blogFiles/honours/youtube.html Everything works except the audio from the previous video ...

What are the issues to be aware of when updating Flash 8 AS2 content for Flash 10

I have a large number of Flash projects that have been written in Flash 8 (AS2). I recently acquired Flash CS4 to update this content to the new version. I have some new functionality to add and want to take advantage of some new features in Flash 10 (local file access etc). I have already encountered a number of issues when opening my f...

Why isn't flash updating the display while the mouse is clicked and moving?

I have a flash clip that moves a movieclip when the mouse is clicked on the movieclip. Something very basic. I'm not using drag (since the MC doesn't move with the mouse all the time), but rather using onMouseMove to update the MC location according to _xmouse, _ymouse and some other calculations. The problem was that under internet ex...