actionscript-3

Flex: Points to pixels and back again

So I have extended the PlotChart that comes with Flex to have the ability to draw trend-lines. To do this, I have to get pixel positions. How can I convert (100px,100px) in pixels to a point on the graph, such as (0.7,1.0)? ...

AS3 (or any language) trig library for triangles?

Does anyone know of a library for easily dropping in parameters of angles and lengths of sides, and letting it automagically extrapolate the non-given angles and lengths using trig? Even if it had lame performance, it would be very useful for prototyping, and performance could be optimized (even supplying table lookup and the sort). If...

Change MovieClip width along with dynamic text field's size inside it.

Hi, I am a newbie in Flash CS3. I was wondering if anyone could tell me how resize the width of of a movie clip according to the size the size of dynamic text inside it. I did it by creating a text field 'myText' and then converted it to a MovieClip symbol and named the MovieClip as myClip. The text in myText is assigned at run-time an...

Solution to skew bitmaps in flash

I'm looking for a solution to skew images. Flash only allows skewing of vector-based objects. I tried to use matrices but could not get a propriate solution. The goal is to do something like a threefold-brochure which folds out in two steps. Does someone have a hint or example code for this? UPDATE! Maybe my message was a little bi...

FLVPlayback won't seek when streaming from flash media server. How to fix?

I have a simple video player set up that streams from a flash media server. The video plays fine, but the majority of the seek commands send it back to the first frame of the video. If I don't use flash media server it will seek to any point which has already been loaded. Any ideas what could cause this? ...

Flash (as3) printing .. data ? html ?

I need to add a print button to my page that should print a certain page the best way should be that i add an html and that it would print from out flash or is it possible to open a html page and automatically open the print dialog box? it's in AS3 ...

How to get different country time into single page using flex or flash (action script 3) because getTime() used for get current time only.

i am beginner dont know how do display all country time into a single page using action script 3 in flex . do u know any example time code refer me . i will try that code . ...

How to embed a excel sheet inside the property sheet of a flex component?

I am trying to create a custom component in flex using mxml. I have created the property sheet for the custom component but it needs a button which onclick has to point to a cell in excel sheet from which data can be retrieved. How to go about this? ...

Flex AS3 - Dispatching Event between classes

Hi I thought I had custom events nailed in Flex, but seemingly not. I am trying to loosely couple my application by dispatching events between classes instead of using horrid parent.parent.parent statements. I have a ComboBox inside a custom HBox class... for simplicity I am doing the following public function onComboBoxChange(event:M...

Flex AS3 - Dispatch Event to all instances of ItemRenderer

Hi I have a List that uses a custom ItemRenderer. Is there a way for the owner (List) to dispatch a custom event I have created, to all instances of it's ItemRenderer? For example, I want to dispatch an event that will add text to a textbox within the item renderer. One or more item renderers will be able to respond to this event depen...

matrix transforms on adjacent sprites causing subpixel gaps

I have three sprites, stacked on top of each other. I modify their transform.matrix to give the appearance they are growing in unison. However, small cracks sometimes appear between the tiles depending on the scaling factor. I am wondering how to fix this. I know that text objects in AS3 have options for sub-pixel rendering. May...

going left: unrestricted / wrapping mouse tracking? in Flash?

So, I'm shooting up dudes in [3D Game], and I can keep dragging my mouse to turn left round and round. Is this possible in Flash? Or have I misunderstood how the mouse is handled within [operating system] and then passed to the Flash Player? ...

Limite the size of the modal of a “PopUp” in Flex ?

private function tileList_itemClick2(evt:ListEvent):void { img = new Image(); img.maintainAspectRatio = true; img.addEventListener(Event.COMPLETE, image_complete); img.addEventListener(ResizeEvent.RESIZE, image_resize); img.addEventListener(Mo...

Constructor arguments problem ActionScript 3

Hi, I have a custom class defined in Actionscript and I want to make an instance of it in the main document of Flash application. However, after calling the constructor with one argument, Flash gives me this error: Error #1063: Argument count mismatch on coa.application::MenuItem(). Expected 1, got 0. This is my class: public class M...

scaling function used by BitmapData.draw function?

What scaling functions are used by the BitmapData.draw function for smooth and not smooth drawing? (Libraries like clevrlib allow for bilinear and bicubic sampling, which suggests that neither is what flash is doing natively.) ...

Problem capturing Japanese character input with Javascript in IE

I am trying to pass keyboard input from Javascript into a Flex app being displayed with Internet Explorer with the input language set to Japanese (using Full Katakana) in the Windows XP language bar. After an initial keystroke, I am passing focus from Javascript to a text field in Flex. Once the focus is in Flex, the IME wakes up and i...

Class mapping in ZendAMF - actually useless?

Some concerns about ZendAMF.... one question about ZendAMF and the integration of Flex (AS3) with PHP5. What is the sense of definining Value Objects in PHP and perform all the explicit class mapping with AS3 classes, when type checking is not enforced anyways? Example: I create a Contact object in PHP, add some non-member variables an...

convert html characters back to text in Flash - AS3

I need to generate an editable xml file to supply content to a flash website. I am generating my file with a html form, and htmlspecialchars e.g.: $currentItem = htmlspecialchars(stripslashes($currentItem)); This is to prevent xml entries which would produce the error "XML Parsing Error: not well-formed", such as <entry title=...

FlexBuilder to FDT Migration

I'm new to FDT and I'd like to move some (actionscript)projects from FlexBuilder to FDT. I've noticed FDT can read .actionscriptProperties from FlexBuilder, so just setting the workspace to my FlexBuilder workspace got the projects, the current one open, the rest of them closed which is great. I got a an error on the way: "Error openi...

Flash - Controls fade in and out on rollovers

I've been hacking away at this a while to come up with a good solution, but basically, I have a Flash project that has a set of controls on it. When you roll over the controls, the controls will fade in, then when you roll out, they will fade back out again. I have all the controls on a seperate movie clip that has the tweens to handle...