Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flex > Flex 2, 3 & 4

Reply
 
Thread Tools Rate Thread Display Modes
Old 04-25-2008, 03:01 AM   #1
cheesecake
Registered User
 
Join Date: Apr 2008
Posts: 6
Default Flex 3 popup manager or is there a better way?

I am trying to find a way to make it so when a user click on a TabNavigator, it pops up into a larger version on the screen, then when its closed, it goes back to where it was (or stays there the whole time)

I am currently trying to do it with PopUp Manager, but what is happening, is the TabNavigator is not replaced, and is removed from the original spot.

How can i make this happen? or should I not be using PopUpManager all together?

private var _TabPopUp:TitleWindow;

private function createTabPopUp(_id:TabNavigator):void{
_TabPopUp = new TitleWindow();
_TabPopUp.addChild(_id);
_TabPopUp.showCloseButton = true;
_TabPopUp.addEventListener(CloseEvent.CLOSE, closePopUpCloseEvent);

PopUpManager.addPopUp(_TabPopUp,this,true);
PopUpManager.centerPopUp(_TabPopUp);
}


private function closePopUpCloseEvent(evt:CloseEvent):void{
PopUpManager.removePopUp(_TabPopUp);}

...

<mx:HBox id="_TabHBox" x="50" y="430" width="700" height="160">
<mx:TabNavigator id="_TabStructure" width="700" height="160"
click="createTabPopUp(_TabStructure)">
<mx:Canvas id="_TabCanvas1" label="Tab 1" width="100%" height="100%">
<mx:Text text="This is some info"/>
</mx:Canvas>
</mx:TabNavigator>
</mx:HBox
cheesecake is offline   Reply With Quote
Old 09-03-2008, 11:53 AM   #2
sbpandey
Registered User
 
Join Date: Sep 2008
Posts: 1
Default Reply

Quote:
Originally Posted by cheesecake View Post
I am trying to find a way to make it so when a user click on a TabNavigator, it pops up into a larger version on the screen, then when its closed, it goes back to where it was (or stays there the whole time)

I am currently trying to do it with PopUp Manager, but what is happening, is the TabNavigator is not replaced, and is removed from the original spot.

How can i make this happen? or should I not be using PopUpManager all together?

private var _TabPopUp:TitleWindow;

private function createTabPopUp(_id:TabNavigator):void{
_TabPopUp = new TitleWindow();
_TabPopUp.addChild(_id);
_TabPopUp.showCloseButton = true;
_TabPopUp.addEventListener(CloseEvent.CLOSE, closePopUpCloseEvent);

PopUpManager.addPopUp(_TabPopUp,this,true);
PopUpManager.centerPopUp(_TabPopUp);
}


private function closePopUpCloseEvent(evt:CloseEvent):void{
PopUpManager.removePopUp(_TabPopUp);}

...

<mx:HBox id="_TabHBox" x="50" y="430" width="700" height="160">
<mx:TabNavigator id="_TabStructure" width="700" height="160"
click="createTabPopUp(_TabStructure)">
<mx:Canvas id="_TabCanvas1" label="Tab 1" width="100%" height="100%">
<mx:Text text="This is some info"/>
</mx:Canvas>
</mx:TabNavigator>
</mx:HBox
REPLY:
<mx:Script>
public function closePopUp(evt:CloseEvent):void{


T.height = 0;
T.width = 0;
parent_obj.addChild(target_obj);
popuplaunched=false;
PopUpManager.removePopUp(T);
}

private function browse(event:Event):void{

if(popuplaunched == false){
target_obj=(DisplayObject)(event.currentTarget);
/*------------------------------- */
parent_obj = target_obj.parent; //<<<<<< HERE
/*------------------------------- */
T = new TitleWindow();
T.height=Application.application.height;
T.width=Application.application.width;
T.addChild(target_obj);
T.showCloseButton = true;
T.addEventListener(CloseEvent.CLOSE,closePopUp);
PopUpManager.addPopUp(T,Application.application as
DisplayObject,true);
PopUpManager.centerPopUp(T);
popuplaunched = true;


}
}
</mx:Script>

Hi see this code , u need to concerntrate On ObjectDisplayContainer means parent of target Object. the same problem i were facing now resolve.
carry on >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
sbpandey is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel and Flex interaction rico Flex 2, 3 & 4 1 08-01-2008 04:31 PM
Flex Project Data services RR_QQ Flex 2, 3 & 4 0 01-28-2008 11:33 PM
Is flex for me??? roshankolar Flex 2, 3 & 4 4 09-27-2007 07:34 PM
Flex 2 vs Flex 2.1 Chuck Taylor Flex 2, 3 & 4 2 03-13-2007 08:13 PM
Question about Flex 2 vistasoul Flex 2, 3 & 4 1 02-28-2006 05:07 AM


All times are GMT. The time now is 10:39 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.