Closing Flash Movies

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default Closing Flash Movies

    Hey all,

    Ive got a flash add that is on screen, but now I want to give the users the option of closing the movie.

    I have the movie sitting in a layer on screen like:


    <div id="Layer1" style="position:absolute; width:785px; height:115px; z-index:1; center: 6px; top: 214px;">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
    width="785" height="250">
    <param name=movie value="banner.swf">
    <param name=quality value=high>
    <param name=wmode value=transparent>
    <param name=bgcolor value=#FFFFFF>
    <embed src="banner.swf" quality=high wmode=transparent bgcolor=#FFFFFF width="785" height="250"
    type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
    </object>
    </div>

    But I have no idea how to close the movie itself. I presume I can just do this in Actionscript? Or do I have to write some javascript to remove the movie???

    Any help is appreciated.


    complexity webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. Closing window with Flash form
      I have a pop-up window that contains a Flash form. I am trying to submit the form data and close the window when the user hits the submit button. ...
    2. Flash client closing connection
      I am trying to use flash remoting to populate a ComboBox, based on the value of a first ComboBox, using a call to a cfc. Everything works fine when...
    3. Flash crashes Internet Explorer on closing
      Hi, We have just developed a RIA in flash. It can be accessed at: ...
    4. Flash ad closing and pulling up the HTML
      I have seen flash ads on sites that play and once they are completed they cinch up or collapse and the HTML will rise up. Does anyone know how this...
    5. Closing a Flash app
      Hi. Ok, i know this is a completely rooky question... I've just created a Flash movie that just consists of blocks of texts fading in and out. ...
  3. #2

    Default Re: Closing Flash Movies

    well you can close a movie using the fscommand. the syntax for closing is:

    fscommand("quit);

    you can add this on an event handler for an on release event of a button

    N Kiran Kumar Kowlgi

    Developer Exemplar Guest

  4. #3

    Default Re: Closing Flash Movies

    Unfortunatley fscommand("quit); is only available in stand alone players. This swf is loaded directly onto a webpage.


    complexity webforumsuser@macromedia.com Guest

  5. #4

    Default Re: Closing Flash Movies

    look you can pass parameters to a function in the javascript when the button in the flash movie is clicked.. so when you say you want to close the movie, do you mean close the browser??

    N Kiran Kumar Kowlgi

    Developer Exemplar Guest

  6. #5

    Default Re: Closing Flash Movies

    You have to use JavaScript.

    <script>
    function closelayer () {
    document.getElementById ('Layer1').style.display = "none";
    }
    </script>

    Call from html: <a href="javascript: closelayer ();">close flash</a>

    This can be done from Flash movie, look at [url]http://www.macromedia.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_07.html[/url]



    Referring URLs
    [url]http://www.macromedia.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_07.html[/url]




    noviKorisnik webforumsuser@macromedia.com Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139