Groups | Blog | Home
all groups > flash actionscript > march 2004 >

flash actionscript : MX2004, window component, UI components



lmueller
3/17/2004 11:04:58 PM
I seem to be missing the point completely.

I am using the window component, its contentPath is preset to the linkage
symbol of a movieClip object.
The window displays correctly.

the documentation (?) shows me that an event "complete" is fired when the
window is ready to be displayed.
So I write an event listener:

var objectListener = new Object();
objectListener.complete = function(evtObj) {
trace("complete event!");
iMyWindow.content.eMyTextField.text="test";
}
iMyWindow.addEventListener("complete",objectListener);

The event acually fires, but does not set the desired text field property.

the same iMyWindow.content.eMyTextField.text="test";
executed from within a button click handler, works without problems.

Also, I cannot seem to get eMyTextField.setFocus() to work.

I could set the text field in the first frame of the movieclip referenced to
by iMyWindow.contentPath, but that is besides the point. I would be interested
in presetting the contents of user interface elements before the window
component is actually drawn.

I have not been able to find anything here or elsewhere on the web that helps
with this question. If anyone could point me to the solution, or to any new
book out there that heavily emphasizes practical aspects of the MX2004
components rather than rehashing OOP principles, that would be greatly
appreciated.

Thanks very much in advance,

L.
thesalt
3/21/2004 3:36:25 PM
Hi,

I'm having exactly the same problem. I'm not able to access any content of the
pop-up window.
I wonder if this isn't a big bug on Flash MX... There are some topics in this
forum regarding the problems of accessing the actual content of the window
component.

If you have any solution on that please contact me
([E=email]dersalz@web.de[/E])

Thanks
Sals
AddThis Social Bookmark Button