actionscript-2

killing old objects in flash?

Hi there first timer here. I'm building a flash animation using the tweenlite library. It's extremely simple which is why this is so aggravating. It's basically a slideshow with 5 frames that crossfade. When a button that calls up the next frame fades out, I'd like to disable any actions it has on it. Currently it fades out, but when yo...

Help! Flash cannot load XML data from a third-party domain

I am getting news from Yahoo using an RSS feed, using: XML.load("http://finance.yahoo.com/rss/topstories") Yea this is legal and all, and although it works perfectly when my SWF is offline -- it shows a security error, but I allow my D drive "domain" in the Adobe Security Panel. But as soon as I upload it to my server, and test it on...

how to access a text field/movie clip inside a dynamic clip created inside a for loop?

Hi All! I am creating a flash app that reads an XML file from a specific source. The XML file contains maximum 5 nodes, each containing a name,description and an image URL. To represent data in each node i created a movie clip that contains another movie clip (to load image from url), a short dynamic textbox (for name) and a long dynam...

Animate onRollover onRollout with TweenMax

I'm using TweenMax to animate some arrows to move when I roll over a link, and the animate back, when I roll out. But it's not working, it animates on rollover, but not rollout. function boxLink(mc_function:MovieClip, mc_target:MovieClip) { mc_function.onRollOver = function() { var myTween:TweenMax = new TweenMax(mc_target,0.5,{_x:"2",...

Change color of a dynamic textfield problem

I have this code that should change the color of a dynamic textfield when I rollover the link movieclip, and then back when I rollout. I get no compiler error, it just doesn't work. function textColor(mc_function:MovieClip, tf_text:TextField) { mc_function.onRollOver = function() { tf_text.textColor = 0x7cb0b7; }; mc_function.onRollOu...

Embed characters in multiple dynamic textfields

How can I embed some characters one time, and have them embedded in all my dynamic textfields? ...

Pass strings to function in a loop

I have this code that activates when rollover, rollout, and release. I functions for rollover and rollout works, but the release function does not. I'm trying to pass some strings with url's to the function within a loop. var url1:String = "http://www.google.com"; var url2:String = "http://www.google.com"; var url3:String = "http://www....

Actionscript 2, Flash 8 and Amazon S3. Is there an AS2.0 API?

Hi, I am developing an application that loads images and video into a Flash player (currently using Flash 8 to develop so this is AS2.0). We are going to host the files on Amazon S3 servers. Can anyone point out the best way to go about loading the files into Flash Player from Amazon S3. I have been using MovieClipLoader to load images ...

Adding an as2 swf to the stage in an as3 swf

I have a menu control (as2), that is completely self-contained and doesn't rely on any interaction with the parent (as3). The menu control does load an external xml file that is in the same directory as the swf. The menu control works fine when I run it on its own. But when I import it into the Library of my as3 fla, add it the stage a...

For loop with onRollOver problem

Hi, I can't get this For loop with onRollOver to work. for (var i:Number = 1; i<=4; i++) { this['videobutton'+i].onRollOver = function() { trace(i); this['stream'+i].pause(false); this['video'+i].attachVideo(this['stream'+i]); fadeIn(this['video'+i]); }; } It think it has to do with variable scope and the i, but I don'...

Netstream() loop problem

I'm preloading 4 flv movies and hide them, when I rollover the videobutton movieclip i want the flv video to fade in and start playing. I have this working code, but I feel it's very badly written. var videos:Array = new Array( 'ltp_video-low1.flv', 'ltp_video-low1.flv', 'ltp_video-low1.flv', 'ltp_video-low1.flv' ); function videoOver(...

Is there a way to inspect flash movie elements live in AS2?

I have a major problem with a flash based training course that is rendering extra graphics that are UNSEEN. This is realized when a screen reader is used to run 508 compliance tests on the course. There are various times when it just says 'graphic 13' and I have no way of telling what the object is that is getting this title and becoming...

AS2 FLA Component with embeded classes

I'm trying to create an AS2 component which is easily skinnable. I create an FLA component by creating a mc with some assets > component definition > link it to MyClass, and drop the fla into the Components dir. If I then drag the component into a new fla and try to render, it obviously throws the error that it can't find MyClass. I'd...

Best practice for ActionScript 2 events - is there a way to simulate ActionScript 3-style events?

I love the AS3 event model - it helps keep my code clean and lossely coupled. When I used to work on AS2 projects, my code was not so neat and classes were more reliant on one another. Due to AS2's strange handling of scope I never really got on with the AS2 event system. As I still occasionally have to work in AS2, my question is: Ha...

can an actionscript function find out its own name?

given the following function A(b:Function) { } If function A(), can we determine the name of the function being passed in as parameter 'b' ? Does the answer differ for AS2 and AS3 ? ...

How to communicate with index from AS2 file, being loaded by an AS3 file

We are loading an actionscript2 swf into an actionscript3 swf. as3 is embeded on the index page using the satay method. Is it possible to get a variable set on the index page from within the actionscript2 page, without using the as3 page as an intermediary (as this is not an option)? We've tried ExternalInterface, but how would we targ...

Dragging an object on a mask in Flash

I have a small task in Flash, that I'm having a little trouble with. First of all, I have 2 layers. The first is a gradient with various colors, on top of that is the second layer, which is a shape tween(movie clip). For those of you using CS4, a classic tween. I'm using CS3 and Actionscript 2 I've allready done the shape tween, it's v...

What part of the actionscript goes in the scene and what part goes in the clip?

I just finished a small task for school in Flash and I'm wondering about about the reasons to put Some actionscript in the scene and other in the movie clip. Info: I'm using Flash CS3 and ActionScript 2. I uploaded the file here, for anyone who wants to take a look: http://www.mediafire.com/download.php?2z2mivtmokg Now, I did all the ...

How to prevent ActionScript code decompilaton

Is there a reliable way of preventing my actionscript code (as2 or as3) from being copied (e.g. if there's some IP in it)? I know there are tools that can decompile flash code so it's easily reverse-engineered and I've also seen a few tools that claim to be able to obfuscate actionscript code in such a way that it's not steal-able, but ...

Using arrays with loadClip in AS?

I've preloaded images from xml into an array named arr. But I'm having problems with loadClip and getting the string from the array. So it doesn't load the image in the box. Example: arr[0] = "images/photo1.jpg"; var mcLoader:MovieClipLoader = new MovieClipLoader(); mcLoader.addListener(this); mcLoader.loadClip(arr[0], box_mc.loader_mc...