actionscript-3

Importing an SWF file in Actionscript 3

I have an external SWF file that I need to load at runtime. However, contained inside the SWF is a single MovieClip - in fact, it is a custom class that extends MovieClip. This custom class has its own instance variables and methods. So, there is an AS class that this MovieClip is linked to. However, when I load the SWF file in the norm...

is out there any Open Source phpmyadmin flash user intrface?

is out there any Open Source phpmyadmin flash user intrface? ...

extract sound from a fla

There is an .fla file that has a sound wave in it's library. However I do not have this sound wave saved on my computer so I can not edit or open this sound in another application. I was wanting to know if its possible to extract this *.wav file from out of the fla library? I did some research and they said to goto export movie and expor...

as3 dropping objects at random

Hey, I have a code here that drops a first row then drops a second row down right after. First row drops right away and second row is on a timer. // Bring in first row var blueY:Tween = new Tween(blue, "y", Bounce.easeOut, -295, -49, 2, true); var pinkertonY:Tween = new Tween(pinkerton, "y", Bounce.easeOut, -295, -49, 2, true); var odd...

How to delete array in action script?

I have a function where I create an array... How to delete it? ...

Dynamically spacing numbers around a circle

I'm trying to figure out how to dynamically place numbers around a circle (similar to a clock face) but dynamically so if the number of numbers around the circle is 5 or 27.. they would space out correctly. I found some code (below) that looked like it might help but I'm having trouble implementing it. I don't know how I actually tie ...

using boxes for hit collision

I am trying to use boxes for hit collision. I want to be precise with the collision so I was thinking about making multiple small boxes and checking for collision that way. This maybe a stupid idea or a smart one. Who knows, thats why i am asking you guys. If I do this way will that affect the performance of the game even though the boxe...

Check to see if a class has a method

Is it possible to check a class to see whether it has a method or not ? Or even a particular property ...

How to optimize the import of swfs in the preloader

I work on a big Flash project as the web backend guy that delivers all the files and assets to the main application SWF. Our last, really big packet of data are all the assets and sounds contained in swf files that are imported during the preloader. Are there any ways to optimize this process in any way? I'm really looking for ideas i...

flex: Unhandled AsyncErrorEvent when connecting to the server

I've created a custom class to handle method calls from the server and I get this error Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetConnection was unable to invoke callback close. error=ReferenceError: Error #1069: Property close not found on MyClient and there is no default value. code from function that d...

what is * return type in as3

I saw a method in Action script that has a return type of * public function f(s:String):* what does this [*] means ? ...

save file locally in Flash (ActionScript 3) without displaying save dialog

Hi, How do we save file locally in Flash (ActionScript 3) without displaying dialog. I know we can use the following code to save file locally but it prompts Save dialog. I don't want this dialog while saving file locally. var fs: FileReference = New FileReference(); fs.save(data,filename); Please tell me the solution. Many Thanks in...

How to get unrotated display object width/height of a rotated display object?

If I create a rectangle with 100px width and 100px height and then rotate it, the size of the element's "box" will have increased. With 45 rotation, the size becomes about 143x143 (from 100x100). Doing sometimes like cos(angleRad) * currentWidth seems to work for 45 rotation, but for other bigger angles it doesn't. At the moment I am ...

synchronizing sound

It appears my sound is off sync and the longer I play the movieclip, the farther off sync it goes. Its nothing too complicated, just some basic shooting sounds that fire every time I hit the space bar. My code is below: package com.objects{ import flash.display.MovieClip; import flash.media.Sound; import flash.media.SoundCh...

AS3 Circling the stage

I am trying to have flash draw a line from the center of the stage out and increment around the stage. Not sure what math I would use to do this though. So far I have the line going out to a certain point but not sure how to change that point so that it circles around whatever the dimensions of my stage would be. So far I have this: va...

dynamically adding children from library using array

Hello, i'm porting an old AS2 project to AS3, And have encounter a problem. I've tried a few different things but had no success. in AS2 when dynamically attaching a MC from the library i would sometimes use an array. the array would hold linkage reference's, like so; var mc:String = state_ar[currentState]; this.container.attachMovie...

how to know if the user's camera is broadcasting (he could have pressed deny instead of accept, or his camera might be turned off)

usually i do Camera.getCamera but when this method is called the user is prompted with a dialog box where he can choose to allow or to deny the application access to the camera, or he could not have a camera how can the application now whether the camera is broadcasting ? ...

how to reset an array index? actionscript3

I got a problem with processing an array in actionScript. I removed the last element of an array through array.pop(); After that I would like to put this removed display-object back to the beginning of the array. (array.unshift(object)) The object is now the first element of the array but it got still its old label (number of the last el...

how to get a list of all cameras of the user

I want to get the list of all user cameras so that he could choose from a dropdown from which camera to broadcast ...

Alternatives for registering Events on the stage in AS3?

Hello, I am programming a little software prototype as Flash/Actionscript3 application. Currently I registered some Events on stage - but it is cumbersome since stopPropoagation() needs to be used all the time. As Example: I am having a element shown via mouseclick would and a event for closing the menu on stage. Without using stopPro...