LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-04-2006, 05:41 PM
yossarian yossarian is offline
Registered User
 
Join Date: Mar 2006
Posts: 15
Rep Power: 0
yossarian is on a distinguished road
Window Component depth issues?

Hi all,

I've had this problem a few times now and I'm not sure what I'm doing wrong.

I have a Flash movie that attaches a .as defined MovieClip in the first frame of the timeline.
In my MovieClip class, I attach a background image movie and a couple of buttons and whatnot - basically building a screen.

If the user clicks a certain button on the screen (the button is defined entirely in actionscript and isn't on the flash stage at all), then I want to pop up a Window component.

In my class file, I define _win:Window; but do not instanciate it initially.

I defined the button's onPress event inside a load listener - this is that definition.

loadListener.onLoadComplete = function(targetMovie:MovieClip):Void {
targetMovie.onPress = function() {
_parent._win = PopUpManager.createPopUp(_parent, Window, true, { title:"", closeButton:false});

for (var i in _parent) {
trace("I is " + i + " at depth " + _parent[i].getDepth());
}
}
}

Now, if you look at that, all it does is say, when the button is pressed, create a new pop up - put it into the _win variable in the button's parent. The window is to be placed at '_parent' (see the first parameter in the createPopUp call).

The wee for loop there just outputs depths of all MovieClips in my class.

From the above code, I would expect a basic window to appear on top of all my movies - since the Window component created by PopUpManager is supposed to start at _parent and work it's way to the top then draw. For some reason, the Window component is put BEHIND all the other movies my class creates. Why is this?

The depths output by my for loop are as follows

I is _win at depth 100
I is currentlyHighlightedStaff at depth undefined
I is sizePerStaffY at depth undefined
I is sizePerStaffX at depth undefined
I is facesPerRow at depth undefined
I is fireButton at depth 9
I is bonusButton at depth 8
I is wageButton at depth 7
I is staff1 at depth 6
I is staff0 at depth 5
I is mcFireEmployeeDBox at depth 4
I is mcDiagFireButton at depth 3
I is textField at depth 2
I is dataBox at depth 1
I is backgroundImage at depth 0

It looks there like _win should be on top - why isn't it?

Any ideas?

I've uploaded a screenshot to http://www.businessplayground.co.uk/...owproblems.gif to show you what I mean.

Thanks

David
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Window Issues xenomorph_girl Newbies 6 08-15-2006 10:24 PM
Scalable window component going weird dkmystery Actionscript 1 Components 1 08-04-2006 07:44 AM
Window component and on (click) christaylor Flash MX 2004 2 07-15-2005 11:55 AM
window component madhava Actionscript 2.0 Components 1 05-27-2005 03:48 PM
refresh content of the Window component? zvone Flash MX 2004 1 09-07-2004 08:28 PM




All times are GMT. The time now is 11:36 AM.