Problem with a script making the number of lives change

http://www.zshare.net/download/super...flash-fla.html
- The fla file (As my code is all over the place you probably might
want to look at this)
The lives doesn't work. I made a movie clip with different
frames and on each frame there are different numbers of hearts
on.The code on the frame mario dies is:
Code:
onEnterFrame = function () {
if (_root.healtha._currentframe != 1) {
_root.healtha.gotoAndPlay(_root.healtha._currentframe-1);
if (_root.healtha._currentframe == 1) {
_root.healtha.gotoAndPlay(_root.healtha._currentframe+3);
if (_root.healtha._currentframe == 3) {
_root.gotoAndPlay("scene2", 1);
} else {
_root.gotoAndPlay(2);
The movie clip containing the hearts should be at
_root.healtha So i want when mario dies the number of hearts goes
down and when the number of hearts is zero and he dies (when
_root.healtha is on frame 3) you go to scene2.
Thats the code for the fla file i uploaded the new code is:
onEnterFrame = function () {
if (_root.healtha._currentframe == 1) {
var aa:Number = _root.healtha._currentframe+3;
_root.healtha.gotoAndStop(aa);
} else if (_root.healtha._currentframe != 2) {
var bb:Number = _root.healtha._currentframe-1;
_root.healtha.gotoAndStop(bb);
} else if (_root.healtha._currentframe == 2) {
_root.gotoAndPlay("scene2", 1);
_root.gotoAndPlay(2);

does that onEnterFrame only execute when mario dies? if so,
it doesn't need to be in an onEnterFrame loop? if not, that code
won't work.
so, assuming it works (label the first frame in scene 2 and)
use:

Similar Messages

  • Problems with php script in the contact form

    Hello, I am from the Czech Republic and I am not a coder. I have 2 problems with my php sript. I am using a simple php script from Paul Trani, see below.
    Firstly the email adress - when someone inserts an email adress in this form [email protected] it is OK, but when someone writes an address for example [email protected] (this type of adress is very common in our country) the answer is "That is not a valid email address.  Please return to the previous page and try again." I think the problem is the dot before the @.
    Secondly diacritical marks - Since I am from the Czech Republic we use diacritical marks (for example š,č,ř,ž,á,í,é,ě) so instead of this letters a get ? or Å™ or Å¡ to my email.
    I really do not know how to fix these problems.
    Thank you for any help. Sorry for my English. Peter
    <!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" />
    <META HTTP-EQUIV="refresh" content="0;URL=thankyou.html">
    <title>Email Form</title>
    </head>
    <body>
    <?php
      $name=addslashes($_POST['name']);
      $email=addslashes($_POST['email']);
      $comments=addslashes($_POST['message']);
    // you can specify which email you want your contact form to be emailed to here
      $toemail = "[email protected]";
      $subject = "From EcoStyleStudio.com";
      $headers = "MIME-Version: 1.0\n"
                ."From: \"".$name."\" <".$email.">\n"
                ."Content-type: text/html; charset=iso-8859-1\n";
      $body = "Name: ".$name."<br>\n"
                ."Email: ".$email."<br>\n"
                ."Comments:<br>\n"
                .$comments;
      if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
        echo "That is not a valid email address.  Please return to the"
               ." previous page and try again.";
        exit;
        mail($toemail, $subject, $body, $headers);
        echo "Thanks for submitting your comments";
    ?>
    </body>
    </html>

    ereg() has been deprecated, it is recommended that you dont use it.
    You want to look at this
    http://www.php.net/manual/en/function.preg-match.php
    Within this page I found this:
    If you need to check for .com.br and .com.au and .uk and all the other crazy domain endings i found the following expression works well if you want to validate an email address. Its quite generous in what it will allow
    <?php
            $email_address = "phil.taylor@a_domain.tv";
         if (preg_match("/^[^@]*@[^@]*\.[^@]*$/", $email_address)) {
             return "E-mail address";        
    ?>

  • I have an unresolved problem with unresponsive scripts despite the ed-meister's kind help

    on approx.dec.10,the ed_meister emailed me answer 122359 and i took his advice and registered at informaction(noscript)forum.they were supposed ti email me a key to complete the registration but they never did so i subsequently uninstalled noscript.however,i continue to get error messages re unresponsive scripts that seem to be a payback,e.g.,
    a.chrome://noscript/control/main.js.3722
    b.file:///C:program%20files/mozilla%20/firefox/modules XPCOMutils.jsm:165
    c.chrome://noscript/content/ABE.js:1216
    d.file:///C:program%20files/mozilla%20firefox/components/NS
    LOGIN MANAGER.j.s.:302
    e.file:///C:program%20files/mozilla%20firefox/components/NS
    BLOCKLIST SERVICES.js:648
    f."script"chrome://saff/content/safplg.js.2864'
    There are more but i'm just too tired.
    on noscript's FAQ re whitelist,i was amazed to see that one can disable any item except chrome from whitelist because "firefox would not work without it because it is a priviliged pseudo-protocol used by firefox". I thought chrome was a rival browser to firefox!
    but since chrome's daddy is google and they are the new microsoft
    (the 800 lb.web gorilla),i get it that its best to play nice with them.
    Look, i really don't care.i'm just an old dude who doesn't know crap about tech and just don't want these damn scripts to slow up my old pc any more than it is. i can't recall these problems before installing Noscript and can't get why i keep getting them even after uninstalling Noscript.Have they taken Firefox over?i have refused many requests to make chrome by default browser because i'm old school
    and loyal but this really has me wondering.Can you resolve these problems for me or not?Ed-meister,if you read this,i'm not mad at you,pal.You are a gent and you did try to help.i'm grateful to you.

    I also have this problem and never had it before. This scripts that become non responsive and there are more than just this one, really really cripples my system to the point where I have to wait 5 minutes between clicks in the web browser... When is FireFox going to address this issue?
    This is the error message I get: Script: file:///G:/Program%20Files/Mozilla%20Firefox/components/nsLoginManager.js:302

  • Problem with a script making subform visible

    Hello
    I have a form with 5 radio buttons. Two of the radio buttons, values 3 and 5 need to make a hidden subform visible. All other values leave the subform hidden. Here is my script:
    if (this.rawValue == '1') {
    page1.deliveryInformation.flowed.presence = "hidden";
    if (this.rawValue == '2') {
    page1.deliveryInformation.flowed.presence = "hidden";
    if (this.rawValue == '3') {
    page1.deliveryInformation.flowed.presence = "visible";
    if (this.rawValue == '4') {
    page1.deliveryInformation.flowed.presence = "hidden";
    if (this.rawValue == '5') {
    page1.deliveryInformation.flowed.presence = "visible";
    else {
    page1.deliveryInformation.flowed.presence = "hidden";
    Value 3 is not working. All other values work as expected. I've been looking at this script for over an hour and can't figure out why it isn't working. Any help would be appreciated.
    Thanks,
    MDawn

    The issue is with the last else part.
    Either place the conditions in
         if(){
         elseif(){
         else{
    OR
    use the switch case as below.
    switch (this.rawValue)
    case "1":
    page1.deliveryInformation.flowed.presence = "hidden";
    break;
    case "2":
    page1.deliveryInformation.flowed.presence = "hidden";
    break;
    case "3":
    page1.deliveryInformation.flowed.presence = "visible";
    break;
    case "4":
    page1.deliveryInformation.flowed.presence = "hidden";
    break;
    case "5":
    page1.deliveryInformation.flowed.presence = "visible";
    break;
    default:
    page1.deliveryInformation.flowed.presence = "hidden";
    Thanks
    Srini

  • Problem with navigation script

    Hi I'm having trouble getting a button work correctly when
    pressed it should take user to a particular label on the main
    scene. Is there a problem with my script? The button is inside a
    movie clip which is inside another movie clip. Thanks in
    advance.

    this quite difficult to explain but here goes. i have a
    complex button with a roll in roll out effect. ie. a movie clip
    acting as a button that shows different buttons (in another movie
    clip) when it is rolled over. I then want the different buttons to
    go to other parts in the main timeline. the code works fine when
    the buttons are on the main timeline but because it is within
    another two movie clips it doesnt work like it should. In fact the
    script i have used in the first movie clip also affects the button.
    This script is as follows and belongs in the first frame of the
    first movie clip. In other words, I need the button not to be
    effected by the following script but by the gotoAndPlay script.
    Thanks

  • HT1665 i have an apple IPhone4. I am experiencing certain problem with my iphone4. The problems are as follows a. my ear piece and proximity sensor is not working while making a call. 2. It cannot reproduce sound without earphone but rings if gets any cal

    Hi folks,
    i have an apple IPhone4. I am experiencing certain problem with my iphone4. The problems are as follows a. my ear piece and proximity sensor is not working while making a call. 2. It cannot reproduce sound without earphone but rings normally if gets any call.
    Can any one help me in this regard??

    Try to reset the phone by holding the sleep and home button for about 10sec, until the Apple logo comes back again. You will not lose data by resetting, but it can cure some glitches after installing new software or apps.

  • When I make a project in iDVD'09, there are sometimes green blocs with points flickering in some scenes of my iMovie-film. In iMovie there is no problem with this film, but the problem begins by exporting to iDVD and making a project there.

    When I make a project in iDVD'09, there are sometimes - at voluntary moments - green blocs with points flickering in some scenes of my iMovie-film.
    In i-Movie there is no problem with  this film, but the problem begins by exporting to iDVD and making there a project.
    Who can help me, then I cann't find everything about this in any forum?

    Hi
    Can be a problem that get multiplied and visible when iDVD encode for DVD.
    A. See if problem can be isolated to a single frame in the movie and re-import this clip and see if it's better
    B. When free space on Start-Up hard disk goes low - strange things like this might occure. I never go under 25Gb free space on this Start-Up Mac OS hard disk !
    C. Does this problem arises what ever encoding quality You use ?
    Yours Bengt W

  • I have problem with my iphone 5 the battery still running so fast

    i have problem with my iphone 5 the battery still running so fast

    Click the link below choose your country then choose service and see if you have an Apple Authorised Service Provider in your country.
    https://locate.apple.com/au/en/
    If you dont have any Apple Authorised Service Providers near you either then contact AppleCare and ask them for options for postage in your country/region. You can find the number for your country below:
    http://support.apple.com/kb/HE57
    Hope this helps

  • Problem with a script to remove graphics

    Hello,
    I have tried to build a javascript to remove all graphics whose extension is not ".EPS" (with "EPS" really in upper cases, as it is for Mathtype equations in Word import).
    But It doesn't work and I can't understand why.
    Here is the script:
    //The script intend to remove all graphics whose extension is not ".EPS"
    var myDoc = app.activeDocument;
    var myGraphics = myDoc.allGraphics
    //Remove graphic if graphic extension is different from ".EPS"
    for (var p = 0; p < myGraphics.length; p++) {
        var myImage = myGraphics[p]
        if (CheckExtEps(myImage) != 0){
        myImage.remove ()
    //Compare graphic extension with ".EPS" and return myExtValue = 0 if it matches exactly
    function CheckExtEps(myImage) {
        var  myString = myImage.name
        myExt = myString.substr(myString.lastIndexOf( "." ))
        myExtValue = myExt.localeCompare(".EPS")
        return myExtValue
    When I run this script, ALL the graphics are removed, ".EPS" included.
    I do have ".EPS" graphics in my document and I expected them not to be removed.
    So there is something wrong somewhere, but I don't know what to change.
    Any ideas?
    By the way, I have a more generic question as a beginner:
    I am working with ExtendScript Toolkit. How can I do to check my script step by step?
    For exemple, how can I display my variables values as "myString", "myExt", "myExtValue" at each step?
    Actually, this script is a step for a bigger script I intend to build to deal with Mathtype equations in Word import.
    After not-EPS graphics beeing removed, I wish to relink all remaining equation prewiews to eps in a selected folder, by consecutive order.
    But this is a big piece of scripting to swallow for me, so I'm working slowly, step by step.
    TIA
    Best regards
    Nicolas

    Hello Ariel
    Thank you very much for your help.
    1. I added semicolons at the end of lines, but the script result is the same.
    2. Running line by line, I could see in the Console where is the problem:
    variable "myString" is always undefined.
    Well, I have to get more inside my script...
    Thank's again
    Best regards
    Nicolas
    Nicolas BALBO  
    [email protected]
    22, rue d'Hauteville  75010 PARIS
    Tel : 33 (0)1 42 57 14 31
    Le 18 avr. 2012 à 17:36, Arïel a écrit :
    Re: Problem with a script to remove graphics
    created by Arïel in InDesign Scripting - View the full discussion
    Well, I can't see any semicolons in your script. Maybe that's just the
    email interface, but there should be semicolons at the ends of lines.
    In the ESTK, you can step through a script a line at a time. Just click
    on the downwards pointing arrow instead of the "play" arrow. Each time
    you click, the script will advance one line. In the Console window
    (Windw>Console) you can then type the name of the variable you wish to
    examine.
    Ariel
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4344039#4344039
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4344039#4344039. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in InDesign Scripting by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Problems with answering and making calls

    I have owned a Droid 2 for almost a year now. I love it! But for the last few months I have had a problem with answering and making calls. Sometimes when I answer a phone call it connects like I have answered the call but I can't hear anything and the other person can't hear me. The call says I am connected and I can see the timer going but there is no communication. It does the same thing when I go to make calls sometimes. I can hit send and it connects the call but I can't hear anything. The timer is going and the other person answers but I can't hear anything. The only reason I know they answered is because they then call me back and leave a voicemail, sounding very confused. I have to restart my phone and then the problem is solved. But only for a little bit. I haven't been able to pick out a pattern or anything. It is random and very frustrating. I went into my local Verizon store about the issue and they arranged for me to receive a new, certified pre-owned phone because I pay insurance on my phone. I received the phone the next day and everything went great, for a few days. But this phone is also having the same problem. I am getting very frustrated with this because I need to be able to actually talk to people when they call me. Anyone else having the same problem? I want to go back to the store but I feel like they wouldn't do anything more than they did last time, which didn't solve the problem.

    I have this same issue on a bi-daily basis: I can place a call, but then I hear nothing.  I can answer a call, but I then hear nothing.  The calls connect as the people I am in contact with will tell me they answered my calls and heard me, though I could not hear them - and vice versa.  Also, this phone does not like to place a call using the "call" option if dialing from "recent calls".  I turn this phone on/ off daily, I've taken the battery out on about 50% of the occassions when this issue has happened.  This has been a problem for me for approximately 1yr.  My early renew date is just shy of 2 months from now and I cannot wait to get rid of this phone.  Aside from having great difficulty making/ receiving calls, the phone is overall slow to respond to basic functions like text messaging or using the camera.  Also, most times while taking a picture, the camera will "take a picture" but then there is no image in the file.  Highly annoying - the only way to temporarily fix this is to reboot - but like the call issue, the problem recurs.  I do have a bunch of apps on installed on the phone, but since I also have an APP killer on the phone, nothing aside from "Weather Bug" app is ever really running in the background that would slow this phone.  BUT, right now my main concern is may safety: God forbid I am ever in danger or in an emergency situation, this phone's constant malfunctioning could possibly be the physical harm or death of me.  I hope that my family can sue the company that provides the software for this phone, Verizon & Motorola in the event of my untimely death.

  • Problem with SAP Script FAX output

    Hi Friends,
    I have problem with SAP Script Fax output.
    After I issued output using the messge type, the print preview format shows me correct alignments and the right data. But when I go to List display using the menu bar functions from the print preview screen, the list is showing me the right data, but all the alignments at the main window went wrong.
    How do I rectify this problem? I need correct alignments in both form display and list display.

    Hi Sasidhar,
    Have you tried with different fax machine.
    Regards,
    Atish

  • HT1296 I'm having difficulty syncing my iCal between my home computer and iPhone.  New entries from my home are not syncing with the phone and vice-versa.  I didn't have any problems with this before until the latest phone update.  Any suggestions?

    I'm having difficulty syncing my iCal between my home computer and iPhone.  New entries from my home are not syncing with the phone and vice-versa.  I didn't have any problems with this before until the latest phone update.  Any suggestions?

    It could be that the existing wire in your appartment is not clean enough to provision DSL only. When combined with the phone possibly it has a higher line voltage and worked before. Now that the line is to be provisioned without phone service it may be giving them trouble that did not show before they came out and ran the new line test. So a new jack dedecated for your DSL line may require a new wire be run to your appartment. Also the account for internet only used to require direct billing to a credit card or something else. This was a number of years ago. Most accounts are linked to a phone number, and without a voice number it adds to the confusion.
    If you are getting the voice and everything turned on as before, then I am at a loss for words.

  • TS3694 good evening i have an problem with my iphone 4 the wif and network cant on now if i tray is showing iTunes i tray to reload the ios is showing an error -1 can you help me

    good evening i have an problem with my iphone 4 the wif and network cant on now if i tray is showing iTunes i tray to reload the ios is showing an error -1 can you help me

    No problem, glad to help!
    Update: my PC USB hub was connected to a USB 3 port, I connected the 30 pin cable directly to my PC, And the restore worked just fine. Restored phone from iCloud backup and seems to be working fine.

  • TS5376 I'm having a problem with downloading and installing the new version of itunes for windows (11.1.4)  I have done everything the troubleshooting article has said and it is still not working properly.

    'm having a problem with downloading and installing the new version of itunes for windows (11.1.4)  I have done everything the troubleshooting article has said and it is still not working properly.  I have even done a repair to see if that works and it has not.  Has anyone else found a new way to get it working?

    Try Troubleshooting issues with iTunes for Windows updates.
    tt2

  • HT1222 I am trying to update my phone so I can save my info on my old phone & get a new phone, but I get a error that says "There was a problem with downloading teh software, the network connection timed out.."  HELP!  Not sure what my settings shoud be..

    I am trying to update my phone so I can save my info on my old phone & get a new phone, but I get a error that says "There was a problem with downloading teh software, the network connection timed out.."  HELP!  Not sure what my settings shoud be...
    I never updated anything until now...I want o update my iPhone to the newest version, but i do not want ot loose all that I have on this phone. I was told I needed to update the operating systems so i can put things into the cloud for transport to new phone, but I am just not sure how to do this..Can you help out here??

    Dear Jody..jone5
    Good for you that can't update your iphone because I did it and my iphone dosen't work for example I can't download any app like Wecaht or Twitter..
    Goodluck
    Atousa

Maybe you are looking for

  • Green Pixel after upgrade to iOS 4.0.1 on 3GS

    ok.. this is very very weird.. i have 3GS 32GB, after i upgrade to 4.0.1 or 4.0.2, if i download picture from safari or facebook or apps, the pictures is showing green pixel, but not all the picture have a green pixel, it's random picture, some pictu

  • When is the battery update coming?

    Hi, Can anyone tell me when are we expecting the update to fix the battery issue?

  • Tunning the query for faster record retrieval

    Hi, I am back, now this time I donot really know in which forum I should post this query, in XML or in Oracle Developers ? Anyway... The problem is : I have a database with millions of record in that, I give a query based on some 4/5 parameters, and

  • 10G exam 1z0-042 Cleared~~~~~~~~~~~~~~~~~~~~

    Hi 10G 1Z0-042 CLEARED~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ i have successfully cleared oracle 10G 1z0-042 exam. i got 92% marks 69/75. one more to go for completing 10g ocp. exam is very easy if u r fully prepared and have some real exp as a oracl

  • Kevin Kirkman

    Have G5 mac and trying to reinstall CS2 photoshop etc. My serial number [removed] Activation Number which keps changing at each attempt Activation Type normal: 93:-12 Need 20 digit Authorization Code . . . Have phoned support . . Phone Activation . .