actionscript

Dynamic Flash Navigation Menu

I am trying to create a Dynamic flash Navigation Menu which will disable the button of the page you are on leaving the button in the "hit" state and then active it once you have called for a new page and deactivate the new button. I know this can be done with movie clips and some old school gotoAndPlay/Stop slight of hand but I would li...

Attach random movieclip in AS3

I'm converting an old AS1 project to AS3 and am running into a little problem. Previously, I was attaching random movieclips that are linked from the library with id's like movie1, movie2, movie3, etc. Here was my code: var ranID = random(4)+1; var mc = attachMovie("movie"+(ranID), "mc"+ranID, ranID); In AS3, I've given each of these...

Can I override the mxml request in an HTTPService? How?

I have an HTTPRequest in mxml that has an mx:request defined inside it. I use the info in the mxml request 99% of the time (I thought it was 100% until I found this bug). So I need to send the HTTPRequest with one of the items in the request different. I tried using the send() method and sending my own object, much like you would if no r...

Programmatically Upload larger Files in Flex

Hi, I created an application as part of an ASP.NET site. I would like to receive error notifications in my inbox whenever something goes wrong with that flash application. As I do not have control over our mail server (which has a different domain name), I cannot establish a cross domain policy allowing me to send error emails to my in...

implicit coercion when using popupmanager in flex

I had to reformat my question because I realized I was using incorrect flex method. But still a similar issue occurs: private function passForm():void { PopUpManager.addPopUp(passTitleWindow, this, true); PopUpManager.centerPopUp(passTitleWindow); } <s:Button incl...

Actionscript 3 3D sizing problem

I have an application where I can have an image moving towards the eye. When the image enlarged, I would like to have it resized as 635 px where initial size was 220 px. I have the image with starting position as 0 in z axis. I am wanting to calculate the distance from starting position to the resized image. I have already calculate th...

as3 tracking number value of variables

Hi, I have a bunch an as3 game going. In my game when newCrag hits egg_mc the score gets added. // Add the score var newScore:score_mc; newScore = new score_mc(); addChild(newScore); newScore.x = 20; newScore.y = 20; newScore.score_txt.text='0/15'; var score:Number=0; function getEggs(event:Event):void { if(event.target.hitTestObj...

How to get the reference to a newly created Button with Actionscript?

I have a MXML button: <mx:Button id="myButton1"/> How do I create N number of Buttons with Actionscript: myButton2, myButton3, myButton4... myButtonN ? And how to get the reference to the newly created buttons right after they are created? Like I should be able to do myButtonN.x = 100 right after it's created. ...

flex error - Access of possibly undefined property application through a reference with static type class

I have been having serious trouble making data displayable and updatable using the popupmanager. I have gone back and forth and decided with the approach of placing a titlewindow in a custom component (which everyone recommends) rather than in main application. However, when I do this, since the titlewindow component I created doesn't kn...

How to smooth an image loaded with FileReference?

Been trying to smooth images loaded with FileReferece with no luck. Below is the code I'm using: fileRef = new FileReference(); fileRef.addEventListener(Event.COMPLETE, fileLoaded); private function fileLoaded(e:Event):void{ var ldr:Loader = new Loader(); ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, funct...

Valid JavaScript code that is NOT valid ActionScript 3.0 code?

Most JavaScript code is also syntactically valid ActionScript 3.0 code. However, there are some exceptions which leads me to my question: Which constructs/features in JavaScript are syntactically invalid in ActionScript 3.0? Please provide concrete examples of JavaScript code (basic JavaScript code without DOM API usage) that is NOT val...

AS2 Increase speed & ease out

I'm creating a thermometer with the mercury animated as donations come in. I haven't touched flash in a long time, so be gentle. How can I change the code below so the animation is faster without increasing the framerate? var maxMercuryHeight = 192; // Mercury height at 100% var currentDonations = 80; // Percentage of donations taken ...

ActionScript/Flex: Augment MouseEvents with extra information

I've got a business class, Spam and the corresponding view class, SpamView. How can I augment MouseEvents coming out of SpamView so the MouseEvents which come out of it contain a reference to the instance of Spam which the SpamView is displaying? Here's how I'd like to use it: class ViewContainer { ... for each (spam in s...

Flex HttpService POST limited to 543 Byte per Form field?

Hi, I am getting a FaultEvent when trying to send form fields through HTTPService that contain more than 542 chars. Initializing the HttpService: httpServ = new HTTPService(); httpServ.method = 'POST'; httpServ.url = ENDPOINT_URL; //http://localhost:3001/ReportError.aspx httpServ.resultFormat = HTTPService.RESULT_FORMAT_TEXT; httpSer...

(ActionScript) Change movie clip width with mask

Is there a way to mask a movie clip in a way that alters the width and height of the object? I have a child movie clip that is larger in width so I'm having issues manipulating the width, height and coordinates proportionally of the parent movie clip. I appreciate the help. Thank you. ...

Custom broadcast events in AS3?

In Actionscript 3, most events use the capture/target/bubble model, which is pretty popular nowadays: When an event occurs, it moves through the three phases of the event flow: the capture phase, which flows from the top of the display list hierarchy to the node just before the target node; the target phase, which comprises the targe...

Flex sending snapshot without using base64Encode

var is:ImageSnapshot = myImagesnapshot; var str:String = ImageSnapshot.encodeImageAsBase64(is); As of now, I am sending my jpeg data to the server with the code above. The problem is that it almost doubles the size of the data. Is there a way to send the image data directly without using any encoding. ...

Trying to learn Flex function, vars and data flow.

So I need to return the location or fname or what ever.... I would like to do this just by changing the pointer variable. I'm just comming from php to flex so I don't know what I'm doing -=) How can I do this? public var myProfile:Object={ fname:"Deyon", lname:"Smith", age:"31", loc:"New York"}; ...

Coding Problems-help with AS3 quiz game

Ok, so could someone tell me what's wrong with this script? stop(); Start_Game.addEventListener(MouseEvent.CLICK, Start_function); function Start_function(e:Event){ gotoAndPlay("Question Board"); } ...

How to recive an array from flash vars?

How to recive an array from flash vars? So I have HTML page. with flash app on it. I vant to send an array to flash. How to do such thing using flashVars (I have something like uid=12&sid=12&sid=32&sid=12&sid=32) so i need to get dinamic\random\beeg\unnown number of Sid's not losind UID how to du such thing? btw I want to pass in an ...