A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: A question About ELSE

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    2

    Question A question About ELSE

    PHP Code:
    if (_x < eval("/:x") + 40 && eval("/:x") - 40 _x && eval("/:crash") == 0)
    {
        if (eval(
    "/:jump") > && mode 0)
        {
            /:
    bonus 5;
        }
        else if (
    mode 2)
        {
            
    tellTarget("/lives")
            {
                /:
    lives = eval("/lives") + 1;
                
    prevFrame ();
                
    tellTarget("")
                {
                    
    tellTarget("/sound")
                    {
                        
    gotoAndStop("bonus");
                        
    tellTarget("")
                        {
                            
    tellTarget("/" add hazard add "a")
                            {
                                
    gotoAndStop(1);
                                
    tellTarget("")
                                {
                                    
    gotoAndStop(1);
                                }
                            }
                        }
                    }
                    else
                    {
                        /:
    crash 1;
                        
    setProperty("/crash"_xgetProperty("/player"_x));
                        
    setProperty("/crash"_xgetProperty("/player"_x));
                        
    setProperty("/crash"_rotationgetProperty("/player"_rotation));
                        
    tellTarget("/crash")
                        {
                            
    gotoAndPlay(2)
                            
    tellTarget("")
                            {
                                
    tellTarget("/player/character")
                                {
                                    
    gotoAndStop(3);
                                    
    tellTarget("")
                                    {
                                        
    tellTarget("/lives")
                                        {
                                            /:
    lives = eval("/lives") - 1;
                                            
    nextFrame();
                                            
    tellTarget("")
                                            {
                                                /:
    jump 0;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }

    I used the above coding for a game that I'm currently making, but I get an ActionScript error saying that the else statement does not have a matching IF statement.. What do I do now?

    Please help!

  2. #2
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    I have NO CLUE what your trying to do witht hat code..

    it makes ZERO sense to me..


    you should even be using telltarget() anything.. thats old and depricated.


    these lines:
    /:bonus = 5;

    throw errors too..

  3. #3
    Member
    Join Date
    Jul 2000
    Location
    San Juan, Puerto Rico
    Posts
    43
    Wow I thought I would never see tellTarget again, jaja Flash 5 days? Awesome
    Rafael A. Emmanuelli
    Freelance Multimedia Developer
    www.irzfxmedia.com/portfolio

  4. #4
    Member
    Join Date
    Jul 2000
    Location
    San Juan, Puerto Rico
    Posts
    43
    I used the sh*t out of that command back then ;-) Whispers is right though you shouldn't be using that anymore. Will just bring problems now
    Rafael A. Emmanuelli
    Freelance Multimedia Developer
    www.irzfxmedia.com/portfolio

Tags for this Thread

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center