actionscript-3

Editing A Library Symbol From ActionScript

In the Flash authoring environment I can edit a library symbol and all on-stage instances based upon it reflect the changes. How can I do the same thing in ActionScript? There seems to be no way to address a library symbol. For example: Inside Flash CS3, I have created a Square.swf file that has 100 instances of the library symbol Squa...

RichText controls for TextFlow in Flex 4

Is there a way to connect the RichText controls (without the textbox) to a TextFlow in Flex 4 and to be able to add the controls seperate from the TextFlow? ...

for loop in as3

Hi, i'm trying to effect a number of movieclips inside another movieclip, in this case set the alpha to 20%. But all i get is an error message. (TypeError: Error #1010: A term is undefined and has no properties. at array_fla::MainTimeline/frame1()) Anyone knows why it's not working? var myClip = new mcClip; addChild(myClip); myClip.x...

AI car development for computer player.

i am using way point for the artificial car but i don't know the exact concept for that i want to make 3 AI car so how can i mange them parameter based like acceleration speed rotation on turn and collision b/w them pl z guide me. ...

list array menuList[i] getting i as access of undefined property

Continued from here: http://stackoverflow.com/questions/2906847/create-variable-from-array-actionscript-3 I'm usually not this rushed, but I have to have this project finished by tonight... so any help is appreciated. The poster there gave me the following code, which gets "access of undefined property i" on the second line. All the ite...

Actionscript 3: foreach drawing object in movieclip

Hey, I got a europe map designed in flash (1 movieclip, 1 frame, really simple), which contains the map as drawing objects directly inside the scene and in addition some specific countries as clickable buttons. So far it's working fine. What I need now is to make all the other drawing objects clickable without having to edit and script ...

Facebook Graph API - Image Uploading (as3/flash)

I have been trying to get a bit more familiar with the Graph API for facebook. Its very convenient although the documentation is poor at some places. Im having trouble uploading an image to an album. Anyone know how to do it ? This is the code im currently working on :) private function uploadNewPic(albumId:String):void { var...

Flash AS3 Mysterious Blinking MovieClip

This is the strangest problem I've faced in flash so far. I have no idea what's causing it. I can provide a .swf if someone wants to actually see it, but I'll describe it as best I can. I'm creating bullets for a tank object to shoot. The tank is a child of the document class. The way I am creating the bullet is: var bullet:Bullet ...

CheckBox gets converted to Button in Flex

Hi, I am new to Flex, so please bear with me. I have encountered a strange problem. There's a ActionScript class which dynamically creates basic UI element. So I create RadioButton as var rBtn:RadioButton = new RadioButton(); and then put it in a Panel Container. The problem is that it appears to be a Button. However it behaves li...

ActionScript Mouse_Move Only While Mouse_Down?

i'm attempting to implement a mouse event where Mouse_Move can only occur if Mouse_Down. i could introduce a boolean that would toggle during Mouse_Down and Mouse_Up that could work, but is there a better way, perhaps a more official way, of doing this? ...

fadein child when calling addChild

Everywhere I've looked has instructed me to download plugins and addons because they're "superior." I'm just looking for a simple fade in/fade out when a child is added/deleted (if fadein is all I can get, I'll take it.) Here is a function I'm calling... var trashbagFrame:MovieClip = new menu_trashbag_mc_frame(); trashbagFrame.x = 900;...

More efficient way to remove an element from an array in Actionscript 3

I have an array of objects. Each object has a property called name. I want to efficiently remove an object with a particular name from the array. Is this the BEST way? private function RemoveSpoke(Name:String):void { var Temp:Array=new Array; for each (var S:Object in Spokes) { if (S.Name!=Name) { Temp.push(S)...

What is the best way to remove flickering from a fast series of image loads in Flash?

Hi, working on making a flash program that loads about 1000 jpegs and then plays them like a movie. Have all the buttons and stuff working but the time it takes for an image to load is so high that the movie can't be played at 30 fps. I've tried multiple ways of fixing this using 1 scrollpane and changing its source ever 30 ms. This ...

Calculating Text Width In ActionScript And Flex

I'm trying to calculate how WIDE to make my button, based on the text that it will contain, and when I try to google for how to calcuate something as simplistic as the WIDTH OF SOME TEXT, I go cross-eyed just trying to wade through apparently nonsensical esoteric counter-intuitive voodoo. Can anyone out there help simplify for me how I ...

What does ActionScript mean by 'antiAliasType' in the following context?:

// When I Run The Following Two Lines, I Get The Error Shown Below var B:Button=new Button(); var lineMetrics:TextLineMetrics=B.measureText('Hello World'); // TypeError: Error #2007: Parameter antiAliasType must be non-null. From My Point Of View, As Useless Errors Go, This One Is Unsurpassed. Can anyone point me in ...

XML As XMLNode in Actionscript/Flex

How do I get the root node of an XML object in Actionscript? One would think that I could say this: var Node:XMLNode = XMLVar as XMLNode; But although XMLVar is of type XML, Node will = null. So how do I do it? ...

screen sharing software creation using as3.

I wish to do screen sharing application using as3 as the part of one project. how to get screen sharing video using as3. Thanks. ...

Actionsript/Flex String replace for <

I have a string like "My <color>" I want to replace "<color>" with "Orange". I did str = str.replace("<color>","Orange"); but it doesn't work. How to do it? ...

What is the best way to make a game timer in Actionscript 3?

I have built an online game system that depends on a timer that records how long it took a player to complete a challenge. It needs to be accurate to the millisecond. Their time is stored in a SQL database. The problem is that when I use the Timer class, some players are ending up getting scores in the database of less than a second. (w...

how to combine a texture on a cylinder in papervision3d ?

I would like to combine bitmaps to one texture and apply it to a cylindric primitive. The cylinder will be rotating or better: the texture should moving along the cylindric-surface and therefor you should see only one (up to 3 textures at the same time). For better understanding: it's my intention to create somehow a poster-pillow with a...