actionscript-3

How to create a vertical button in Flex 3.

I'd like to create a button that is basically a rotated 90's so that it is in effect a vertically aligned button. So that the the text is like that of a book spine. Thanks in advance. ...

Enhanced Flex textarea / text viewer components?

Is there any advanced textarea() component (AS3) for Flex available that could be used for both viewing/exiting text nicely? It would be good to have a text select feature, too. ...

import mx.controls.TextArea; not working with Flex 3.2 ?

Why the TextArea class is not available for my Flex Builder 3? Project has flex32 SDK in buildpath. other imports are OK. import flash.display.*; import flash.events.*; import flash.geom.*; import flash.net.*; import flash.text.*; import flash.utils.*; import mx.core.*; import mx.controls.TextArea; ...

rtmp and adobe media player

We have acquired hosting of a Flash Media Server for prototyping, and we are trying to stream videos using Adobe Media Player. While we know that this is possible, we are curious as to what steps are needed to do this: Do we need to create a server side app in order to stream, or can we just host the videos? We already have pre-existin...

How do I draw text in an ActionScript 3 sprite?

I have some sprites that the users can manipulate, drag around and resize. Now I'd like to be able to display text in those sprites. I've tried lots of, probably stupid, ways. Like inheriting from Label and adding a Label child to the sprite, but no text shows up. One disturbing thing: Inheriting from Label I get the text to show up if...

ActionScript 3 clock example in flash

I am currently reading the book called "Programming ActionScript 3.0" available from Adobe. After the chapter about "Working with dates and times" the book provides some examples. http://livedocs.adobe.com/flex/3/html/help.html?content=Part6_ProgAS_1.html However, their archive contains only the sources for the Flex version. Here is my...

How to determine the total number of "initProgress" events coming from the preloader?

The flash preloader emits FlexEvent.INIT_PROGRESS events to signal the progress of the flash application initialization. However, the number of times this event is dispatched depends on the application itself. I am trying to determine this number, but I couldn't find an answer in the Flex documentation, so right now I resort to experime...

customizing flash.display.textfield class (source)

Is the source code available somewhere just to make a few small fixes to textfield class? ...

TextArea font does not change (for editing) if its blank

I have a text field (flash.display.textField) for editing, but the default font does not change unless I put some data there e.g. with AppendText() or .Text="" private var editarea:TextField editarea.setTextFormat(FontFormat); editarea.appendText (""); // = " "; // font stays wrong if blank editarea.setTextFormat(FontFormat); ...

prevent copy+paste for TextArea()

How to prevent ctrl+v paste for flash.display.textarea()? field.selectable = false; does not seem to work, also it disables caret/cursor ...

TextArea() - handling text content as list of words

I Like to have access to items/list of words in TextArea, like Word(2), is there any native support for that in TextArea() or some good List object to be used. E.g. 1stword=TextArea.TextAsList(1) 2ndword=TextArea.TextAsList(2) Since there is already .htmltext, is there some HTML object that could be used to make such a list eas...

TextField() Set caret position

How to set the caret position, there is only this.caretIndex (READ) ...

TextField() - filter backspace key away with event listener

How to prevent a specific key such as backspace key functioning from TextField editable field, preventDefault does not seem to work: public function handleEvents(evt:KeyboardEvent):void { if (evt.type == KeyboardEvent.KEY_UP) { if (evt.keyCode==8){ evt.preventDefault () ; } } ...

single String.split() call for splitting both CRLF and space..

How to use string.split() for both CRLF and whitespace ? Do I need regexp? ...

making a static/class function outside class

how to make a class function with actionscript, I need to have a few static tool functions that are easily used from other classes like test = tools.rtrim(xx); e.g. this does not compile: package com.my.tools { static function rtrim(string:String):String { return string.replace(/\s+$/,""); } } ...

destroy array()

How to free up memory and destroy Array, is it ok to do just like this myarr = null myarr = new Array is all the old content of myarr now freed from memory? ...

What Flash player version is required by (simple) Flex 3 apps ?

What Flash player version is required by Flex 3 app ? Requirement seems to be HTML WRAPPER/ACTIONSCRIPT compiler setting inside FLEX development environment; what can I choose there to allow maximum compatibility with old flash players? Will v8 player work? ...

Focus issues, focus sometimes goes to unknown object

[FocusEvent type="focusIn" bubbles=true cancelable=false eventPhase=3 relatedObject=null shiftKey=false keyCode=0] When I click with a mouse an TextField, I would like that another (editable) field gets focus, but currently focus is lost somewhere.. I dont know where focus is. I made a listener to textfield which tries to set focus...

Cursor disappears when TextField.selectable = false;

Cursor disappears when TextField.selectable = false; How can I make cursor to be visible but textfield not selectable(with mouse) or CTRL+A. ...

Detecting GPU rendering in Flash Player 10

Apparently, in Flash 10, you can use the GPU to calculate shaders, and if the user doesn't have a compatible gpu, it falls back to the cpu. The problem is that the cpu is very slow to calculate the filters, it would be nice to detect if it can't use the gpu, and use fewer effects. Is it possible to detect using actionscript if it's using...