actionscript-2

How to adjust this AS2 to AS3?

the AS2 code is: MovieClip.prototype.setModel = function(m) { this.model = m; this.drawModel(m); } MovieClip.prototype.drawModel = drawModel; I tried: package { import flash.display.MovieClip; public class Prototype extends MovieClip { public function Prototype() { super(); } ...

Trying to understand this ActionScript 2 code...

I got this ActionScript 2 code: fuseModel = [{mx:0, my:-5.5, x:0, y:-4, pen:.5, clr:0x000033, alpha:50}]; MovieClip.prototype.setModel = function(m) { this.drawModel(m); } MovieClip.prototype.drawModel = function(m) { var pt = m[0]; beginFill(pt.bf, pt.bfa); lineStyle(pt.pen,pt.clr,pt.alpha); lineTo(100,100); endFill(); } _root...

TextField and Security Sandbox Violation

Hi I am creating a TextField in my flash application, but when i am starting to write something the following error in written to trace: * Security Sandbox Violation * SecurityDomain xxx tried to access incompatible context yyy What is the reason for that? How can i solve it? ...

Actionscript and querystring issue.

Currently in Flash I am trying to pull in a value based on the querystring. Example.. Html code: myVideo.swf?video=ThreeGuysOneBall.flv Flash code: _textbox1.text = video; This works in the main flash actionscript, but I need the querystring in a class constructor that I created. How can I pass the querystring to a separated out ...

wierd sandbox violation

I receive the following message when i start writing something inside a textField: *** Security Sandbox Violation *** SecurityDomain 'http :// localhost/crossdomain.xml' tried to access incompatible context 'file:///C|/.../Login.swf' I don't see a reason for that message, but it seems that this message is thrown when i do Key.isDown (...

Creating Radio Buttons in Flash using ActionScript 2

Hi, I'm new to coding and I'm having trouble figuring out how to make a working radio button group. I am working on building my website and I have different sections of my art portfolio that I only want to show up on at a time. I have an "artwork" button you press that opens up the menu choices, "figure drawings", "backgrounds" etc-...

making a swf a clickable link with the pointer icon

I have a swf embedded into a site, and I want the swf to be clickable so when you click on it it goes to another page. I tried wrapping the whole flash object in tags, and that makes it clickable but the biggest problem I'm having is when you roll over it with the mouse the pointer icon doesn't come up, it just looks like the regular ar...

Some code not working in Flash 10

Why does this code not work for Flash 10?: onClipEvent(load){ //Import the classes needed to transform the color import flash.geom.ColorTransform; import flash.geom.Transform; //A starting amount to tint the image redamount = 0; //Is the image getting more red or more blue? goingred = true; } //Run at the sta...

Is it possible to use closures in AS2 like in Javascript?

I am wondering if it is possible to create a closure in ActionScript2 like it is possible in Javascript. This doesn't work: var util = function(){ var init = function(){ trace(this + ': util'); // i want to know this thing works! var myUtils = new MyAS2Utils(); // load some stuff var url = myUtils.getURLInSomeReall...

Actionscript 2 Play Pause sound from media controller

I am trying to play a soundf from my media controller in Flash using the following code: on (click) { kirupaSound = new Sound(this); kirupaSound.attachSound("sample.mp3"); kirupaSound.start(0, 99); kirupaSound.test(); The sound plays but I can't figure out how to check if it is already playing and if so pause. I have ...

KEY_UP event of ctrl key blocks KEY_UP event of 'c' key

I am trying to capture ctrl-c. I have noticed that many times, there is no KEY_UP event for 'c' key. I believe it happens in cases KEY_UP event for 'c' key should be thrown just before or after KEY_UP event for ctrl key. Why it happens? how can i catch the KEY_UP for 'c' key? ...

How to get email address from a string

Hi I am searching for a way to retrieve all emails addresses from a given string. For example: if i have the string "AB CD [[email protected]]" i want to receive only "[email protected]". I guess i should use RegExp and String match function, but i am not sure how. Any ideas? ...

ctrl button sometimes block KEY_UP event for 'c' key

Try the following code: myListener = new Object(); myListener.onKeyUp = function() { if (Key.isDown(Key.CONTROL) && Key.getCode() == 67) { //Ctrl+C trace("Ctrl+C key down!"); } }; Key.addListener(myListener); hold ctrl key and start pressing 'c'. From some point you will notice that there is no KEY_UP event fo...

url functions in as2

This is from ActionScript 2.0 not a big one, but enough to keep me wondering what is wrong. This code works perfectly when I hit button in original swf file but when I publish it as html or embed it in html document there is no response. What to do? on (release) { URL("aboutus.html"); } ...

Post from Flash to PHP in Facebook app

Hi, I published 2 days ago a Facebook app, it's a flash game, after the game over, the flash file POST score to my php file, Publish your score to wall if you beat your highscore, Facebook disabled the application because bad reviews from users. How to POST from Falsh to PHP without redirecting the user, i want after the game over POST...

Flash AS2 Transitioning Buttons of External Swfs

Hello world, I'm relatively new to Action Scripting and I'm working in Flash to learn. I know Stack Overflow isn't really for the inexperienced, but maybe you guys can help anyway? Problem 1 I would like to play out a movie that has been loaded (if it has been loaded) when another button is clicked. It is my understanding, I can do ...

Rotating banner using clearInterval Actionscript 2

Hi All, I am creating a rotating banner. I have a loader swf file which I unload and load with the the new swf file every 15 seconds using set interval. It's going ape shit though and I am not sure what is causing this. Could someone please have a look at my logic and let me know where I am going wrong please? Many thanks! var navArr...

ActionScript 2.0 listener's onComplete fires immediately

Please forgive any short-comings in this question; flash is not my area of expertise, but I've inherited a task that deals with AS2 that I need some help with. Basically, I have a flash document (a loader?) with the following AS 2.0 code: stop(); import mx.video.*; var listenerObject:Object = new Object(); listenerObject.complete = f...

Stop flash content from loading - AS2

I have a flash file that I want to embed on a webpage, however, I want it to load when the user clicks on it (which will run the preloader) - (like clicking play on a youtube video) It's one flash file that loads in XML data and is graphically heavy. I'm not sure if the only way to do it is to load the flash file through another swf, i...

grid image gallery flash as2.0 big image never in place

hello all, i'm having a bit of a problem with a flash image gallery, this are my problems: I need the big images to appear always at the same place: x=0, y=0, but i've tried everything, modified the AS and not only they never appear at 0,0, but each appears in differents places, any idea how I can fix this? how can I have a next / prev...