actionscript-2

Importing SWF into FLA in AS2

Hello everyone. i am trying to load a swf coded in as2 into an fla that is in as2. When i import the code, certain components are missing. The first set of code is for the video player. The second block of code is the code i am using to embed it (unsuccessfully) ----Code Used To Create Video---- import cn.com.webstudio.util.*; Stage....

Play FLV in ActionScript 2

Hey, I am very new to Flash and Actionscript. I am trying to simply play an FLV file. I have the following: import flash.MovieClip; import flash.Video; import flash.NetConnection; import flash.NetStream; class Program { private var container_mc : MovieClip; private var video_mc : Video; public function new() { var mc : flash.M...

How to know if actionscript 1, actionscript 2, or actionscript 3?

I don't have a specific code sample, but is there a general way to guess what version of Actionscript the code snippet is: 1 or 2 or 3? I read somewhere that if it's code in the timeline, it's considered Actionscript 1. ...

How do I play an FLV file in HAXE??

Hey everyone, It is very difficult to find good resources for Haxe information so I am hoping someone out there can help me. I have an FLV movie in the same directory as the SWF I am generating. I cannot get the FLV to play. I can get this working in AS but I need to know what I am doing wrong in my Haxe code. Hope someone can help. ...

For Loop Only Returning Last Item in Array :(

I'm an actionscript novice so I hope I'm missing something simple here. In a nutshell, I have a for loop updating a dynamic text element but it seems to iterate so fast that only the last item in the loop is updating the text. I'd like the dynamic text element to be updated with EACH item in the loop, not just the last. I have a single...

Why would my AS2 swf stop loading into AS3 swf with SWFBridge on Mac running safari and mozilla?

I have noticed that my AS2 swf that I load into an AS3 swf with SWFBridge sometimes doesnt load. I have usually loaded the page several times and it works fine then sometimes it does not load. When I quit Safari and restart it it will work again. I havent noticed this happening on a Windows PC but only on Macbook OSX in both Safari and M...

Change parent of MovieClip

I want to detach a movieclip and attach it elsewhere, but it doesn't seem possible in AS2. I'm looking for an AS2 equivalent of Cocoa's addSubview/removeFromSuperview. Is there alternatives routes to go, such as duplicating a movie with a new parent.. is that possible? ...

How to work with buttons in an extended movieclip class

Say I make a class that extends the movieclip class and this class has a number of buttons in it. This movie clip exists in an .fla and is linked to the class definition. How can I control the events from within the class? The following does not work: class newMovie extends MovieClip { var test_btn:Button; function newMovie() {...

As2 Benchmarking

I've been looking for a took or a method of benchmarking as2 code specifically individual functions. I've looked at Grant Skinners Performance Test which is for as3 so it does me no good. Does anyone know of an as2 version or a good way to time functions? Thanks in advance! ...

Why might the onComplete event handler fire early for a Loader Component in Flash, Action Script 2?

I have a Flash Loader component dynamically loading images into a movieclip. Since it may take longer than the clips intro animation to load the image, I have the clip stop right before the image is needed (and display a loading animation), and then when the image is loaded play the clip again. There's also logic to play the whole clip w...

simple preloader question for AS2 site

I was asked to add a preloader to a rather messily constructed AS2 website. I'm using the preloader-in-the-first-frame approach--there are tons of references to _root throughout the site so I can't load the main site externally as another swf. My approach just involved creating a new frame at the beginning of the timeline, bumping all ...

Flash AS3 Global Variables?

HI i have a main class //main.as package { public class main { public var testGlobal:string = "testValue"; } } //pop.as package { public class pop { function pop():void { trace("testGloabl from main.as" + testGlobal); } } } How can i get the testGlobal value on pop.as width out using a main cl...

ActionScript Custom Movie Clip

Hey everyone, I'm a pretty experienced flash developer, but this problem has got me duped. So I have a movie clip associated with an external class in the linkage dialog. I put that movie clip on the stage. I have another external class that contains some code (not for the movie clip but for the stage). When I access the custom properti...

what is dispatchEvent in Flash AS3?

Hi all i want to know what is dispatchEvent in AS3. I didn't get any idea while Googling it. :( So please help me Edit 1: public static const SET_VOLUME:String = "setVolume"; private function onclick(evt:MouseEvent):void { soundClip.scaleX = 0; dispatchEvent(new Event(SET_VOLUME)); } what does this means?? ( ...

[AS2] sendAndLoad, cross domain & mochi ads preloader

In my flash game I use sendAndLoad to send information about the game played back to my server for for a high scoreboard. I have recently started using MochiAds meaning that it my swf is hosted on another domain to where the PHP script resides. If I use version control with the automatic preloader the sendAndLoad function just never se...

Flash AS3 class Object calling methods

HI all, i have a class file named Main.as and another class calledr icon.as package { import icon; public class main { public var _time:String; function main() { _time="01:10"; iconObj=new icon(this); } function timerFunction() { _time=newTime; } } } package { public class...

[AS2] Embedded SWF in Facebook with MochiAds Loader, access FB flashvars?

I have a flash game embedded on Facebook but need access to the flashvars facebook passes to all embedded games. However I am using the mochiads preloader meaning that _root.fb_sig_user is always undefined? How do I get to the variables? stage.loaderInfo.parameters.fb_sig_user Was my best guess and it doesn't seem to have worked. ...

Assigning functions to dynamic movieclips in a loop, ActionScript 2

I have done this same thing in ActionScript 3, but am not familiar with ActionScript 2, which I am forced to use for this project. I am loading products into a SWF via XML and attempting to add a click event to each dynamically-created movieclip. Simply tracing the text from a node in XML will do for now. I'd like to assign a property ca...

Flash Actionscript

Hi all, It is my first time to code an actionscript for flash. I want to write a flash clip which works as a parent of another flash clip. I want to write a function in the parent flash, and call that function in the child flash clip. For example I wanna create an actionscript which sends game score to "submitscore.php". The parent is ju...

Advantages of ActionScript3 over actionscript2

Anyone can explain the Advantages of As3 overAs2. ...