dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: getURL and variables

  1. #1

    getURL and variables

    Hi,

    I have 2 buttons in a flash movie with the following codes. They open a new URL that also contains a flash movie and it sends the variable "nFrame" and a value.
    Button1:
    Code:
    on (release) {
    getURL("goats.html?nFrame=1");
    }
    Button2:
    Code:
    on (release) {
    getURL("goats.html?nFrame=2");
    }
    When the new URL opens I want the flash movie to begin at a particular frame depending on what variable "nFrame" is equal to. I tried placing this code in the first frame to do it but it didn't work, the movie just loops and loops and doesn't stop at any frame.
    Code:
    if(nFrame=1) { 
    gotoAndStop("cheese");}
    
    else { 
    gotoAndStop("wine");}
     }
    Any ideas about what I'm doing wrong? I'm a bit of an amateur with variables.

    Thanks,

    Leao

  2. #2
    Senior Member
    Join Date
    Jun 2009
    Posts
    171
    Your IF statement should use 2 equal signs to check if the variable is equal to a value.
    Code:
    if(nFrame == 1){
       //gotoAndStop("frameName");
    }
    Sorry, I can't help you any more than that.

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