A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: close button

  1. #1
    fat snacks j4mes's Avatar
    Join Date
    Jul 2001
    Location
    Manchester
    Posts
    210
    Ok, i have a flash web site that consists of one main navigation area in the middle of the screen, containing 3 buttons. Each button opens a separate window within the main window, and i want to use the same button to close the window. Can i do this? or am i better just making a separate close button for each window.

    Thanks in advance for anything you have to offer. :-p

  2. #2
    curmudgeon swampy's Avatar
    Join Date
    Jan 2001
    Location
    [wakey]
    Posts
    2,775
    yes.

    call the window instances windowOne, windowTwo and windowThree


    in each of the windows have this script in the first keyframe

    Code:
    winOpen=0
    and in the last keyframe


    Code:
    winOpen=1

    and on the button to open windowOne:
    Code:
     
    
    on (release) {
    	if (!windowOne.winOpen) {
    		// open action
    	} else {
    		// close action
    	}
    }
    and on the button to open windowTwo:
    Code:
     
    
    on (release) {
    	if (!windowTwo.winOpen) {
    		// open action
    	} else {
    		// close action
    	}
    }
    and on the button to open windowThree:
    Code:
     
    
    on (release) {
    	if (!windowThree.winOpen) {
    		// open action
    	} else {
    		// close action
    	}
    }
    now stop posting on Flashkit and do some work or I'll come in there and kill you
    [Edited by swampy on 08-07-2001 at 05:58 AM]

  3. #3
    fat snacks j4mes's Avatar
    Join Date
    Jul 2001
    Location
    Manchester
    Posts
    210

    Smile

    Thanks Mr. Hippy, you are the both knowledgeable and wise, tis a shame that you have forfeited beauty for these most admirable qualities!

    Only jokin man, ta, i will bring the fruits of your labour in to show you later this week

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center