Disappear OnClick

I could use some help on a bit of code for a shooter game I'm working on. I have enemy objects that appear on screen or move around on screen and I need help with code so that when you click on the object is disappears from the screen. I would really appreciate the help.

I have tried the following code and changed the instance names to match those in my game with n
o luck. The code does nto work.
Instancename.addEventListener
      (MouseEvent.CLICK, ifitemclicked);
function ifitemclicked(event:MouseEvent){
      Instancename.x = -500;
      Instancename.y = -500;

Similar Messages

  • Scrolling main content in an AP Div disappearing behind other AP Divs...?

    Newbie here, using CS3. No CSS power user (yet!)--general concepts, yes, but not much practice. Meanwhile two recent CS3 classes, several books, and a concerted search through online forums have failed to point me toward a fix for this prob. Any help greatly appreciated.
    Prob statement: In design view the core content of my pages disappears behind my footer and a secondary box, both AP Divs, so that I cannot see or edit anything beyond the bottom edge of the core-content AP Div. Overflow for that AP Div is set to scroll. The "obscured" content shows up only as an outlined shape extending past the footer etc. (and I can see some of the obscured text "through" the footer). Down arrow doesn't get me there: it just scoots down the outlined-but-obscured section. Doubleclicking highlights everything that's obscured so that I can see the relative shapes of the paragraphs, but doesn't expose the content. This seemed to start the first time I set the content div to scroll any overflow. I've changed it back/forth since; no joy.
    Rendered in IE or Firefox, all the pages with all their varying content lengths look fine. Scrollbar works great. It's just that in order to edit or compose further, I have to copy everything into Notepad or something, work there, and then paste it back into DW. Definitely non-optimum, though: can't format or add hyperlinks to the content.
    I'm using AP Divs, with scroll on in the "content" AP Div, because I couldn't figure out how to create a template where the footer would slide down the page in response to varying amounts of content. Started out with a table to handle all this, but an instructor recommended AP Divs so I went that way. I'd like to resolve this, rather than just go back to using tables while leaving this AP Div oddness a mystery.
    The footer is full of a Spry tabbed panels giving my legal/green/design statements and other small bits of info. The secondary box is an AP Div called "quotations" and is for friendly little bits of cute/clever nonsense at the bottom of each page.
    Tried a number of different settings so far and by now I've probably truly messed things up. Can anyone suggest a fix?
    The code for the template file seems long, so my apologies. However, the content type isn't allowed for attachments so I've pasted it in below.
    Much appreciation!
    =================================
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <style type="text/css">
    <!--
    body {
        background-color: #003300;
    #LeftSidebar {
        position:absolute;
        width:80px;
        height:697px;
        z-index:1;
        background-image: url(../Images/BG.jpg);
        top: 20px;
    #Banner {
        position:absolute;
        width:360px;
        height:187px;
        z-index:2;
        left: 100px;
        top: 20px;
        background-color: #6384EF;
    #BannerPhone {
        position:absolute;
        width:265px;
        height:187px;
        z-index:3;
        left: 470px;
        top: 20px;
        font-family: Georgia, "Times New Roman", Times, serif;
        font-size: x-large;
        font-variant: normal;
        color: #E4D9A8;
    #NavBar {
        position:absolute;
        width:636px;
        height:35px;
        z-index:4;
        left: 100px;
        top: 219px;
        padding-top: 3px;
        padding-right: 0px;
        padding-bottom: 0px;
        padding-left: 5px;
        background-color: #E4D9A8;
        border-top-color: #E4D9A8;
        border-right-color: #E4D9A8;
        border-bottom-color: #E4D9A8;
        border-left-color: #E4D9A8;
    #Heading {
        position:absolute;
        left:100px;
        top:254px;
        width:636px;
        height:42px;
        z-index:8;
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: medium;
        font-weight: bold;
        color: #003300;
        background-color: #E4D9A8;
        text-indent: 5px;
        padding-top: 5px;
        padding-right: 0px;
        padding-bottom: 0px;
        padding-left: 5px;
        border-top-color: #E4D9A8;
        border-right-color: #E4D9A8;
        border-bottom-color: #E4D9A8;
        border-left-color: #E4D9A8;
        vertical-align: bottom;
    #Content {
        position:absolute;
        width:636px;
        height:315px;
        z-index:9;
        left: 100px;
        top: 296px;
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: small;
        color: #003300;
        background-color: #E4D9A8;
        overflow: scroll;
        padding-top: 0px;
        padding-right: 0px;
        padding-bottom: 0px;
        padding-left: 5px;
    #Footer {
        position:absolute;
        width:560px;
        height:50px;
        z-index:-1;
        left: 133px;
        top: 670px;
        background-color: #E4D9A8;
    #Quotation {
        position:absolute;
        width:636px;
        height:40px;
        z-index:0;
        left: 101px;
        top: 621px;
        font-family: Georgia, "Times New Roman", Times, serif;
        font-size: x-small;
        font-style: italic;
        color: #E4D9A8;
        text-indent: 5px;
        padding-top: 0px;
        padding-right: 0px;
        padding-bottom: 0px;
        padding-left: 5px;
        background-color: #003300;
    -->
    </style>
    <script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
    <link href="../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_nbGroup(event, grpName) { //v6.0
      var i,img,nbArr,args=MM_nbGroup.arguments;
      if (event == "init" && args.length > 2) {
        if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
          img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
          if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
          nbArr[nbArr.length] = img;
          for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
            if (!img.MM_up) img.MM_up = img.src;
            img.src = img.MM_dn = args[i+1];
            nbArr[nbArr.length] = img;
      } else if (event == "over") {
        document.MM_nbOver = nbArr = new Array();
        for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
          if (!img.MM_up) img.MM_up = img.src;
          img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
          nbArr[nbArr.length] = img;
      } else if (event == "out" ) {
        for (i=0; i < document.MM_nbOver.length; i++) {
          img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
      } else if (event == "down") {
        nbArr = document[grpName];
        if (nbArr)
          for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
        document[grpName] = nbArr = new Array();
        for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
          if (!img.MM_up) img.MM_up = img.src;
          img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
          nbArr[nbArr.length] = img;
    //-->
    </script>
    <!-- TemplateParam name="Content2" type="boolean" value="true" -->
    <style type="text/css">
    <!--
    a:link {
        color: #003300;
    a:visited {
        color: #336666;
    a:hover {
        color: #009933;
    a:active {
        color: #990033;
    -->
    </style>
    <meta name="Description" content="Skyway Consulting: taking your information to a higher level! We do information design: planning, writing, editing, and indexing your user documentation. We also design websites, website graphics, print layouts, and logos. Basically, we want to be your source for the way your organization interfaces with the world. " />
    </head>
    <body onload="MM_preloadImages('../Images/Button_WebDesignOver.gif','../Images/Button_UserDocsO ver.gif','../Images/Button_LogoDesignOver.gif','../Images/Button_PrintLayoutOver.gif','../ Images/Button_ITSvcsOver.gif','../Images/Button_Home.gif','../Images/Button_HomeOver.gif', '../Images/Button_WebDesign.gif','../Images/Button_UserDocs.gif','../Images/Button_ITSvcs. gif','../Images/Button_LogoDesign.gif','../Images/Button_AboutUs.gif','../Images/Button_Co ntact.gif','../Images/Button_AboutUsOver.gif')">
    <div id="LeftSidebar"></div>
    <div id="Banner">
      <div align="center"><img src="../Images/Banner.gif" alt="Skyway Consulting" width="335" height="184" /></div>
    </div>
    <div id="BannerPhone">
      <p align="center">Taking your information to a higher level.</p>
      <p align="center">530.965.2624</p>
      <p align="center"><img src="../Images/email_Info.gif" alt="Address" width="203" height="23" /></p>
    </div>
    <div id="NavBar">
      <table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td><a href="../index.html" target="_top" onclick="MM_nbGroup('down','group1','Home','../Images/Button_HomeOver.gif',1)" onmouseover="MM_nbGroup('over','Home','../Images/Button_HomeOver.gif','',1)" onmouseout="MM_nbGroup('out')"><img src="../Images/Button_Home.gif" alt="Skyway Consulting Homepage" name="Home" border="0" id="Home" onload="" /></a></td>
          <td><a href="../webdesign.html" target="_top" onclick="MM_nbGroup('down','group1','WebsiteDesign','../Images/Button_WebDesignOver.gif', 1)" onmouseover="MM_nbGroup('over','WebsiteDesign','../Images/Button_WebDesignOver.gif','',1) " onmouseout="MM_nbGroup('out')"><img src="../Images/Button_WebDesign.gif" alt="Website Design Services" name="WebsiteDesign" width="106" height="30" border="0" id="WebsiteDesign" onload="" /></a></td>
          <td><a href="javascript:;" target="_top" onclick="MM_nbGroup('down','group1','UserDoc','../Images/Button_UserDocsOver.gif',1)" onmouseover="MM_nbGroup('over','UserDoc','../Images/Button_UserDocsOver.gif','',1)" onmouseout="MM_nbGroup('out')"><img src="../Images/Button_UserDocs.gif" alt="User Documentation Services" name="UserDoc" width="106" height="30" border="0" id="UserDoc" onload="" /></a></td>
          <td><a href="../it_svcs.html" target="_top" onclick="MM_nbGroup('down','group1','ITServices','../Images/Button_ITSvcsOver.gif',1)" onmouseover="MM_nbGroup('over','ITServices','../Images/Button_ITSvcsOver.gif','',1)" onmouseout="MM_nbGroup('out')"><img src="../Images/Button_ITSvcs.gif" alt="IT Services" name="ITServices" width="106" height="30" border="0" id="ITServices" onload="" /></a></td>
          <td><a href="javascript:;" target="_top" onclick="MM_nbGroup('down','group1','LogoDesign','../Images/Button_LogoDesignOver.gif',1) " onmouseover="MM_nbGroup('over','LogoDesign','../Images/Button_LogoDesignOver.gif','',1)" onmouseout="MM_nbGroup('out')"><img src="../Images/Button_LogoDesign.gif" alt="Logo Design Services" name="LogoDesign" width="106" height="30" border="0" id="LogoDesign" onload="" /></a></td>
          <td><a href="../about.html" target="_top" onclick="MM_nbGroup('down','group1','AboutUs','../Images/Button_AboutUsOver.gif',1)" onmouseover="MM_nbGroup('over','AboutUs','../Images/Button_AboutUsOver.gif','',1)" onmouseout="MM_nbGroup('out')"><img src="../Images/Button_AboutUs.gif" alt="AboutUs" name="AboutUs" border="0" id="Contact" onload="" /></a></td>
        </tr>
      </table>
    </div>
    <div id="Content"><!-- TemplateBeginEditable name="Content" -->
      <p>Content</p>
      <!-- TemplateEndEditable --></div>
    <div id="Footer">
      <div id="TabbedPanels1" class="TabbedPanels">
        <ul class="TabbedPanelsTabGroup">
          <li class="TabbedPanelsTab" tabindex="0">Info</li>
          <li class="TabbedPanelsTab" tabindex="0">Legal</li>
          <li class="TabbedPanelsTab" tabindex="0">Privacy Policy</li>
          <li class="TabbedPanelsTab" tabindex="0">Green Statement</li>
          <li class="TabbedPanelsTab" tabindex="0">Design Credit</li>
          <li class="TabbedPanelsTab" tabindex="0">Webmaster</li>
        </ul>
        <div class="TabbedPanelsContentGroup">
          <div class="TabbedPanelsContent">Click for information on these topics.</div>
          <div class="TabbedPanelsContent">(c) 2009 Skyway Consulting. All content, including photographic content, is owned by Skyway Consulting. You may not copy, reproduce, modify, or publicly display, perform, distribute, or otherwise use the content provided on this site in any way for any public or commercial purpose. Skyway Consulting will not work on websites involving objectionable material, including but not limited to pornography, hatred, intolerance, or animal abuse. Our management staff's decision on what constitutes &quot;objectionable material&quot; is final. </div>
          <div class="TabbedPanelsContent">We recognize that your privacy is important. This privacy policy applies to all of our services and website pages. We do not set cookies. We do not sell or otherwise seek to profit from the contact information you provide, although we may preserve some information for use by Skyway Consulting. If you have questions about this privacy policy, please [link]contact us.</div>
          <div class="TabbedPanelsContent">Skyway Consulting is an American home-based business that makes every effort to conserve, reduce, reuse, and recycle.</div>
          <div class="TabbedPanelsContent">
            <p>Page design by Skyway Consulting. (Of course!)</p>
            <p>Tiling forest graphic at left by the talented Silvia Hartmann, <a href="http://silviahartmann.com/">http://silviahartmann.com/</a>. (Thank you, Silvia!)</p>
          </div>
          <div class="TabbedPanelsContent">Page problems? Contact <img src="../Images/email_Webmaster.gif" alt="Webmaster e-dress" width="177" height="18" align="absmiddle" /></div>
        </div>
      </div>
    </div>
    <div id="Quotation"><!-- TemplateBeginEditable name="Quotation" -->Quotation<!-- TemplateEndEditable --></div>
    <div id="Heading"><!-- TemplateBeginEditable name="Heading" -->Heading<!-- TemplateEndEditable --></div>
    <div align="center"></div>
    <script type="text/javascript">
    <!--
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    //-->
    </script>
    </body>
    </html>

    I hadn't looked at the code at all. I was relying on the Dreamweaver GUI to correctly guide me to a desired outcome.
    I think that this is not a desirable approach to Dreamweaver, which will write perfect HTML if you let it, but it's too easy to click buttons and apply wizards without regard for the markup consequences, thereby producing a veritable pig's ear of a page.  If you are going to use DW professionally, you will have to become comfortable with code.  That doesn't mean you will have to spend 100% of your time in Code view, but you will definitely need to watch the code as it is formulated.
    I'm not starting from an engineering background.
    Neither did I.  But I did start with a sincere desire to become proficient, and to learn the technology.
    Murray, I get the idea of redoing my template without AP Divs, and will get into that. I don't know what "image swaps and links" mean, though. Would you mind teaching this newbie on this point?
    Not at all.  When you select the "NavBar" feature, you are placing elements and code on your page that were designed in the dark ages of HTML (frames).  Some of the features in the NavBar will only work in a framed page (the down image and the over while down).  The code is antique, invalid, and just wrong to be included.  My suggestion was to forego this and just place your button images on the page (in whatever container you need to use), and apply links to them so that they link to the desired pages.  Then apply swap image behaviors to them to create your rollover effects, one for each button.  The result will be modern code, that has none of the legacy stuff of the navbar, and that will work fine for you.  As you become more familiar with CSS you can investigate even better ways to do such menus (if you want a preview of this, Google "CSS Sprites).  The latter method is usually the only way I do menus anymore.  And even then, I use both text and graphics for accessability and SEO purposes.
    I will say that I like your attitude.  A determination to learn and improve is a winning approach.

  • Buttons just appearing as text for certain clients until enabled with onClick and enabled

    Would anyone know why buttons may disappear for some clients but not others.   I'm not finding a consistent pattern.  When I sign in locally or through vpn they display and behave properly, but when I sign in externally via Chrome or IE 11
    sometime the buttons only appear as text other disable buttons that are enabled on click.  I have a laptop with ie11 Win8 and desktop with ie11 win7.   The laptop displays the buttons proper behavior and the desktop does not.  
    anyone have any ideas.  Someone was working on the server recently and I'm wondering if any IIS setting may cause this problem.  Thanks for help!
    Buttons original state:
    <td><asp:Buttonrunat="server"Text="Print"ID="btnPrint"CssClass="tablerowheader"Enabled="False"/>
    <asp:Buttonrunat="server"Text="Submit"ID="btnSubmit"OnClick="btnSubmit_Click"
    CssClass="tablerowheader"Enabled="False"/></td>
    Buttons action:
    <asp:checkbox runat="server" id="chkSignature" onclick="EnableSubmitButton(this)" text="I Agree" Font-Bold+"true" checked="False">

    Solved.  The disabled status was being overwritten as null.

  • OnClick event in swf file stops a WMP movie that is being play

    Hi
    When placed in the same page - onclick event in a swf file
    stops a WMP movie that is being play.
    I've tryied to add another div with ontop positioning. but it
    didn't work.
    I've added a dlear image and it worked but the SWF mouseover
    and mouseclick events disappeared.
    Can someone help me?
    PS - it happens only on IE.
    Thanks.

    Hi Alden,
    I fear your problem might be the file size (system resources,
    actually) of your project. And if that is the case, it will
    adversely affect your end users as well, so best find our
    definitively right away. But let's assume for a minute that the
    file size is
    not causing the problem ...
    Are there any interactive object(s) on the 33rd slide (or
    thereabouts) that might be causing the project to stop - like a
    button, click-box, or text-entry box???
    A 48 slide movie is not (in and of itself) overly large, so
    hopefully you can find some overlooked object that is causing the
    problem...
    .

  • I HAVE TO DOWNLOAD FIREFOX EACH TIME WHEN STARTING THE COMPUTER. WHEN I CLICK ON THE DESK ICON NOTHING HAPPENS AND IT ALSO DISAPPEARS FROM THE TASKBAR

    the firefox icon disappears from the taskbar when the computer is switched off and clicking desktop icon does not help so every time I have to download firefox again through Explorer. I know that the program is stored somewhere on my computer but it's not clickable and requires new downloading.

    I you see javascript: then that means that there is an onclick event attached to the link, so make sure that you aren't blocking JavaScript if such a link isn't working.
    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Press and hold Shift and left-click the Reload button.
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (MAC)
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How do i get the onclick state to stay on until another button is clicked?

    Im using edge animate and i am trying to create a button that has a different gradient when it is clicked on but when it is clicked the state only shows for a second and then disappears. how do i get the onclick state to stay turned on until another button is clicked?

    You can try to toggle the browser.shell.shortcutFavicons pref on the <b>about:config</b> page.
    *http://kb.mozillazine.org/about:config

  • Another Javascript issue (CheckBox onClick event)

    Hello All,
    I am using NWDS04s Adobe Designer 7.1.
    I created a IF with a TextField on it and a CheckBox. What i would like to do is, when the checkbox is checked, the TextField should disappear (TextField1.Presence = "hidden").
    I wrote this script in the OnClick event of the Checkbox:
    if (CheckBox1.rawValue == "1") {
                TextField1.presence = "hidden";
    }else {
                 TextField1.presence = "visible";
    When i deploy my WD you could guess, it's not working ;-((
    Is there something i am doing wrong??
    When i place this code in the Initialize event of the CheckBox and change the If statement to CheckBox1.rawValue == "0" it works as expected.
    Hope somebody can help me or try it on there machines. Maybe it's a bug.
    Thx in advance.
    Kind Regards,
    Maarten

    Hello Maarten,
    Please have a look at method <a href="https://media.sdn.sap.com/javadocs/NW04s/SPS7/wd/com/sap/tc/webdynpro/clientserver/adobe/pdfdocument/api/IWDPDFDocumentInteractiveFormContext.html#setDynamic(boolean)">setDynamic</a> (interface IWDPDFDocumentInteractiveFormContext).
    Regards,
    Philipp

  • Flash Buttons - Onclick display text

    Hello,
    I have a total of 5 separate buttons in my flash document. I want to have a user to be able to click the button and have it display some sort of text near the button itself. How do I get the text to stay once a button is clicked and disappear when another button is clicked? I dont want to use the hit method because the text will contain hyperlinks that I want the user to be able to click on. Any help would be appreciated.

    var tf:TextField=new TextField();
    addChild(tf);
    // add button listener's with listener function onClick
    function onClick(e:MouseEvent):void{
    tf.x=e.currentTarget.x+e.currentTarget.width;  // depends on your buttons' reg points
    tf.y=e.currentTarget.y;  ""
    tf.text =whatever
    // whatever else

  • To make text inside inputText disappear on click

    Hi,
    I'm using jdev 11.1.1.6. How to make text inside inputText disappear on click by using af:clientListener ?

    Hi,
    Use clickEvent.getSource().setValue(""); instead of clickEvent.getSource().setSubmittedValue("");
    Following code works for me
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <af:inputText label="" id="it1" value="This text vanishes on click">
        <af:clientListener method="onClick" type="click"/>
      </af:inputText>
      <af:resource type="javascript">
        function onClick(clickEvent) {
           // clickEvent.getSource().setSubmittedValue('');
            clickEvent.getSource().setValue("");
      </af:resource>
    </jsp:root>

  • Playing random movieClips onClick, then returning to start screen

    Hi- I'm very new to actionScript 3. My project starts out by plying one movie clip(startPage), then onClick, moviecip startPage disappears and a random movieclip(sc01-sc03) loads and plays. Once each random movieclip plays, I want to remove it from the stage and reload startPage. I have the random part figured out using an array, but I can't figure out how to remove the random sc movieClip once it is loaded. I tried using removeChild, but Flash isn't recognizing that I have added and of the sc movieclips as childen. Help!
    My current code below:
    package
              import flash.display.MovieClip;
              import flash.events.MouseEvent;
              import flash.events.Event;
              public class Main extends MovieClip
                        var startPage:StartPage;
                        var sc01:Sc01;
                        var sc02:Sc02;
                        var sc03:Sc03;
                        private var _scenario:Array;
                        public function Main()
                                  startPage = new StartPage();
                                  sc01 = new Sc01();
                                  sc02 = new Sc02();
                                  sc03 = new Sc03();
                                  _scenario = new Array();
                                  MC.addChild(startPage);
                                  //Add Scenes to array
                                  _scenario[0] = sc01;
                                  _scenario[1] = sc02;
                                  _scenario[2] = sc03;
                                  //Add Event Listeners
                                  startPage.boxButton.addEventListener(MouseEvent.CLICK,onBoxButtonClick);
                                  startPage.addFrameScript(startPage.totalFrames - 1, stopPageFunc);
                                  sc01.addEventListener(Event.ENTER_FRAME, everyFrame01);
                                  sc02.addEventListener(Event.ENTER_FRAME, everyFrame02);
                                  sc03.addEventListener(Event.ENTER_FRAME, everyFrame03);
                                  //stop at end of startPage timeline
                                  function stopPageFunc()
                                                startPage.stop();
                                  function onBoxButtonClick(event:MouseEvent):void
                                            MC.removeChild(startPage);
                                            MC.addChild(_scenario[Math.floor(Math.random()*_scenario.length)]);
                                  function everyFrame01():void
                                            if (sc01.currentFrame == 50)
                                            MC.removeChild(sc01);
                                            MC.addChild(startPage);
                                            startPage.gotoAndPlay(1);
                                            else
                                            {sc01.play();
                                  function everyFrame02():void
                                            if (sc02.currentFrame == 50)
                                            MC.removeChild(sc02);
                                            MC.addChild(startPage);
                                            startPage.gotoAndPlay(1);
                                            else
                                            {sc02.play();
                                  function everyFrame03():void
                                            if (sc03.currentFrame == 50)
                                            MC.removeChild(sc03);
                                            MC.addChild(startPage);
                                            startPage.gotoAndPlay(1);
                                            else
                                            {sc03.play();
                        //go to startPage when scenario done

    use:
    package
              import flash.display.MovieClip;
              import flash.events.MouseEvent;
              import flash.events.Event;
              public class Main extends MovieClip
                        var startPage:StartPage;
                        private var _scenario:Array;
                        public function Main()
                                  startPage = new StartPage();
                                  _scenario = new Array();
                                  MC.addChild(startPage);
                                  //Add Scenes to array
                                  _scenario[0] = new Sc01();
                                  _scenario[1] = new Sc02();
                                  _scenario[2] = new Sc03();
    shuffle(_scenario);
                                  //Add Event Listeners
                                  startPage.boxButton.addEventListener(MouseEvent.CLICK, onBoxButtonClick);
                                  startPage.addFrameScript(startPage.totalFrames - 1, stopPageFunc);
                                  this.addEventListener(Event.ENTER_FRAME, everyFrame;
                                  //stop at end of startPage timeline
                                  function stopPageFunc()
                                                startPage.stop();
                                  function onBoxButtonClick(event:MouseEvent):void
    if(startPage.stage){
                                            MC.removeChild(startPage);
    if(_scenario.length>0){
                                            MC.addChild(_scenario[0]);
                                  function everyFrame():void
    if(_scenario[0].currentFrame==_scenario[0].totalFrames){
    MC.removeChild(_scenario[0]);
    _scenario.shift();
    if(_scenario.length==0){
    // startPage.gotoAndPlay(1); ???
    MC.addChild(startPage);
    function shuffle(a:Array) {
        var i:int;
        var j:int;
        var e:*;
        var len:int = a.length;
        for (i = len-1; i>=0; i--) {
            j=Math.floor((i+1)*Math.random());
            e = a[i];
            a[i] = a[j];
            a[j] = e;

  • Downloads disappear from folder

    I have downloaded some music and when it has completed the task, the download file disappears. Hasn't done this before, files always remain in download folder.

    Launch Finder.
    Finder > File > Find
    When the Finder window opens up, enter the name of the music file in the search box at the top right corner.
    It will show up in the Finder under “Name”.
    Right click on it and select “Reveal in Finder” from contextual menu.
    The resulting Finder window will show the location.

  • On Screen Keyboard Glitch in Tablet Mode - On Screen Keyboard minimizes / disappears / slides down

    Hi there -
    New Yoga owner here ( just bought it yesterday) and within minutes of setting the computer up I noticed that the on screen keyboard was malfunctioning when the yoga is in tablet mode. Specifically, it pops up for about a second and then, without me touching or clicking or doing anything, it quickly slides back down. repeated attempts to bring up the keyboard end up, frustratingly, with the same result. what is perplexing to me is the on screen keyboard works fine in laptop mode (when I need it least).
    Someone else already started a post on this BUT it was marked as 'solved' (which it wasn't) so I figured I'd start new thread. The solution on the previous thread was to simply 'refresh' windows to get rid of any new drivers that were downloaded since purchasing the yoga, but I did not download or update anything prior to this problem arising (as I said, the problem seemed to occur within a few minutes of turning the machine on for the first time). In any case, I tried the refresh and it did not work so clearly my problem is not that I downloaded an incompatible or faulty driver. Please Help! I love this machine and I'm trying to see past the other flaws I've noticed so far (subtle screen flickering, inconsistent touch sensitivity etc), but this issue is starting to really undermine my confidence in the product quality and, from a productivity standpoint, it is a real deal breaker to not have full tablet functionality.
    Solved!
    Go to Solution.

    I had the same problem with the disappearing virtual keyboard within hours of starting to use my new Yoga 13.  I read somewhere that it was a problem with an incompatible Synaptics driver, and when I looked in the control panel, it showed that the Synaptics driver had been updated on my Yoga as of the day I bought it.  I think somehow by agreeing to automatic updates of the software, the Synaptics driver is updated to an incompatible version.   So what I did was I removed the Synaptics driver, using the Windows program uninstaller tool, rebooted, and then found the Synaptics driver at the Lenovo site which is specifically labelled as the Yoga 13 driver.  I installed that, and the keyboard is now working fine.    

  • Text Wrap Options have Disappeared ID CS4

    All the icons in my Text Wrap window have disappeared. The tab/pallet is still there, but empty. The pop out still lists “Show Options” and “Apply to Master Page Only” are still there, but grayed out. Thanks in advance for any help!!

    Yipee.
    Should have remembered that one.
    Thanks for the help!
    wally
    = = = = = = = = = = = = = =
    Wally Flick
    Director Creative Services
    [email protected]
    314-854-0718 (voice)
    847-953-0774 (fax)
    Designer's Corner
    Designer's Blog
    www.aon.com
    BobLevine <[email protected]>
    02/01/2010 04:55 PM
    Please respond to
    [email protected]
    To
    Walter Flick <[email protected]>
    cc
    Subject
    Text Wrap Options have Disappeared ID CS4
    http://forums.adobe.com/thread/526990
    Bob

  • Itunes won't open...bounces and disappears. Here is crash log.

    When I attempt to click on itunes, it appears on the dock, bounces, and disappears. This also occurs with the "help" application. Can anyone help? Here is the crash log, but b/c it is so large it is pasted here with only the first ever crash and the most recent.
    ===== Display starts at offset 91188 within file of length 222260. ====
    ===== Use File->Reload (Cmd-R) to display more. ====
    A/Frameworks/WebCore.framework/Versions/A/WebCore
    Referenced from: /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit
    Reason: no suitable image found. Did find:
    /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.frame work/Versions/A/WebCore: unknown file type, first eight bytes: 0x74 0x4B 0x93 0x48 0xA2 0x5C 0x25 0x93
    Host Name: william-purdys-mac-mini
    Date/Time: 2008-03-24 18:46:10.574 -0500
    OS Version: 10.4.9 (Build 8P135)
    Report Version: 4
    Command: iTunes
    Path: /Applications/iTunes.app/Contents/MacOS/iTunes
    Parent: WindowServer [57]
    Version: 7.1 (7.1)
    PID: 159
    Thread: Unknown
    Link (dyld) error:
    Library not loaded: /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.frame work/Versions/A/WebCore
    Referenced from: /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit
    Reason: no suitable image found. Did find:
    /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.frame work/Versions/A/WebCore: unknown file type, first eight bytes: 0x74 0x4B 0x93 0x48 0xA2 0x5C 0x25 0x93
    Host Name: william-purdys-mac-mini
    Date/Time: 2009-03-13 12:37:35.546 -0500
    OS Version: 10.4.9 (Build 8P135)
    Report Version: 4
    Command: iTunes
    Path: /Users/williampurdy/Desktop/iTunes.app/Contents/MacOS/iTunes
    Parent: WindowServer [59]
    Version: 7.1 (7.1)
    PID: 233
    Thread: Unknown
    Link (dyld) error:
    Library not loaded: /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.frame work/Versions/A/WebCore
    Referenced from: /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit
    Reason: no suitable image found. Did find:
    /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.frame work/Versions/A/WebCore: unknown file type, first eight bytes: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

    Looks like your webkit framwork is broken, or is now broken in relation to iTunes. Calls and classes may have changed since version 7.1, which is what you are using. Try updating to the latest version of iTunes and see if this fixes it.

  • When I open up my emails and close them, they disappear and I cannot find them.  Where are they going?  Is there a setting that I have to change?

    Once I open up my emails they disappear and I cannot find them anymore.  Is there a setting that I need to change to stop this from happening?

    Are you tapping any of the icons at the of the Mail app after opening them, or do they disappear without you doing anything ? And if you have more than one account on the iPad, does it happen on your other accounts as well ?

Maybe you are looking for

  • I need help with my Live! cam video im

    My camera has problems with showing the picture. The video is deformed, the video background shines through the view.What can I do with that? How can I turn the background off Ohh, in the Live ! cam center there are questionmarks almost on every butt

  • [CS2] [JS] Resize anchored object...

    Good morning: I need help figuring out how to resize different objects that are anchored in text. They do have a script label on them. For example I have an inline text box with the script label "gadget" that needs to be resized from 1 inch to 2 inch

  • My audio output is acting up

    Lately the audio output is cutting out on the right speaker both in the built in speakers and the headphones. I have been unable to find any way to fix this problem. I can reboot and sometimes that cures the problem for a while.

  • Why CollabSuite 2 do not have Forum app Feature

    Why CollabSuite 2 do not have Forum app Features? How to integrate the LDAP? Can Web conferencing now to use Netcape, Mozilla, Opera? Thanks for the help. [email protected]

  • Update query issue to update middle (n records) of the rows in a table

    Hi I have a below requirement for that I gone thru one below appoch to fulfill my requirement. Requirement: I need to pull 3 crore data thru ODI, source table does not have a primary key and it have 200 columns with 3 crores records (it has a 25 colu