How can I have 2 variables for one output?

I need it so that the spacebar does one thing on one frame and another thing on the other.
I have solved this but now I need to know how can I have it so 2 variables = 1 output.
This is my code at the moment:
while (menu)
if (changecharacter)
gotoAndStop(2);
menu = false

My whole code is:
var menu:Boolean = true
stop();
var leftPressed:Boolean = false;
var rightPressed:Boolean = false;
var changecharacter:Boolean = false;
Block.addEventListener(Event.ENTER_FRAME, fl_MoveInDirectionOfKey);
stage.addEventListener(KeyboardEvent.KEY_DOWN, fl_SetKeyPressed);
stage.addEventListener(KeyboardEvent.KEY_UP, fl_UnsetKeyPressed);
Block.gotoAndStop(1)
function fl_MoveInDirectionOfKey(event:Event)
          if (leftPressed)
                    Block.x -= 3;
          if (rightPressed)
                    Block.x += 3;
          if (changecharacter)
                    Block.gotoAndStop(2);
          while (menu)
          if (changecharacter)
                    gotoAndStop(2);
                    menu = false
function fl_SetKeyPressed(event:KeyboardEvent):void
          switch (event.keyCode)
                    case Keyboard.LEFT:
                              leftPressed = true;
                              break;
                    case Keyboard.RIGHT:
                              rightPressed = true;
                              break;
                    case Keyboard.SPACE:
                              changecharacter = true;
                              break;
function fl_UnsetKeyPressed(event:KeyboardEvent):void
          switch (event.keyCode)
                    case Keyboard.LEFT:
                              leftPressed = false;
                              break;
                    case Keyboard.RIGHT:
                              rightPressed = false;
                              break;
                    case Keyboard.SPACE:
                              changecharacter = false;
                              break;

Similar Messages

  • HT1414 I updated my i phone 4 to the new version but i want the old one how can i have the old one back

    I updated my i phone 4 to the new version but i want the old one how can i have the old one back. Thank you

    Sorry, Apple has no approved method to downgrade the version of iOS on your iDevice. You can voice your displeasure with the iOS by leaving feedback at the appropriate subsection from the link below.
    http://www.apple.com/feedback/

  • How can I pass variables from one project to another using Javascript?

    Hi all, I am trying to do this: let learners take one course and finish a quiz. Then based on their quiz scores, they will be sent to other differenct courses.
    However, I wish keep track on their previous quiz scores as well as many other variables.
    I found this nice widge of upload/download variables by CPguru (http://www.cpguru.com/2011/05/18/save-and-load-data-widget-for-adobe-captivate-4-and-adobe -captivate-5/). However, this widget works by storing variables from one project in local computer and then upload it to another project.
    My targeted learners may not always use the same computer though, so using this widget seems not work.
    All these courses resided in a local-made LMS which I don't have access to their code. Therefore, passing variables to PHP html files seems not work.
    Based on my limited programing knowledge, I assume that using Javascript to pass variables may be the only possible way.
    Can someone instruct me how to do this?
    Thank you very much.

    If you create two MIDlet in a midlet suite, it will display as you mentioned means you can't change the display style.

  • How can print blank rows for XML output report..

    Hi all,
    I am working in XML output PO fix format report and in that report there is 3 sections. (1) Header section(2)Line section (3) Footer section. My requirement is like this, header and footer section print in all pages and line section break for next page after printing fix 15 lines in a page. And if any page has less then 15 lines then it generate remaining blank row to maintain footer position.
    Please suggest me, how can i generate blank rows and break lines for page if there is more then 15 rows in Line section.
    Thanks in Advance!

    Hi,
    <?for-each:ROW?>
    <?end for-each?><xsl:variable name="cnt" select="count(//row|//ROW)" />
    <?for-each:xdoxslt:foreach_number($_XDOCTX,1,15-count(ROW),1)?> <?end if?>
    this will create 15 lines irrespective of you have that much rows of data in xml or not
    if you want more help , drop me mail @ [email protected]

  • How can I have more than one data schema on a page?

    Hi!
    I am a newbie, just discovering the joys of Spry!
    On this page: http://www.bodyoftruth.com/about_body_of_truth_bu_doug.htm I have successfully created a photo gallery.
    My question is: how can I add another one underneath of it? I want to duplicate what I have done by adding another gallery using different images.
    Thanks in advance.
    -Jan

    Sure.
    Create another data set with a different name. If you use Dreamweaver, which you obviously do, it will create a dataset with a new name, likely 'ds2'.
    When you make spry regions, use the ds2 name and it will be completely independent of the first gallery. You will just need a separate XML file for the data.
    Hope this helps.
    Donald Booth
    Adobe Spry Team

  • How can I use variable for a package filename and target file inODIFileMove

    I want to use a variable for paths so that when I migrate from Dev to QA to Prod I don't have to do a lot of editing.
    Specifically, I want a variable to be the first part of the path for the filename (\\sundev1\fnd1-hypd1) and join this with the rest (\update\log\*.log or specific filename) using several different objects like the ODIFileMove, ODI OS Command, OS Command, etc.
    Thank you!

    Hi,
    you could set up a database table holding processing parameters (i.e. Column1 - ParamName, Column2 - ParamValue).
    One row could then be ParamName = FilePath, ParamValue = \\<server>\folder\
    So, the refreshing query (attached to a logical schema) would be something like SELECT ParamValue FROM <your table> WHERE ParamName ='FilePath'
    Then, create a variable which can refresh from the database and in the package, drop the variable onto the flow and set it's type to 'Refresh Variable' in the properties.
    Hope this helps.
    geeo

  • HT1349 how can i sign up for one to one if i didn't buy my ipad from an apple store

    i would like to purchase one-to-one for my new ipad, which i didn't purchase at the apple store.  how can I do that and is there any way I can use it this afternoon if the apple store near me has a slot available?  Thanks
    Betsy Wild

    Betsy, call the Apple store and see if you can get in if there is space available.  Friends have purchased Apple products and had no problems at the stores in my area participating.  One even went to a training session before buying.  So give them a call and get that spot before it is taken.

  • I have multiple Iphoto libraries. I would love to have them all on my IPAD. However only one is copy to my Ipad. How can I have more then one? TX

    On my MAC I have 4 libraries (just one was to big). I would love to copy all of them on my IPAD. How can I do this?
    Thanks
    Michel

    http://support.apple.com/kb/HT5824?viewlocale=en_US&locale=en_US

  • When in safari how can i have more than one window open?? New ios doesnt allow it.

    Problem is when i updated to the newest ios 7. The dang thing doesnt allow me to have more than one window open at any time. This only makes things repetitive, complicated and slow. Moreover, the icons and overall view are probably designed to be in a kindergarden game, cos they look really stupid on iPad, whos gonna take apple seriously with this so called "improvements". If anyone knows how to open more than one window at at atime i,ll be really grateful to be told. Or if anyone can tell me how to uninstall the friking update i,ll be even more grateful. Thanx guys.
    <Subject Edited by Host>

    Tap "+" sign on top right.

  • How can I have more than one page open at a time?

    I would like to have more than one page open at a time- not tabs, but whole pages. How can I do this? I want to be able to have the pages side by side, instead of having to switch back and forth.

    Fox Splitter (formerly Split Browser): https://addons.mozilla.org/firefox/addon/4287

  • How can i have rooms for video conferences application?

    hi
    i want to define room in applications that using flash media server .
    i have a sharedobject for users and l have a list for users which connected to application, but i want to have rooms that users connect to them and they could perform video chat with each other .i just wana know how can i do this with flex and how i can handel this connection through flash media server.
    thank you.

    Thank friend......... thanks a lot.... its working.......

  • How can I have Microsoft-for-PC system on my McBook?

    I have already created a Virtual Box from Oracle on my McBook Pro.
    Now I want to be able to use PC system because numerous things are not for Apple, but only for PCs, and if I want to download them, they come as .exe files not as .dmg files
    how can I now use this virtual box? and install Microsoft PC in it?
    thanks

    If you want to run Windows natively directly on hardware, a Mac is just a PC with EFI, you use Boot Camp to help install Windows.
    This is not MacBook Pro forum.
    Boot Camp
    MacBook Pro
    Apple BootCamp Support
    Boot Camp Frequently asked questions

  • How can we use variables for instance name?

    I'm using 9 textbox in my stage. Names are similar, only difference is the last character. (s1_0, s1_1, s1_2, ...). I'm trying to use these textbox in a loop. But I couldn't find the right typing... s1_[i], s1_(i) or s1_{i} gives error.
      s1_0.text=0
      s1_1.text=0
      s1_2.text=0
      s1_3.text=0
      s1_4.text=0
      s1_5.text=0
      s1_6.text=0
      s1_7.text=0
    how can make the shortest typing for this issue?

    yes, its working, thank you very much...
    I tried array operator but the word "this"..
    what does it means ? when I delete this word, it gives error. how does flash know that it is a instance name?

  • How can I have keyframes on one layer proceed while using the gotoAndStop function?

    I have a Flash presentation that allows me to pair videos with the slides using a nice piece of ActionScript. The presentation advances to the slide on the next keyfram when the viweer clicks the "next button" and the video for that keyframe (on a separate layer) begins playing.
    owever, I am now trying to pair two slides with the same video without having the video restart or requiring the viewer to click the"next slide button" I was hoping I could just turn the two slides into a video clip, convert it into a symbol and insert the symbol in place of the static slide, but nothing seems to happen. I'm wondering if the "gotoAndStop" function in the ActionScript is preventing it from playing.
    Any thoughts on how I can have the presentation be controlled by the next and previous buttons most of the time, but have the exception of one slide that changes on its own? The relevant (I believe) code is below.
    Thanks!
    Julien
    // FUNCTIONS AND LOGIC
    function fl_prevSlide():void
              if(slides_mc.currentFrame > 1)
                        slides_mc.gotoAndStop(slides_mc.currentFrame-1);
                        if(transitionOn == true)
                                  fl_doTransition();
                        if(pageNumberOn == false)
                                  slideNumber_txt.text = "";
                        } else {
                                  slideNumber_txt.text = String(slides_mc.currentFrame + "/" + slides_mc.totalFrames);
    function fl_nextSlide():void
              if(slides_mc.currentFrame < slides_mc.totalFrames)
                        slides_mc.gotoAndStop(slides_mc.currentFrame+1);
                        if(transitionOn == true)
                                  fl_doTransition();
                        if(pageNumberOn == false)
                                  slideNumber_txt.text = "";
                        } else {
                                  slideNumber_txt.text = String(slides_mc.currentFrame + "/" + slides_mc.totalFrames);

    Try this code. Replace FLVmovie with the instance name of your FLV & set the time to when the frames shoudshould advance.
    import flash.events.Event;
    this.addEventListener(Event.ENTER_FRAME, checkTime);
    function checkTime(e:Event):void {
          if (this.FLVmovie.playheadTime >= 15)  // This is the playhead time in seconds
              this.gotoAndStop("frame label or frame #");
              this.removeEventListener(Event.ENTER_FRAME, checkTime);

  • How can I have more than one mobleme site?

    I currently have two registered domains with godaddy.com and created a website with one of them on iweb and published it to my mobile me account. However I want to create a second website on mobleme. I have another domain that I want to use and publish to mobleme, but have discovered I can't. It appears that I can have only one domain registered to mobileme. Is there anyway of add my other domain and also host it on mobileme under another name other than the one I already have?

    You can have only one domain re-directed to MobileMe via CNAME. You can have more domains re-directed to MobileMe via Web-forwarding — with or without masking. Read more here:
    http://iwebfaq.org/site/iWeb_Domains.html

Maybe you are looking for

  • Inventory cycle count report

    Hi We need to implement inventory cycle count report . Is there a standard business content data source for this ? Thanks and Regards Arun

  • Parent child dim build error??

    Hi, I'm loading members using parent child refernce method. My requirement is to load only level 0 members of already existed membesr from the outline.If data file has any new parent ,Essbase should kick out the new parent but should not load to the

  • Sequence of the classes called in a standard BADI

    Hi guys,    I have a problem on the sequence of the classes called in a standard BADI occuring in different system.    In the DEV system, the sequence called is A, B, C (Just to illustrate). But, in the QA and PROD system, the sequence called is B, C

  • Entering Vendor Master Bank Data

    To avaoid a conflict of duties, who should be maintaining vendor master bank data? I believe having the same person who is entering AP invoices also updating banking info for vendors is a conflict.  Who normally has this responsibilty? Also, who norm

  • Can't open internet

    Hey! What happened to my phone? After updating the new browser, I can't even open the internet.!!