actionscript-3

how to import frame based external swf file to scrollpane for as3/flash ?

hi, i'm using pdf2swf but i can't import external swf frame per frame in scrollpane like to scribd (http://www.scribd.com/doc/27241116/BLOOD-GRISTLE) Best Regards. ...

Flash computeSpectrum() unsynchronized with audio

I am using Flash's (CS4, AS3) SoundMixer.computeSpectrum to visualize a DFT of what supposed to be, according to the docs, whatever is currently being played. However, there is a considerable delay between the audio and the visualization (audio comes later). It seems that computeSpectrum captures whatever is on it's way to the buffer, an...

AS3 - Can I have access to the object (or function) who call me?

I've asked this same question with Python. Now I like to know if this can be done in AS3. If I have something like this: package { public class SomeClass { private function A():void { C() } private function B():void { C() } private function C():void { // who is the caller, A or B ??...

tiny URL api Automati in flex 3

hello i am working in application of twitter in flex 3 and action script 3 , this in the text area when the user write my application automatically change http address to a short address but i don't know find the address within the text you can help me please.. thanks in advance ...

Accessing children of loaded swf in Flex Image component

enter code hereI am loading an external swf into an component. It loads everything fine and I can see buttons working in the swf, I can add a movieclip to the but I can't then access that movieclip (or don't know how), and it keeps telling me numChildren = null when I try to trace it out. This is set up as a custom component like thi...

swf listens to XML, AS3

My swf listens to XML from a socket and document. How do I get 'my variables' to grab XML from the socket instead of the XML document? ANSWER I'm confused with setting up the variables, and there values. There's nothing wrong with the document, "I'm just stuck." I plan to do a lot of reading after all this research. PURPOSE My purpose...

Trying to capture stage area using BitmapData

I am trying to grab part of stage area using BitmapData and copyPixels method: bmd = new BitmapData(stage.stageWidth, stage.stageHeight); bmdRect = new BitmapData(320, 240); rectangle = new Rectangle(360, 20, 320, 240); bmdRect.copyPixels(bmd, rectangle, new Point()); bmd.draw(bmp); bmp = new Bitmap(bmdRect); var myEncoder:JPGE...

splitting a bezier curve in actionscript3

Hi I would like to "grow" a path with bezier-curves. After the path has been drawn, it should be shaking a bit: Weave-like look and feel. visual example: weave example At the moment I use TweenMax.bezier, which let me move a point along this curve and at the same time (onEnterFrame) I draw lines to the current Position of the Point. Un...

Flash AS3 boids mask

How to use these class for a mask on bitmap : http://blog.soulwire.co.uk/laboratory/flash/as3-flocking-steering-behaviors I want use the shape to mask a bitmap. ...

Getting user's friend from facebook using as3

Hi, i have seen in flash game that it retrive user's friend in same application.How is possible.I searched the code but i have not found yet.Please help me . Thank you ...

Scrollbar skininng problem

I'm skinning scrollbar in my flex app and got one problem. This white square between scrollbars(view the image) ruibs all my design and i need to disable it, make it invisible, change it background color, alpha or smth like this. I can paste some code here but i think there is no need in it. Working in Flex 3. any ideas? ...

communication between as2 and as3

I have this code under a button in 'as2.swf' on (release) { unloadMovie(this); } and this swf is being loaded into as3 container called 'main.swf', but when i press it nothing happens and the file does not unload itself. any one can enlighten me on that? ...

Undocumented AS3 API

Recently, I happen to know MovieClip.addFrameScript() which is very useful, otherwise timeline script should be coded in fla. Do you know any other undocumented Actionscript3 API? ...

Why are (almost) all the on-line games written in ActionScript (Flash) not Java?

I absolutely love good defender games (e.g. Gemcraft, Protector: reclaiming the throne) as they can be intellectually quite challenging; it's like playing chess but a little less thinking and a bit more action. Sadly, there are not that many good ones out there and I thought I would create one myself and share it with the rest of the wor...

AS3 : RegExp exec method in loop problem

Hi everyone, I need some help about RegExp in AS3. I have a simple pattern : patternYouTube = new RegExp ( "v(?:\/|=)([A-Z0-9_-]+)", "gi" ); This pattern is looking for the youTube id video. For example : var tmpUrl : String; var result : Object; var toto : Array = new Array(); toto = ["http://www.youtube.com/v/J-vCxmjCm-8&am...

Having trouble with Flash, Javascript and JQuery

I'm using JQuery with the jQuery flash plugin and trying to send a JS call back to the flash, I keep running into "xxx is not a function" so apparently something is off. I'm new to JQuery and very new to this jquery flash plugin and just can't quite wrap my head around what I am doing wrong. Here's where I'm lading up the flash: <div i...

display custom tile for missing tiles in google maps app

I am working with google maps in flash, and i would like to know how to serve up my own image tile for the "we have no imagery at this zoom level..." error. I dont want to serve up an entire map of images - just for the times when google has no image does the tile layer base dispatch an event? (i couldnt find any in the api) is there ...

flash blocking javascript events

this is an edit of the original post now that I better understand the problem. now with source code! In IE, if body (or another html div has focus), then you keypress & click on flash at the same time, then release... a keyup event is never fired. It is not fired in javascript or in flash. Where is this keyup event? This is the orde...

AS3 Override const

I am trying to do the following: public class character extends entity { public const type:int = CHARACTER; } public class entity extends Sprite { public const type:int = INVALID; public const INVALID:int = -1; public const CHARACTER:int = 1; } But the compiler throws: Error: A conflict exists with inherited definition dieEngine:e...

Breaking a concave polygon into convex ones.

I'm using a game physics library (Box2D) which only supports convex polygon shapes. However, I'd like the level builder to be able to just specify concave polygons without having to worry about that. So, how can I automatically break apart a concave polygon into convex ones (or even all triangles). Speed would be cool, but ease of imple...