actionscript-3

removing a child

anybody please? here's the scenario. i have added a child which is a movieclip from the library, this child has a close button where it should call removeChild which is itself. I am new to AS3 that's why I am having a problem fixing this. Thanks, Ron ...

Grey out sprite in AS3?

Is there an easy way to grey out a sprite? I'm disabling a button, and I know how to do that, but wants to convey that in the GUI. ...

C#: What is the value added by commanding?

When looking into MVC frameworks for flex, as3, silverlight, and wpf... a common concept of ICommand / commanding keeps appearing... Can anyone explain the advantage of using ICommand / Execute() ? Where I dont see the value added is - Why can't the controller map the input (ie: a click event) to the correct method inside of the model? ...

AS3 - Using Matrix3D objects for reordering display

I'm working with about 20 objects that are moving around in 3D space. Adobe recommends "Using Matrix3D objects for reordering display": Use the getRelativeMatrix3D() method of the Transform object to get the relative z-axes of the child 3D display objects. Use the removeChild() method to remove the objects from the display list. Sort t...

Prevent copying style from one flex textArea to another

If you have two text areas with different styles (fontFamily, weight, color etc) and you copy text from one to the other it also copies the style from the originating text area. Is there any slick way to prevent that? Here is a sample of code that will illustrate the problem. Type some text in the top box and some text in the bottom, ...

Merge multiple MovieClips into a single MovieClip

Hi, I've multiple videos stored as MovieClip objects and would like to merge them into a single MovieClip video object in order to play all of them in sequence (so that a user thinks it's a single video). Thanks a lot! EDIT: I want to do it programmatically in ActionScript inside the Flash Player. ...

Scaling onstage MovieClip w/ "scaleX" breaks timeline animation ...really?

I'm scaling onstage MovieClips via AS properties "scaleX" or "scaleY", which kills any kind of animation the clips have within their container MovieClip, be it Classic or Motion Tweens. When I don't scale the MovieClips, they animate fine. I'm able to tell the clips to "gotoAndStop" on their own internal frames, and that doesn't affect t...

Flex Builder not building changes

I'm having a very strange bug in Flex Builder where none of the changes I make are appearing when I debug/run my program. It only happens with a particular AS3 project, on others, it works fine. For example, I have a line,var x:int = this.prevX + this.x;, whose value is 400 if I don't make any changes. I change the line to var x:int = 0...

ActionScript - load video from users hard drives without server.

Hi, I need to play on my .swf a movie (h264) from the users' hard drive. Unfortunately the as3 components only read from URLs or streams, and you can't set the data or load from your c:/ path as the security sandbox stops you. Here is what each component loads: Video >> netStream VideoDisplay >> URL VideoPlayer >> URL I tried attac...

Flex 3: Rollout/RollOver event dispatching problem

Hi I'm making a right toolbar with different buttons on it. When i rollover it, it slides inside the view and when i rollout it slides out of the view almost 90%. each button on it also has some rollOver/Out event listeners. Problem is, when i rollover on any button, then the rollout event of the container(toolbar) get dispatched and t...

Adding drag & drop to a datagrid column in flex

I have two datagrid components and I would like to drag one column from one component to the other. I have been trying several methods but I couldnt acomplish that. Can anybody help me with this? ...

Binding custom components values

I have built a custom component using some containers and a TileList. Now when I instantiate that component in my main Flex app, I want to get the value of the selected item in the tileList that the user clicks on. In other words, everytime the user clicks an item in the tileList, I want it to assign that selected value to a global appli...

Getting VIM to be efficient in Actionscript like Flex

I'm trying to setup VIM for editing Actionscript 3 for some upcoming Flash projects. I dislike working in an IDE and prefer VIM. Right now, I know that I want: Omnicomplete (with tab completion) Syntax highlighting (there is an actionscript.vim file on vim.org but the highlighting is not as good as other syntax files) AS3 compiler acce...

Closure problem? - passing current value of a variable

I'm trying to pass the current value of a variable when an a dynamically generated navigation 'node' is clicked. This needs to just be an integer, but it always results in the last node's value.. have tried some different methods to pass the value, a custom event listener, a setter, but I suspect it's a closure problem.. help would be ap...

display list management in actionscript 3 applications

Does anyone have suggestions for a good method to manage the display list in an actionscript 3 project? I'm building an application at the moment and keeping track of all the modules which need to be displayed and reordering them has become unwieldy. I have loaded swfs and instantiated classes that also load in swfs, images and video.....

Contact a remote server on a specific port with Actionscript?

Does flash actionscript allow you to contact an arbitrary server on a specific port? I would like to stream some images live from a server using a proprietary protocol. Or does the browser disallow this for security reasons? ...

AS3: How to organize code, in case remote services are called

Hi! In my flex application I use services a lot. I need them to update my data in the application, so call them quite often. Currently I implemented it in the following way: 1) There is a service provider (AMFLoader class) 2) And response handler (Responder class) The code looks like this: public function AMFLoader(url:String):void {...

BlazeDS accessing HTTPRequest/HTTPSession in custom Java MessageAdapter

In a custom MessageAdapter written for a BlazeDS Java server, is there any way to access HTTPSession and HTTPRequest in a custom MessageAdapter. I'm trying to adapt an existing COMET JSON long-poll messaging system to BlazeDS and we use HTTPRequest parameters to specify message sending/polling paramers (such as a unique ContextID for an...

Flash & Javascript cooperation problem

I need to call function in flash using javascript. For this purpose I use ExternalInterface class(example described in the end of http://help.adobe.com/ru%5FRU/AS3LCR/Flash%5F10.0/flash/external/ExternalInterface.html). But it does not work for me. swf declared in html page as: <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-4445535400...

RST packet sent by the server

I am developing a client in Flash and using http req/resp to communicate with the server. For a while the session works fine and then the connection is terminated by the server. I did a wireshark sniff at the server and the last message which it sends is a RST packet. Also it happens only when I'm using IE and the server and client are i...