Re: [Flashcoders] MVC(S) Question

2009-03-01 Thread dr.ache
Hi Glen. Normally you can/should combine UI elements logically together. Your ui elements for the video player, the ones for the jukebox etc.There is no need for an individual controller for every button. To emphasize the state machine again you can enable/disable controllers during state transi

Re: [Flashcoders] InputTextField issue

2009-03-01 Thread Juan Pablo Califano
True, but it think the user will have to click somewhere in the swf anyway to begin interacting with it, because when the swf loads in the html, it doesn't have focus (unless it tabs to the swf). Maybe you could try to force focus on the swf with javascript... Cheers Juan Pablo Califano 2009/3/

Re: [Flashcoders] MVC(S) Question

2009-03-01 Thread Glen Pike
Hi Dr Ache, Yes - the state machine idea was something I had for a kind of "screen manager" class to transition between the "screens" - View1 & View2 below. My screens contain 1 or more views depending on how complex the views are (trying to break stuff down), but to keep the loose cou

Re: [Flashcoders] InputTextField issue

2009-03-01 Thread Juan Pablo Califano
This one has bitten me many times, so that's why I remember it! Anyway, it would make more sense to start with 0, since almost everything else (arrays, string indexes) is 0 based. Cheers Juan Pablo Califano 2009/3/1, Gerry : > > This is true. I started with 0 which is incorrect, I've been worki

RE: [Flashcoders] InputTextField issue

2009-03-01 Thread Cor
Juan, My mouse move did not work and your mouse down does work! But the problem is still there, the user HAS to click. Thanks!! Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Cor Sent: zondag 1 maart

RE: [Flashcoders] InputTextField issue

2009-03-01 Thread Cor
Juan, Thanks, I had made the exact same this workaround but with MOUSE_MOVE: stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoved); function mouseMoved (e:MouseEvent) :void{ stage.focus = inputTextField; stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseM

Re: [Flashcoders] InputTextField issue

2009-03-01 Thread Gerry
This is true. I started with 0 which is incorrect, I've been working with Arrays this week so a 0 index slipped in there. -Gerry On Mar 1, 2009, at 7:53 AM, Juan Pablo Califano wrote: Hi, I'm almost certain that tabIndex is 1-based not 0-based, so it should be: txtName.tabIndex = 1; txt

[Flashcoders] Duplicate Bitmap and scale question

2009-03-01 Thread natalia Vikhtinskaya
Hi Please explain what is wrong in this code: function duplicateMovieClipImage(from:MovieClip, target:MovieClip){ var visuals = new flash.display.BitmapData(from._width, from._height); visuals.draw(from); target.attachBitmap(visuals, 1,"auto",true); } duplicateMovieClipIma

Re: [Flashcoders] InputTextField issue

2009-03-01 Thread Juan Pablo Califano
Cor, first, bear in mind this is a gross hack, but I haven't found another way around yet (if someone has found a more elegant way, please share!). This is a solution (well, sort of) I came across when I had to deal with a very similar problem. In the IDE, the textfield actually gains focus, but t

RE: [Flashcoders] InputTextField issue

2009-03-01 Thread Cor
Thanks Juan! I am still not able to set the focus to the input textfield on opening. Any ideas? Kind regards Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Juan Pablo Califano Sent: zondag 1 maart 200

Re: [Flashcoders] InputTextField issue

2009-03-01 Thread Juan Pablo Califano
Hi, I'm almost certain that tabIndex is 1-based not 0-based, so it should be: txtName.tabIndex = 1; txtEmail.tabIndex = 2; txtAddress.tabIndex = 3; txtCity.tabIndex = 4; Also, Cor, when testing inside the IDE, you should check "disable keyboard shortchuts" in the control menu; otherwise, the IDE

Re: [Flashcoders] best way to perform collision detection on rigid objects?

2009-03-01 Thread Juan Pablo Califano
Hi, I haven't dig into 3D, but recently I've found this blog post about 3D collisions. http://papergem.wordpress.com/2009/02/13/3d-collisions-basics/ Cheers Juan Pablo Califano 2009/2/28, Anthony Pace : > > For 2d I would assume a xor for the solid object created by a shape created > by the dis