Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Flash (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 17th, 2005, 07:52 AM
Registered User
 
Join Date: Feb 2005
Location: Bangalore, Karnataka, India.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default window component

Hello,

I have a button on the screen and when i click that button i need to open up the window component and inside the component i have a movieclip called PasswordForm. I wnat to display some text when the window component appears. I have wriiten this code for that. But not working. Can anybody please try to help me out.

buttonListener = new Object();
buttonListener.click = function() {
    myWindow = mx.managers.PopUpManager.createPopUp(_root, mx.containers.Window, true, {title:"Change Password", contentPath:"PasswordForm"});
    myWindow.setSize(240, 110);
    myWindow.content.password.text = "secret";
};
button.addEventListener("click", buttonListener);

Thanks in advance,
Madhava ram upadrasta.

  #2 (permalink)  
Old February 18th, 2005, 05:43 AM
Registered User
 
Join Date: Feb 2005
Location: Jaffna, , Sri Lanka.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try this one - Madhava_ram
import mx.containers.Window;
import mx.managers.PopUpManager;
yourButtonListener = new Object();
yourButtonListener.click = function() {
    myWindow = PopUpManager.createPopUp(_root, Window, true, {title:"change password", contentPath:"yourMovieclip",

closeButton:true});
    myWindow.setSize(310, 280);
    myWindow.move(50, 50);
    myWindowListener = new Object();
    myWindowListener.click = function() {
        myWindow.deletePopUp();
    };
    myWindow.addEventListener("click", myWindowListener);
};
yourButton.addEventListener("click", preview_btnListener);
  #3 (permalink)  
Old February 18th, 2005, 05:48 AM
Registered User
 
Join Date: Feb 2005
Location: Jaffna, , Sri Lanka.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Edit the last line it must be

yourButton.addEventListener("click", yourButtonListener)



Similar Threads
Thread Thread Starter Forum Replies Last Post
Centering Popup window & Blur Parent window jkusmanto Javascript How-To 0 May 25th, 2007 03:19 AM
Window refresh and window pop up in Java Script Aleksandra Javascript How-To 2 March 2nd, 2007 06:47 PM
closed parent window when opened child window jaiwin Javascript How-To 0 October 8th, 2006 12:54 PM
call window dialog component with asp.net/vb.net s3ng ASP.NET 1.x and 2.0 Application Design 0 June 21st, 2005 04:54 AM
Close Parent window on opening child window pkdev Javascript How-To 8 April 11th, 2004 12:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.