RE: [flexcoders] Internal popups

2005-05-13 Thread Allen Manning





Hello Jeff,

Have you thought of using a View Stack with a Title 
Window? For a project we were working on, we first started with a Popup 
Window, but found performance to be a problem. 

We switched to a simulating a popup via a Title Window / 
View Stack and found it more performant and more usable.

HTH,
Allen

  
  

  


  

  Allen 
Manning, Technical Director 

  Prismix 
Ltd t: +44 (0)870 749 1100 f: +44 
(0)870 749 1200 w: www.prismix.com










From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Jeff 
BeemanSent: 12 May 2005 17:56To: 
flexcoders@yahoogroups.comSubject: [flexcoders] Internal 
popups


Ive been scouring the 
documentation, but I cant seem to find how to do something that should be quite 
simple. How do I create a popup window that doesnt reference an external 
file? All examples point to loading in an external mxml file, but I would 
like to simply create a panel that is hidden on startup and have it hide / 
unhide on different events. Is this possible?


/ Jeff 
Beeman* Digital Media  Instructional Technologies* Arizona State University***/








Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










Re: [flexcoders] Internal popups

2005-05-13 Thread Sreejith Unnikrishnan






Example code ...

You would also be able to dynamically change the content, size,
poistion, etc of the popup. By passing a 'placement' value you can
decide whether it opens on the right or below.


?xml
version="1.0" encoding="utf-8"?
  mx:Application
xmlns:mx="http://www.macromedia.com/2003/mxml" width="100%"
height="100%"
  mx:Script
  ![CDATA[
  function openPopup(placement)
{
   popupx.visible = true;
   if (placement == "right")
{
   popupx.y = caller.y;
   popupx.x =
caller.x+caller.width;
   }
   else {
   popupx.x = caller.x;
   popupx.y =
caller.y+caller.height;
   }
  }
  function closePopup(){
   popupx.visible = false;
  }
  
  ]]
  /mx:Script
  mx:Canvas id="mainCanvas"
width="100%" height="100%"
   mx:HBox id="main"
width="100%" height="100%"
mx:TextInput
id="caller" text="Mouseover to open Popup" width="250"
mouseOver="openPopup('bottom')" mouseOut="closePopup()" /
   /mx:HBox
   mx:HBox id="popupx"
width="250" height="75" backgroundColor="#FF" visible="false"
mx:Text
text="Popup" color="#FF" fontWeight="bold" /
   /mx:HBox
  /mx:Canvas
  /mx:Application


Jeff Beeman wrote:

  
  

  
  

  
  
  Thanks, all,
for your help! Ill give this
a shot and see if it can handle my needs.
  
  
  
  /**
* Jeff Beeman
******/
  
  
  
  
  From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matthew Shirey
  Sent: Thursday, May
12, 2005 12:10
PM
  To: flexcoders@yahoogroups.com
  Subject: Re:
[flexcoders] Internal
popups
  
  
  Yeah,
you were just a
little quicker than me getting that one posted. Mine is pretty much
the
same solution:
  
?xml version="1.0" encoding="utf-8"?
  
mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
  
 mx:Script
  ![CDATA[
  
   function toggleVis(){
   
tw.visible = !tw.visible;
   }
  ]]
 
 /mx:Script
 
 mx:Canvas width="100%"
height="100%"
  mx:VBox x="0"
y="0" width="100%" height="100%"
horizontalAlign="center"
   mx:Button
click="toggleVis()" label="click me"/
  /mx:VBox
  mx:TitleWindow x="100"
y="0" id="tw" title="Some title"
width="300" height="200" visible="false"
   mx:Label
text="hi there"/
  /mx:TitleWindow
 
 /mx:Canvas
  
/mx:Application
  
-- Matthew
  
  On
5/12/05, Sreejith
Unnikrishnan [EMAIL PROTECTED]
wrote:
  
  ok ... thats
interesting ..
  
  
  Here's an
idea ... you can try it ...
  
  
  
  
  
  mx:Application
  
  
  
mx:Canvas
  
  
   mx:HBox
  
  
  // Your
entire application goes here //
  
  
   /mx:HBox
  
  
   mx:HBox
  
  
  // The poup
you need can go in here
preferably in another Hbox hidden initially that takes x and y
coordinates that
you can pass either by mouse coordinates on Click//
  
  
   mx:HBox
x="" y=""
  
  
  
/mx:HBox
  
  
   /mx:Hbox
  
  
   /mx:Canvas
  
  
  mx:Application
  
  
  
  
  
  :-)
  
  
-Original
Message-
From:
flexcoders@yahoogroups.com
[mailto:
flexcoders@yahoogroups.com]
On Behalf Of Jeff
Beeman

Sent: Friday, May 13, 2005
12:18 AM
To: flexcoders@yahoogroups.com
Subject:
RE:
[flexcoders] Internal popups






Hmm still
not what I'm looking for. I guess what I
would like is for something like this (what the previous responder
sent) to
work:

?xml
version="1.0" encoding="utf-8"?
mx:Application
xmlns:mx="http://www.macromedia.com/2003/mxml"

mx:Button
click="toggleVis()" label="click me"/

mx:TitleWindow id="tw" title="Some title"

mx:Label text="hi there"/

/mx:TitleWindow

mx:Script

![CDATA[

function toggleVis(){

tw.visible = !tw.visible;

}

 ]]

/mx:Script
/mx:Application

But
I need the TitleWindow to behave not like a standard interface element
(one
that takes up space in the layout), but like a normal popup window, one
that
appears above the content at a specified location.

It
looks like using another MXML file is the way to go





/**
* Jeff Beeman
**/




From: flexcoders@yahoogroups.com
[mailto:
flexcoders@yahoogroups.com] On
Behalf Of Matt
Horn
Sent: Thursday, May
12, 2005 11:41
AM
To: flexcoders@yahoogroups.com
Subject: RE:
[flexcoders] Internal
popups


Here's an
example that uses createPopUp() to create a
TextArea

RE: [flexcoders] Internal popups

2005-05-13 Thread Jeff Beeman










Were you able to use the ViewStack to hide
/ unhide a popup window without the content underneath being
hidden? My popup window will be of a smaller size than my application window.







/**
* Jeff Beeman
**/











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Allen Manning
Sent: Friday, May 13, 2005 1:42 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Internal
popups





Hello Jeff,



Have you thought of using a View Stack
with a Title Window? For a project we were working on, we first started
with a Popup Window, but found performance to be a problem. 



We switched to a simulating a popup via
a Title Window / View Stack and found it more performant and more usable.



HTH,

Allen


 
  
  
  
   



   
   

Allen Manning, Technical Director 

   
   

Prismix
Ltd t:
+44 (0)870 749 1100 f: +44 (0)870 749 1200 w:
www.prismix.com

   
  
  
  
  
 
























































From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jeff Beeman
Sent: 12 May 2005 17:56
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Internal
popups

Ive been scouring the documentation, but I
cant seem to find how to do something that should be quite simple.
How do I create a popup window that doesnt reference an external
file? All examples point to loading in an external mxml file, but I would
like to simply create a panel that is hidden on startup and have it hide /
unhide on different events. Is this possible?





/***
* Jeff Beeman
* Digital Media  Instructional Technologies
* Arizona State University
***/














Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












Re: [flexcoders] Internal popups

2005-05-13 Thread Sreejith Unnikrishnan






Did you check out the code I
posted ...
Viewstack can display only one view at a time ... thats why you should
use the canvas+hbox

Jeff Beeman wrote:

  
  

  
  
  
  
  Were you
able to use the ViewStack to hide
/ unhide a popup window without the content underneath being
hidden? My popup window will be of a smaller size than my application
window.
  
  
  
  /**
* Jeff Beeman
**/
  
  
  
  
  From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Allen Manning
  Sent: Friday, May 13,
2005 1:42 AM
  To: flexcoders@yahoogroups.com
  Subject: RE:
[flexcoders] Internal
popups
  
  
  Hello Jeff,
  
  Have you
thought of using a View Stack
with a Title Window? For a project we were working on, we first
started
with a Popup Window, but found performance to be a problem. 
  
  We
switched to a simulating a popup via
a Title Window / View Stack and found it more performant and more
usable.
  
  HTH,
  Allen
  

  



  

  
  
  


  
  Allen
Manning,
Technical Director 
  


  
  Prismix
Ltd t:
+44 (0)870 749 1100 f: +44 (0)870
749 1200 w: www.prismix.com
  

  




  

  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jeff Beeman
  Sent: 12 May 2005 17:56
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders]
Internal
popups
  Ive been scouring the
documentation, but I
cant seem to find how to do something that should be quite simple.
How do I create a popup window that doesnt reference an external
file? All examples point to loading in an external mxml file, but I
would
like to simply create a panel that is hidden on startup and have it
hide /
unhide on different events. Is this possible?
  
  
  /***
* Jeff Beeman
* Digital Media  Instructional Technologies
* Arizona
  State University
***/
  
  

  









Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.














RE: [flexcoders] Internal popups

2005-05-13 Thread Jeff Beeman










Yeah, youre code is what Im
looking into right now. Thanks for your help!







/**
* Jeff Beeman
**/











From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com] On Behalf Of Sreejith Unnikrishnan
Sent: Friday, May 13, 2005 8:02 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Internal
popups





Did you check out the code I
posted ...
Viewstack can display only one view at a time ... thats why you should use the
canvas+hbox

Jeff Beeman wrote: 

Were
you able to use the ViewStack to hide / unhide a popup window
without the content underneath being hidden? My popup window will be of a
smaller size than my application window.







/**
* Jeff Beeman
**/











From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On Behalf Of Allen Manning
Sent: Friday, May 13, 2005 1:42 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Internal
popups





Hello Jeff,



Have you thought of using a View Stack
with a Title Window? For a project we were working on, we first started
with a Popup Window, but found performance to be a problem. 



We switched to a simulating a popup via
a Title Window / View Stack and found it more performant and more usable.



HTH,

Allen


 
  
  
  
   



   
   

Allen Manning, Technical Director 

   
   

Prismix
Ltd t:
+44 (0)870 749 1100 f: +44 (0)870 749 1200 w:
www.prismix.com

   
  
  
  
  
  
 
























































From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On Behalf Of Jeff Beeman
Sent: 12 May 2005 17:56
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Internal
popups

Ive been scouring the documentation, but I
cant seem to find how to do something that should be quite simple.
How do I create a popup window that doesnt reference an external
file? All examples point to loading in an external mxml file, but I would
like to simply create a panel that is hidden on startup and have it hide /
unhide on different events. Is this possible?





/***
* Jeff Beeman
* Digital Media  Instructional Technologies
* Arizona State University
***/
















Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












Re: [flexcoders] Internal popups

2005-05-12 Thread JesterXL





It's compiled into the final SWF so there isn't 
technically a dependency.

However, if you want a simple popup, you could use 
an Alert.

check out Alert.show for that, and for loading 
internal components as popups, look up PopUpManager.createPopUp

- Original Message - 
From: Jeff 
Beeman 
To: flexcoders@yahoogroups.com 
Sent: Thursday, May 12, 2005 2:21 PM
Subject: RE: [flexcoders] Internal popups


I can’t find an example 
or description of how to use the TitleWindow component without it being in an 
external file. Any pointers?



/*** 
Jeff 
Beeman**/




From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] 
On Behalf Of Tracy 
SprattSent: Thursday, May 12, 
2005 10:45 AMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Internal 
popups

You probably want the 
TitleWindow component.

Tracy





From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] 
On Behalf Of Jeff 
BeemanSent: Thursday, May 12, 
2005 12:56 PMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] Internal 
popups

I’ve been scouring the 
documentation, but I can’t seem to find how to do something that should be quite 
simple. How do I create a popup window that doesn’t reference an external 
file? All examples point to loading in an external mxml file, but I would 
like to simply create a panel that is hidden on startup and have it hide / 
unhide on different events. Is this possible?


/ Jeff 
Beeman* Digital Media  Instructional Technologies* Arizona State University***/









Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] Internal popups

2005-05-12 Thread Jeff Tapper
try this:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
 mx:Button click=toggleVis() label=click me/
 mx:TitleWindow id=tw title=Some title
 mx:Label text=hi there/
 /mx:TitleWindow
 mx:Script
 ![CDATA[
 function toggleVis(){
 tw.visible = !tw.visible;
 }

 ]]
 /mx:Script
/mx:Application

At 02:21 PM 5/12/2005, you wrote:
I can't find an example or description of how to use the TitleWindow 
component without it being in an external file.  Any pointers?



/**
* Jeff Beeman
**/

--
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On 
Behalf Of Tracy Spratt
Sent: Thursday, May 12, 2005 10:45 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Internal popups

You probably want the TitleWindow component.

Tracy


--
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On 
Behalf Of Jeff Beeman
Sent: Thursday, May 12, 2005 12:56 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Internal popups

I've been scouring the documentation, but I can't seem to find how to do 
something that should be quite simple.  How do I create a popup window 
that doesn't reference an external file?  All examples point to loading in 
an external mxml file, but I would like to simply create a panel that is 
hidden on startup and have it hide / unhide on different events.  Is this 
possible?



/***
* Jeff Beeman
* Digital Media  Instructional Technologies
* Arizona State University
***/




--
Yahoo! Groups Links
* To visit your group on the web, go to:
* 
 http://groups.yahoo.com/group/flexcoders/http://groups.yahoo.com/group/flexcoders/
  

*
* To unsubscribe from this group, send an email to:
* 
 mailto:[EMAIL PROTECTED][EMAIL PROTECTED] 

*
* Your use of Yahoo! Groups is subject to the 
 http://docs.yahoo.com/info/terms/Yahoo! Terms of Service.



 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Internal popups

2005-05-12 Thread Jeff Beeman
The problem is that the TitleWindow in your example still takes up space
in the application window.  I need it to behave like a normal popup.


/**
* Jeff Beeman
**/

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jeff Tapper
Sent: Thursday, May 12, 2005 11:27 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Internal popups

try this:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
 mx:Button click=toggleVis() label=click me/
 mx:TitleWindow id=tw title=Some title
 mx:Label text=hi there/
 /mx:TitleWindow
 mx:Script
 ![CDATA[
 function toggleVis(){
 tw.visible = !tw.visible;
 }

 ]]
 /mx:Script
/mx:Application

At 02:21 PM 5/12/2005, you wrote:
I can't find an example or description of how to use the TitleWindow 
component without it being in an external file.  Any pointers?



/**
* Jeff Beeman
**/

--
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On

Behalf Of Tracy Spratt
Sent: Thursday, May 12, 2005 10:45 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Internal popups

You probably want the TitleWindow component.

Tracy


--
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On

Behalf Of Jeff Beeman
Sent: Thursday, May 12, 2005 12:56 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Internal popups

I've been scouring the documentation, but I can't seem to find how to
do 
something that should be quite simple.  How do I create a popup window 
that doesn't reference an external file?  All examples point to loading
in 
an external mxml file, but I would like to simply create a panel that
is 
hidden on startup and have it hide / unhide on different events.  Is
this 
possible?



/***
* Jeff Beeman
* Digital Media  Instructional Technologies
* Arizona State University
***/




--
Yahoo! Groups Links
* To visit your group on the web, go to:
* 

http://groups.yahoo.com/group/flexcoders/http://groups.yahoo.com/group
/flexcoders/ 

*
* To unsubscribe from this group, send an email to:
* 

mailto:[EMAIL PROTECTED]flexc
[EMAIL PROTECTED] 

*
* Your use of Yahoo! Groups is subject to the 
 http://docs.yahoo.com/info/terms/Yahoo! Terms of Service.



 
Yahoo! Groups Links



 






 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Internal popups

2005-05-12 Thread Sreejith Unnikrishnan
Title: Message





Confused? Well, maybe you should help by defining "normal popup" 
:-)

  
  -Original Message-From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
  Jeff BeemanSent: Friday, May 13, 2005 12:14 AMTo: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] Internal 
  popupsThe problem is that the TitleWindow in your 
  example still takes up spacein the application window. I need it to 
  behave like a normal 
  popup./*** Jeff 
  Beeman**/-Original 
  Message-From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] OnBehalf Of Jeff TapperSent: 
  Thursday, May 12, 2005 11:27 AMTo: flexcoders@yahoogroups.comSubject: 
  RE: [flexcoders] Internal popupstry this:?xml version="1.0" 
  encoding="utf-8"?mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" 
  mx:Button click="toggleVis()" label="click 
  me"/ 
  mx:TitleWindow id="tw" title="Some 
  title" 
  mx:Label text="hi 
  there"/ 
  /mx:TitleWindow 
  mx:Script 
  ![CDATA[ 
  function 
  toggleVis(){ 
  tw.visible = 
  !tw.visible; 
  } 
  ]] 
  /mx:Script/mx:ApplicationAt 02:21 PM 5/12/2005, 
  you wrote:I can't find an example or description of how to use the 
  TitleWindow component without it being in an external file. Any 
  pointers?/*** 
  Jeff 
  Beeman**/--From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
  OnBehalf Of Tracy SprattSent: Thursday, May 12, 2005 10:45 
  AMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] 
  Internal popupsYou probably want the TitleWindow 
  component.Tracy--From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
  OnBehalf Of Jeff BeemanSent: Thursday, May 12, 2005 12:56 
  PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Internal 
  popupsI've been scouring the documentation, but I can't seem 
  to find how todo something that should be quite simple. How 
  do I create a popup window that doesn't reference an external 
  file? All examples point to loadingin an external mxml file, 
  but I would like to simply create a panel thatis hidden on startup 
  and have it hide / unhide on different events. Isthis 
  possible?/ 
  Jeff Beeman* Digital Media  Instructional Technologies* 
  Arizona State 
  University***/--Yahoo! 
  Groups Links * To visit your group on the web, go 
  to: * http://groups.yahoo.com/group/flexcoders/http://groups.yahoo.com/group/flexcoders/ 
   * * To 
  unsubscribe from this group, send an email to: * 
  mailto:[EMAIL PROTECTED]flexc[EMAIL PROTECTED] 
   * * Your use of 
  Yahoo! Groups is subject to the  http://docs.yahoo.com/info/terms/Yahoo! 
  Terms of Service.Yahoo! Groups 
  Links







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] Internal popups

2005-05-12 Thread Jeff Beeman










Hmm still not what Im
looking for. I guess what I would like is for something like this (what the
previous responder sent) to work:



?xml
version=1.0 encoding=utf-8?

mx:Application
xmlns:mx=http://www.macromedia.com/2003/mxml

 mx:Button
click=toggleVis() label=click me/

 mx:TitleWindow
id=tw title=Some title


mx:Label text=hi there/


/mx:TitleWindow

 mx:Script

 ![CDATA[

 function
toggleVis(){


tw.visible = !tw.visible;

 }



 ]]

 /mx:Script

/mx:Application



But I need the TitleWindow to behave not like a standard
interface element (one that takes up space in the layout), but like a normal
popup window, one that appears above the content at a specified location.



It looks like using another MXML file is the way to go











/**
* Jeff Beeman
**/











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Horn
Sent: Thursday, May 12, 2005 11:41
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Internal
popups





Here's an example that uses createPopUp()
to create a TextArea popup (no other file required):



?xml version=1.0?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml
mx:Script
import mx.managers.PopUpManager;



var app = mx.core.Application.application;
var a = mx.controls.TextArea;
var p:MovieClip;









function createTextAreaPopup() {
p = PopUpManager.createPopUp(app,a,false,{ width:200,height:150,text:'Pop
goes the weasel and the weasel goes pop' });
}







function destroyPopup() {
p.deletePopUp();
}
/mx:Script







mx:VBox xmlns:mx=http://www.macromedia.com/2003/mxml
width=500 height=200
mx:Button id=b1 label=Create TextArea Popup
click=createTextAreaPopup(); /
mx:Button id=b2 label=Destroy Popup
click=destroyPopup(); /
/mx:VBox
/mx:Application



HTH,



matt horn

flex docs











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of JesterXL
Sent: Thursday, May 12, 2005 2:26
PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Internal
popups



It's compiled into the final SWF so there isn't technically
a dependency.











However, if you want a simple popup, you could use an Alert.











check out Alert.show for that, and for loading internal
components as popups, look up PopUpManager.createPopUp











- Original Message - 



From: Jeff Beeman






To: flexcoders@yahoogroups.com






Sent: Thursday, May 12,
2005 2:21 PM





Subject: RE: [flexcoders]
Internal popups











I cant find an example or
description of how to use the TitleWindow component without it being in an
external file. Any pointers?







/**
* Jeff Beeman
**/











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Tracy Spratt
Sent: Thursday, May 12, 2005 10:45
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Internal
popups





You probably want the TitleWindow
component.



Tracy











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jeff Beeman
Sent: Thursday, May 12, 2005 12:56
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Internal
popups





Ive been scouring the documentation, but I cant
seem to find how to do something that should be quite simple. How do I
create a popup window that doesnt reference an external file? All
examples point to loading in an external mxml file, but I would like to simply
create a panel that is hidden on startup and have it hide / unhide on different
events. Is this possible?





/***
* Jeff Beeman
* Digital Media  Instructional Technologies
* Arizona State University
***/














Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












RE: [flexcoders] Internal popups

2005-05-12 Thread Sreejith Unnikrishnan
Title: Message





ok ... 
thats interesting ..
Here's 
an idea ... you can try it ...

mx:Application
 mx:Canvas
 
mx:HBox
// 
Your entire application goes here //
 
/mx:HBox
 
mx:HBox
// The 
poup you need can go in here preferably in another Hbox hidden initially that 
takes x and y coordinates that you can pass either by mouse coordinates on 
Click//
 
mx:HBox x="" 
y=""
 
/mx:HBox
 
/mx:Hbox
 /mx:Canvas
mx:Application

:-)

  
  -Original Message-From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
  Jeff BeemanSent: Friday, May 13, 2005 12:18 AMTo: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] Internal 
  popups
  
  Hmm still not what 
  Im looking for. I guess what I would like is for something like this 
  (what the previous responder sent) to work:
  
  ?xml version="1.0" 
  encoding="utf-8"?
  mx:Application 
  xmlns:mx="http://www.macromedia.com/2003/mxml"
   
  mx:Button click="toggleVis()" label="click 
  me"/
   
  mx:TitleWindow id="tw" title="Some title"
   
  mx:Label text="hi there"/
   
  /mx:TitleWindow
   
  mx:Script
   
  ![CDATA[
   
  function toggleVis(){
   
  tw.visible = !tw.visible;
   
  }
  
   
  ]]
   
  /mx:Script
  /mx:Application
  
  But I need the TitleWindow to 
  behave not like a standard interface element (one that takes up space in the 
  layout), but like a normal popup window, one that appears above the content at 
  a specified location.
  
  It looks like using another MXML 
  file is the way to go
  
  
  
  
  
  /*** 
  Jeff 
  Beeman**/
  
  
  
  
  From: 
  flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt HornSent: Thursday, May 12, 2005 11:41 
  AMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Internal 
  popups
  
  Here's an example 
  that uses createPopUp() to create a TextArea popup (no other file 
  required):
  
  ?xml 
  version="1.0"?mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"mx:Scriptimport 
  mx.managers.PopUpManager;
  
  var app = 
  mx.core.Application.application;var a = mx.controls.TextArea;var 
  p:MovieClip;
  
  
  function 
  createTextAreaPopup() {p = PopUpManager.createPopUp(app,a,false,{ 
  width:200,height:150,text:'Pop goes the weasel and the weasel goes pop' 
  });}
  
  
  function 
  destroyPopup() 
  {p.deletePopUp();}/mx:Script
  
  
  mx:VBox 
  xmlns:mx="http://www.macromedia.com/2003/mxml" 
  width="500" height="200"mx:Button id="b1" label="Create 
  TextArea Popup" click="createTextAreaPopup();" /mx:Button 
  id="b2" label="Destroy Popup" click="destroyPopup();" 
  //mx:VBox/mx:Application
  
  HTH,
  
  matt 
  horn
  flex 
  docs
  


    

From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] On Behalf Of JesterXLSent: Thursday, May 12, 2005 2:26 
PMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] Internal 
popups

It's compiled into the final SWF 
so there isn't technically a dependency.



However, if you want a simple 
popup, you could use an Alert.



check out Alert.show for that, 
and for loading internal components as popups, look up 
PopUpManager.createPopUp
    

    
----- Original Message - 


From: Jeff 
Beeman 

To: flexcoders@yahoogroups.com 


Sent: 
Thursday, May 12, 2005 2:21 PM

Subject: RE: 
[flexcoders] Internal popups


I cant find an 
example or description of how to use the TitleWindow component without it 
being in an external file. Any pointers?



/*** 
Jeff 
Beeman******/


    

From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] On Behalf Of Tracy SprattSent: Thursday, May 12, 2005 10:45 
AMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Internal 
popups

You probably want 
the TitleWindow component.

Tracy





From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] On Behalf Of Jeff BeemanSent: Thursday, May 12, 2005 12:56 
PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Internal 
popups

Ive been scouring the 
documentation, but I cant seem to find how to do something that should be 
quite simple. How do I create a popup window that doesnt reference an 
external file? All examples point to loading in an external mxml file, 
but I would like to simply create a panel that is hidden on startup and have 
it hid

Re: [flexcoders] Internal popups

2005-05-12 Thread Matthew Shirey



Yeah, you were just a little quicker than me getting that one posted. Mine is pretty much the same solution:

?xml version=1.0 encoding=utf-8?

mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml

 mx:Script
  ![CDATA[
  
   function toggleVis(){
tw.visible = !tw.visible;
   }
  ]]
 
 /mx:Script
 
 mx:Canvas width=100% height=100%
  mx:VBox x=0 y=0 width=100% height=100% horizontalAlign=center
   mx:Button click=toggleVis() label=click me/
  /mx:VBox
  mx:TitleWindow x=100 y=0
id=tw title=Some title width=300 height=200 visible=false
   mx:Label text=hi there/
  /mx:TitleWindow  
 /mx:Canvas

/mx:Application

-- MatthewOn 5/12/05, Sreejith Unnikrishnan [EMAIL PROTECTED] wrote:











ok ... 
thats interesting ..
Here's 
an idea ... you can try it ...

mx:Application
 mx:Canvas
 
mx:HBox
// 
Your entire application goes here //
 
/mx:HBox
 
mx:HBox
// The 
poup you need can go in here preferably in another Hbox hidden initially that 
takes x and y coordinates that you can pass either by mouse coordinates on 
Click//
 
mx:HBox x= 
y=
 
/mx:HBox
 
/mx:Hbox
 /mx:Canvas
mx:Application

:-)

  
  -Original Message-From: 
  flexcoders@yahoogroups.com [mailto:
flexcoders@yahoogroups.com] On Behalf Of 
  Jeff BeemanSent: Friday, May 13, 2005 12:18 AMTo: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] Internal 
  popups
  
  Hmm still not what 
  I'm looking for. I guess what I would like is for something like this 
  (what the previous responder sent) to work:
  
  ?xml version=1.0 
  encoding=utf-8?
  mx:Application 
  xmlns:mx=http://www.macromedia.com/2003/mxml
   
  mx:Button click=toggleVis() label=click 
  me/
   
  mx:TitleWindow id=tw title=Some title
   
  mx:Label text=hi there/
   
  /mx:TitleWindow
   
  mx:Script
   
  ![CDATA[
   
  function toggleVis(){
  
tw.visible = !tw.visible;
   
  }
  
   
  ]]
   
  /mx:Script
  /mx:Application
  
  But I need the TitleWindow to 
  behave not like a standard interface element (one that takes up space in the 
  layout), but like a normal popup window, one that appears above the content at 
  a specified location.
  
  It looks like using another MXML 
  file is the way to go
  
  
  
  
  
  /*** 
  Jeff 
  Beeman**/
  
  
  
  
  From: 
  flexcoders@yahoogroups.com [mailto:
flexcoders@yahoogroups.com] On Behalf Of Matt HornSent: Thursday, May 12, 2005 11:41 
  AMTo: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Internal 
  popups
  
  Here's an example 
  that uses createPopUp() to create a TextArea popup (no other file 
  required):
  
  ?xml 
  version=1.0?mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml
mx:Scriptimport 
  mx.managers.PopUpManager;
  
  var app = 
  mx.core.Application.application;var a = mx.controls.TextArea;var 
  p:MovieClip;
  
  
  function 
  createTextAreaPopup() {p = PopUpManager.createPopUp(app,a,false,{ 
  width:200,height:150,text:'Pop goes the weasel and the weasel goes pop' 
  });}
  
  
  function 
  destroyPopup() 
  {p.deletePopUp();}/mx:Script
  
  
  mx:VBox 
  xmlns:mx=http://www.macromedia.com/2003/mxml 
  width=500 height=200mx:Button id=b1 label=Create 
  TextArea Popup click=createTextAreaPopup(); /mx:Button 
  id=b2 label=Destroy Popup click=destroyPopup(); 
  //mx:VBox/mx:Application
  
  HTH,
  
  matt 
  horn
  flex 
  docs
  





From:
 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] On Behalf Of JesterXL
Sent: Thursday, May 12, 2005 2:26 
PMTo: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Internal 
popups

It's compiled into the final SWF 
so there isn't technically a dependency.



However, if you want a simple 
popup, you could use an Alert.



check out Alert.show for that, 
and for loading internal components as popups, look up 
PopUpManager.createPopUp



- Original Message - 



From: 
Jeff 
Beeman 

To: 
flexcoders@yahoogroups.com 


Sent: 
Thursday, May 12, 2005 2:21 PM

Subject: RE: 
[flexcoders] Internal popups


I can't find an 
example or description of how to use the TitleWindow component without it 
being in an external file. Any pointers?



/*** 
Jeff 
Beeman**/




From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] On Behalf Of Tracy Spratt
Sent: Thursday, May 12, 2005 10:45 
AMTo: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Internal 
popups

You probably want 
the TitleWindow component.

Tracy






From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] On Behalf Of Jeff Beeman
Sent: Thursday, May 12, 2005 12:56 
PMTo

RE: [flexcoders] Internal popups

2005-05-12 Thread Sreejith Unnikrishnan
Title: Message





Yes 
Matthew, sorry better luck next time :-)

One 
correction, if I understood Jeff's requirements correctly, he does not want to 
see the TitleWindow in its native form with the header,etc. So he will have to 
go with a HBox, I think.

Sree

  
  -Original Message-From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
  Matthew ShireySent: Friday, May 13, 2005 12:40 AMTo: 
  flexcoders@yahoogroups.comSubject: Re: [flexcoders] Internal 
  popupsYeah, you were just a little quicker than me 
  getting that one posted. Mine is pretty much the same 
  solution:?xml version="1.0" 
  encoding="utf-8"?mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" 
  mx:Script  
  ![CDATA[   
function 
  toggleVis(){   
   tw.visible = !tw.visible; 
} 
   ]]  
  /mx:Script  mx:Canvas 
  width="100%" height="100%"  
  mx:VBox x="0" y="0" width="100%" height="100%" 
  horizontalAlign="center"  
   mx:Button click="toggleVis()" label="click 
  me"/  
  /mx:VBox  mx:TitleWindow 
  x="100" y="0" id="tw" title="Some title" width="300" height="200" 
  visible="false"  
   mx:Label text="hi there"/ 
   /mx:TitleWindow 

  /mx:Canvas/mx:Application-- Matthew
  On 5/12/05, Sreejith 
  Unnikrishnan [EMAIL PROTECTED] 
  wrote:
  
ok ... thats interesting 
..
Here's an idea ... you can 
try it ...

mx:Application
 
mx:Canvas
 mx:HBox
// Your entire application 
goes here //
 /mx:HBox
 mx:HBox
// The poup you need can go 
in here preferably in another Hbox hidden initially that takes x and y 
coordinates that you can pass either by mouse coordinates on 
Click//
 
mx:HBox x="" 
y=""
 
/mx:HBox
 /mx:Hbox
 /mx:Canvas
mx:Application

:-)

  
      -Original Message-From: flexcoders@yahoogroups.com [mailto: 
  flexcoders@yahoogroups.com] On Behalf Of Jeff 
  Beeman
  Sent: Friday, May 13, 2005 12:18 AMTo: flexcoders@yahoogroups.comSubject: RE: 
  [flexcoders] Internal popups
  
  
  Hmm still not 
  what I'm looking for. I guess what I would like is for something 
  like this (what the previous responder sent) to work:
  
  ?xml 
  version="1.0" encoding="utf-8"?
  mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
   
  mx:Button click="toggleVis()" label="click me"/
   
  mx:TitleWindow id="tw" title="Some title"
   
  mx:Label text="hi there"/
   
  /mx:TitleWindow
   
  mx:Script
   
  ![CDATA[
   
  function toggleVis(){
   
  tw.visible = !tw.visible;
   
  }
  
   
  ]]
   
  /mx:Script
  /mx:Application
  
  But I need the TitleWindow to 
  behave not like a standard interface element (one that takes up space in 
  the layout), but like a normal popup window, one that appears above the 
  content at a specified location.
  
  It looks like using another 
  MXML file is the way to go
  
  
  
  
  
  /******* 
  Jeff 
  Beeman**/
  
  
  
  
  From: flexcoders@yahoogroups.com [mailto: 
  flexcoders@yahoogroups.com] On 
  Behalf Of Matt HornSent: Thursday, May 12, 2005 11:41 
  AMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Internal 
  popups
  
  Here's an example 
  that uses createPopUp() to create a TextArea popup (no other file 
  required):
  
  ?xml 
  version="1.0"?mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml 
  "mx:Scriptimport 
  mx.managers.PopUpManager;
  
  var app = 
  mx.core.Application.application;var a = mx.controls.TextArea;var 
  p:MovieClip;
  
  
  function 
  createTextAreaPopup() {p = 
  PopUpManager.createPopUp(app,a,false,{ width:200,height:150,text:'Pop goes 
  the weasel and the weasel goes pop' });}
  
  
  function 
  destroyPopup() 
  {p.deletePopUp();}/mx:Script
  
  
  mx:VBox 
  xmlns:mx="http://www.macromedia.com/2003/mxml" width="500" 
  height="200"mx:Button id="b1" label="Create TextArea 
  Popup" click="createTextAreaPopup();" /mx:Button id="b2" 
      label="Destroy Popup" click="destroyPopup();" 
  //mx:VBox/mx:Application
  
  HTH,
  
  matt 
  horn
  flex 
  docs
  

  

RE: [flexcoders] Internal popups

2005-05-12 Thread Jeff Beeman










Thanks, all, for your help! Ill give this
a shot and see if it can handle my needs.







/**
* Jeff Beeman
**/











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matthew Shirey
Sent: Thursday, May 12, 2005 12:10
PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Internal
popups





Yeah, you were just a
little quicker than me getting that one posted. Mine is pretty much the
same solution:

?xml version=1.0 encoding=utf-8?

mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml

 mx:Script
  ![CDATA[
  
   function toggleVis(){
   
tw.visible = !tw.visible;
   }
  ]]
 
 /mx:Script
 
 mx:Canvas width=100%
height=100%
  mx:VBox x=0
y=0 width=100% height=100%
horizontalAlign=center
   mx:Button
click=toggleVis() label=click me/
  /mx:VBox
  mx:TitleWindow x=100
y=0 id=tw title=Some title
width=300 height=200 visible=false
   mx:Label
text=hi there/
  /mx:TitleWindow
 
 /mx:Canvas

/mx:Application

-- Matthew



On 5/12/05, Sreejith
Unnikrishnan [EMAIL PROTECTED]
wrote:



ok ... thats interesting ..





Here's an idea ... you can try it ...











mx:Application





 mx:Canvas





 mx:HBox





// Your entire application goes here //





 /mx:HBox





 mx:HBox





// The poup you need can go in here
preferably in another Hbox hidden initially that takes x and y coordinates that
you can pass either by mouse coordinates on Click//





 mx:HBox x= y=






/mx:HBox





 /mx:Hbox





 /mx:Canvas





mx:Application











:-)





-Original Message-
From: flexcoders@yahoogroups.com
[mailto: flexcoders@yahoogroups.com]
On Behalf Of Jeff Beeman



Sent: Friday, May 13, 2005 12:18 AM
To: flexcoders@yahoogroups.com
Subject: RE:
[flexcoders] Internal popups












Hmm still not what I'm looking for. I guess what I
would like is for something like this (what the previous responder sent) to
work:



?xml version=1.0 encoding=utf-8?

mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml

 mx:Button
click=toggleVis() label=click me/


mx:TitleWindow id=tw title=Some title


mx:Label text=hi there/


/mx:TitleWindow


mx:Script

 ![CDATA[


function toggleVis(){


tw.visible = !tw.visible;


}



 ]]


/mx:Script

/mx:Application



But
I need the TitleWindow to behave not like a standard interface element (one
that takes up space in the layout), but like a normal popup window, one that
appears above the content at a specified location.



It
looks like using another MXML file is the way to go











/**
* Jeff Beeman
**/











From: flexcoders@yahoogroups.com
[mailto:
flexcoders@yahoogroups.com] On Behalf Of Matt
Horn
Sent: Thursday, May 12, 2005 11:41
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Internal
popups





Here's an example that uses createPopUp() to create a
TextArea popup (no other file required):



?xml version=1.0?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml 
mx:Script
import mx.managers.PopUpManager;



var app = mx.core.Application.application;
var a = mx.controls.TextArea;
var p:MovieClip;









function createTextAreaPopup() {
p = PopUpManager.createPopUp(app,a,false,{ width:200,height:150,text:'Pop
goes the weasel and the weasel goes pop' });
}







function destroyPopup() {
p.deletePopUp();
}
/mx:Script







mx:VBox xmlns:mx=http://www.macromedia.com/2003/mxml
width=500 height=200
mx:Button id=b1 label=Create TextArea Popup
click=createTextAreaPopup(); /
mx:Button id=b2 label=Destroy Popup
click=destroyPopup(); /
/mx:VBox
/mx:Application



HTH,



matt horn

flex docs











From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On Behalf Of JesterXL 
Sent: Thursday, May 12, 2005 2:26
PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Internal
popups



It's
compiled into the final SWF so there isn't technically a dependency.











However,
if you want a simple popup, you could use an Alert.











check
out Alert.show for that, and for loading internal components as popups, look up
PopUpManager.createPopUp











-
Original Message - 



From: Jeff Beeman 





To: flexcoders@yahoogroups.com 





Sent: Thursday, May 12, 2005 2:21 PM





Subject: RE: [flexcoders] Internal popups











I can't find an example or description of how to use the
TitleWindow component without it being in an external file. Any pointers?







/**
* Jeff Beeman
**/











From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On Behalf Of Tracy Spratt 
Sent: Thursday, May 12, 2005 10:45
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Internal
popups





You probably want the TitleWindow component.



Tracy 











From: flexcoders@yahoogroups.com