I need an AS2 button that closes out a pop-up window...

So, I’ve constructed a portfolio site with ActionScript 2.0, but I would like the pop-up window that displays the portfolio image to have its own ‘X’ button that closes the swf movie from the browser.  I’m assuming that the code begins something like this:
on(release){
//actionscript 2.0 code that closes the browser window.
Any suggestions on how this will work across platforms and browsers?
Best,
R.

Hi kglad,
My main flash as2 file has a stage size of 1200 width x720 height.  I’ve looked online through various methods on creating pop-up browsers that will display a portfolio image when a button on the main.swf is clicked.  Having no luck in finding what I needed (most tutorials just give getURL examples where the image is displayed in a separate tab), it finally dawned on me to create an overlaying movie, of the same size as the document size, on the top layer of the primary flash stage.  Setting the movie symbol as ‘invisible’ keeps the movie symbol inactive and invisible until called by an action.  The button on the main.swf that calls the movie has the following as2 script attached to it:
on(release){
               loadMovie("images/aauComp.swf", _root.movie2);
However, the aauComp.swf file is where the exit button is located.  I need to implement an on(release){} method onto the exit button in aauComp.swf  that will close the movie out in the main.swf file.  Here’s the double wammy, though: the exit button on the called movie file, aauComp.swf, does not recognize any gotoAndStop(); or on(release){} functions relating to itself when it is loaded. For instance, since I could not find any functions that would close the movie out and return me to the main.swf interface, I wrote the following command on the ‘exit’ button in aauComp.swf:
on(release){
               _root.gotoAndStop("blank_frame");
Where “blank_frame” is within a scene of aauComp.swf that is completely empty – which should, in theory, allow for interaction with the main.swf below the loaded movie since there is nothing on that layer of the loaded aauComp.swf movie.  Make sense?  The ‘exit’ button works fine when aauComp.swf is tested and published by itself, but when it is called into the main.swf with the loadMovie(); function, the 'exit' button will not work and, so, it will not forward to the “blank_frame”.
Any suggestions?  Let me know if you need anything clarified.
Thanks.

Similar Messages

  • Exit button that close me the window in personalize

    Hi forum:
       I have one dynpro application in the personalize window of the EP6.40, when i give click in this link an windows is open, So, in my application in to this window i need to put an EXIT BUTTON, that close me the actual window, what can i do to do it?.... The password change application in that windows has it.. and do it..
    please help
    Joshua

    Hi Joshua,
    Are you familiar with close main application window in WD for Java ?
    Best regards, Maksim Rashchynski.

  • How to create a button that close a window/popup.

    Hi, I must create in a view a button that close the window/popup that include the view, the button must be like the OK button of the popup or the X button at the top-right side . It's possible?

    Hi Avalor.
    You can create a custom pop up window. Just create a view that contains all
    elements that you want to display. Add the button that closes the view. Create a
    new window that only contains this new view. Use the mentioned method to create
    a new window as pop up. You just have to pass the name of the window you have
    created. Store the reference to the new window in the component controller
    (mr_window).
    From the new window->view you have access to the component controller.
    In the action handler of the button you can use something like this:
    wd_comop_controler->mr_window->close( ).
    Cheers,
    Sascha

  • Create a Button that Closes the Presentation

    All, I want a button on the last slide of my presentation that, when clicked, will close the browser window in which the presentation is playing. Will this involve Javascript? I tried some, but I probably screwed it up because it won't work. Some step-by-step guidance would be much appreciated, should someone have a few moments to guide me. Trying to make something more obvious than the X button on the playbar. Thanks so much!

    Hi there
    As explained in the Frequently Encountered Issues topic, closing the window is "iffy" and depends on different factors.
    The simplest approach is to avoid JavaScript altogether. Just configure the project to close when it completes. Then if you want a button that closes the project, configure it to jump to the last slide. Time that last slide super short. The net result will be that the user clicks the button, it jumps to the last slide for a split second, then if the project is capable of closing, it closes!
    Cheers... Rick
    Helpful and Handy Links
    Begin learning Captivate 5 moments from now! $29.95
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcererStone Blog
    Captivate eBooks

  • Unable to close Safari pages. Have to hold power button to close out.

    This has happend 3 times now within the last week or so. Everytime it has happend, I was on "Myspace" and had other pages open. The red close button and the Home button are faded when this occours. The only way to close out is to hold the power button until it shuts off. Any thoughts would be greatly appreciated! Thanks!

    Welcome to Discusssions - have you tried to Force quit Safari? Either go to the blue apple in the menu bar and scroll down till you reach force quit and select Safari, or go to the Safari icon in the dock, click on it and select force quit.
    Once you have done that, you might want to empty the Safari caches and delete the history. You should also go to User>Library>Preferences>com.apple.Safari.plist and drag it to the trash.
    Please let us know how you made out,
    Miriam

  • Need PHP send button that works

    I have a Flash website with a web form that I cannot get the
    submit button to work. I was able to create a button for reset to
    work, which I will post that action after the one for my form. I
    have an instance of web form (which I placed onto my contacts page)
    created with onsetfocus code and this is the parent form t1_2 and
    this is the code I have assigned to this form.
    t2.onSetFocus = function() {
    if (t2_2 == "your name") {
    t2_2 = "";
    t3.onSetFocus = function() {
    if (t3_2 == "e-mail") {
    t3_2 = "";
    t4.onSetFocus = function() {
    if (t4_2 == "phone") {
    t4_2 = "";
    t5.onSetFocus = function() {
    if (t5_2 == "comments") {
    t5_2 = "";
    HERE IS MY RESET BUTTON CODE THAT WORKS (please help me
    script a PHP submit button that works based on what I have listed.
    Sample of the website can be obtained here
    on(release) {
    //_parent.t1_2="";
    _parent.t2_2="your name";
    _parent.t3_2="e-mail";
    _parent.t4_2="phone";
    _parent.t5_2="comments";
    VIEW SITE
    HERE

    I am new to Flash and I am working on similar website but I
    have a cfc that returns all the main categories from sql server. Is
    there a way that I can dynamically create buttons with the
    categories returned? And when the button is clicked the
    subcategories need to be displayed as labels. Is this possible? Did
    anyone develop something like this before? Is there any sample code
    that I can refer?

  • Closing Out of Pop Up Windows without Pressing the Red X button

    Hey, this is my first Mac ever. I am not much of a computer carer. However, I don't want to wreck this computer. I understand with PC's you can get viruses or malware "whatever it is" from closing out of the pop up windows by just pressing the close "X" button in the upper right hand corner similar to the red "x" button on the macs. Now I know there was a way to close out of the window by just pressing Alt+ F4 and it would safely close the window. Is there any way to safely do that with pop up windows for macs?

    Welcome to Apple Discussions!
    Command-W closes individual windows that are currently frontmost.
    Command-Option-W closes all windows of the frontmost application.
    For more keyboard shortcuts, see this page:
    http://support.apple.com/kb/HT1343

  • Acrobat Form button that when clicked will open a Windows Folder?

    Is there a way to have a button on an Adobe Acrobat Form that when clicked will open a Windows Folder located with a predefined UNC path? I'm looking for a scripting solution.
    UNC example: \\myserver\myshares\engineering\changeorders
    I'm using LiveCycle Designer ES v. 8.2.
    Thanks for any help that you can give.

    This is in Internet Explorer 6 (yes, horrible, I know), but we use a standardized image where I work, with pretty intense GPO's.
    Don't know what happens if you right-click the link; but from any other machine (with the same image) the same link will open with all three options "Open", "Save", and "Cancel".  These are not freshly imaged machines, so some setting must of been changed along the way to make this happen on this user's computer.
    Repaired Acrobat, but this resolved nothing.
    Also checked in IE to make sure that Adobe was enabled under the Programs tab.
    Also, the option to view a pdf within the browser is not turned on.
    Any other ideas?

  • Need help with buttons that react to rollover that create a scoll effect

    hey everyone,
    I'm new to flash and actionscript and am having trouble
    creating what I need. I want to create a scroll area that scrolls
    left and right when you rollover a left or right arrow. what I want
    to scroll looks like a piece of film negative that has about 20
    thumbnails in it. I only want it to show about 4 thumbs at once
    though (thus the scroll is needed). so when the mouse rolls over
    the arrows, it scrolls, and when it rolls out it stops in place.
    eventually, i will add links to the thumbs for a better image.
    I've checked out a couple tutorials on scrollbars and such
    thinking that I can just go in and modify the code a bit, but the
    two turorials i've tried to do have left some of the pieces out...
    not very helpful when you don't know actionscript well. does
    anybody have any tips or ideas?

    Hi there,
    What I did, I took a variable 'counter123' and assign '0' value to this variable.
    I then added a button with Advanced action, I am sharing the Screenshot of the advanced action panel.
    Screen shot 1 :
    Incrementing the Value on click :
    The value of the variable should increase on every click, so lets add a true statement as a condition.
    Screenshot no 2 :
    As normally on buttons/click boxes, the project will continue as soon we click them.
    lets compare the value of our variable and then pause the project.
    Screen shot 3 :
    last if our purpose is solved, here we have clicked the button 4 times, so that has updated the value of our counter to 4, so as soon as the counter exceeds the value, we want the project to continue.
    please let me know if this helps you.
    This will help you in pressing a button 4 times, and i think you can also add actions to show and hide 'zeros' in your project.
    I find such scenarios very interesting and I always find help on Lilybiri's Blog : http://lilybiri.posterous.com/
    Thanks

  • I am unable to see most of Dailybooth after a pop-up appeared too quickly for me to read, as I had already been pressing a button that exited out of it.

    I was browsing the site, and something popped up at the top of the browser underneath the tabs, but I didn't catch what it had said. Immediately after, the site began to lose the ability to show all the pictures that had been posted, and the whole site looked emptier.

    It is possible that you clicked "Block Images" in the right click context menu while trying to save an image.
    *You can see the permissions for the domain in the current tab in Tools > Page Info > Permissions
    *You can see all exceptions in Tools > Options > Content: Load Images > Exceptions
    See:
    * http://kb.mozillazine.org/Images_or_animations_do_not_load
    *A way to see which images are blocked is to click the favicon ([[Site Identity Button]]) on the left end of the location bar.
    *A click on the "More Information" button will open the Security tab of the "Page Info" window (also accessible via "Tools > Page Info").
    *Go to the <i>Media</i> tab of the "Tools > Page Info" window.
    *Select the first image link and scroll down though the list with the Down arrow key.
    *If an image in the list is grayed and there is a check-mark in the box "<i>Block Images from...</i>" then remove that mark to unblock the images from that domain.

  • How to create a dialog window with no button that opens along with the main window?

    When the main window is open, the dialog window opens up immediately and can be closed by key press. At other times, when the next step, ie: decision, comes to, the another dialog window pops up again and is again closed by key press. Does anyone know how to do? Use the sub-Vi? notification method? occurrence method?
    And another thing: how to create a reusable dialog window with no button so that different messages can be sent to it and it can closed by key press. And how to pass the string to the title of the dialog window programmatically?

    For your functionality (If I understand it right), nothing needs to be in the event structure. Pressing any key just triggers the event, thus finishing the VI (there is no while loop).
    Could you tell me what you mean my "it won't run properly"? Make sure that the front panel of the subVI is closed before starting the main VI. Remember that the subVI is set to "open when called" and "close afterwards if originally closed". So, if you had the panel open already, it won't of course close when finished!
    (Actually, the problems is worse when you have the subVI panel open when starting the main VI. you get a catch22 and labVIEW locks up because (1) the subVI is set to dialog and grabs all attention but (2) it has not been
    called, thus the event cannot be triggered. So don't do that!!!! As a quick workaround, add the modification shown in the attached image to ensure the panel of the subVI is closed.)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    CloseNoButtonDialog.gif ‏3 KB

  • Sound cutting out/crackling/pops in Windows 7 XFi XtremeGamer

    System specs:
    Windows 7 Ultimate fully updated
    Q6600 @ 3.0ghz
    Asus P5N32-E Sli Motherboard (680i Chipset) 80 bios revision w/ nVidia 5.5 nforce drivers
    2x2 Gigs Corsair ?DDR2 800 @
    In dual channel mode
    BFG 285-GTX w/ 96.2 drivers
    X-Fi XtremeGamer w/ PCDRV_LB2_8_003 drivers
    With this setup I am unable to use CMSS 3D without the audio cutting out completely. Before it does so it's usually followed with numerous cracks and po
    ps.
    Disabling CMSS 3D alleviates this problem, however I occasionally get a slight pops and crackles when playing games or listening to music.
    While playing Mass Effect 2 the sound will completely cut out in the same manner it does when I have CMSS 3D enabled, despite the option being turned off in the console launcher.
    At first I tried a clean install of the drivers, removing drivers, using driver cleaner pro, registry cleaner and then reinstalling them. Did not fix the issue. I then did the same for the chipset drivers and my video card drivers.
    I thought it may have been a problem with OpenAL (for mass effect 2) so I reinstalled that. Same problem.
    I tried using PAX's driver's, same problem.
    I've used DPC Latency Checker V.2.0 and according to it my machine should be able to handle real-time streaming audio with no dropouts.
    I'm at a loss at what else to do and any further help would be appreciated.

    Just an update on my problem.
    I was able to resolve the sound cutting out issue and the cracks/pops issue within windows by disabling CMSS3D + setting my sample rate to 24 bit, 96k Hz.. Using 92k Hz results in the cracks and pops coming back, although they are few and far between.
    Unfortunately this did not resolve my issue with the sound/audio cutting out in mass effect 2. I tried the onboard sound and that also cuts out, so I've determined it's not a hardware issue but rather a bug of some sort within the game. There are also other sparse reports of people having the same issue.
    Thanks

  • Button to open a small pop-up window

    what JS script can I put to open a to a pdf link in a pop up window  of 800 x 400 px dimensions

    i found, but not help you.

  • Create an exit button that (really) works

    Hello,
    I'm using Captivate 6.
    I have create a playbar with trigger zone for "previous slide" button, "next slide" button and a "home" button.
    Trigger zone for previous and next slide are working perfectly in the preview and from the swf i have published.
    Concerning the "Home" button, it is in fact an exit button that closes the swf (an advanced action including cpCmndExit with 1).
    It is working from the preview but not at all from the swf (played in Chrome and IE9).
    Kind regards,
    Vincent

    I just went through a very similar struggle using the variable CPcmdexit =1 here was what I found and the solution for me.  First off, this variable only seems to work when using Internet Explorer (couldn't get it to work with chrome and didn't test firefox).  Luckily our LMS standard is the users use IE so that helped me passed the hurdle.  The second part of the equation though that took me forever to figure out was that in the Reporting Settings make sure that your success criteria is being obtained.  In other words my criteria was that the user viewed 100% of the slides before being complete.  This did not work for me because I had slides past my end point that the presentation jumped and returned from.  My resolution was to set it to the number slide instead of percentage that I wanted my user to view.  So success now looks like the user viewing to slide 37 (note: It seems although I didn't throroughly test that if you have hidden slides along the way to get the end number that it throws the count off since user can't actually view it).  When that criteria is met it seems that the Cpcmdexit button functions properly otherwise it is unresponsive.
    Hope that helps.
    Brian

  • Buttons that produce pop-ups?

    I am looking to do 2 things:
    1) I'm looking to lock buttons to the sides of my site so that when you resize the site they are always locked to the sides. Something similar to menus for social that you see around the web.
    2) I want to make it so that when someone clicks on the buttons on the side, a pop up window comes up with info such as text, video, pics, etc.
    Fundamentally, what I want to do is make the site a one-pager. The background is always the full screen picture slideshow, with the logo up top. Depending on the button clicked, that content would appear in the center.

    Hi Immediate Media,
    You need to snap your button on the browser left or right and then pin accordingly, this is how I did it using a rectangle, screen shot - http://prntscr.com/3xy16d
    - Abhishek Maurya

Maybe you are looking for