A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: urgent help

  1. #1
    Senior Member
    Join Date
    May 2001
    Posts
    140

    urgent help

    Hi all
    I have texfield in root instance "myVars.link" and I am loading a value to text field form php file, with below code I am trying to check..if theres no value to in text field(empty)...go to label
    gotoAndStop("display2");


    if (myVars.getBytesTotal() == myVars.getBytesLoaded()) {
    if (_root.myVars.link == "") {
    gotoAndStop("display2");
    } else {
    _root.gotoAndStop("display1");
    }
    }

    What is wrong with below code?

    thanks
    pilotX

  2. #2
    MoiK78 Flasher moises's Avatar
    Join Date
    Sep 2000
    Location
    Madrid, Spain
    Posts
    251
    What's the name of the value you'r loading?
    myVars and _root.myVars are the same?

    I think you should clarify where are you putting this code and where do you load the vars.

    Take this example:
    - Load the variables from PHP to a level so they don't mess with the values in the movie. loadVariablesNum ("file.php", 10);
    - Then use relative references when possible.

    Check if this can help you:
    Code:
    loadVariablesNum ("file.php", 10);
    if (_level10.getBytesTotal() == _level10.getBytesLoaded()) {
        myVars.link = _level10.link;
        if (myVars.link == "") {
            gotoAndStop ("display2");
        } else {
            gotoAndStop("display1");
        }
    }

    "I'm a Jedi as my father before me"

    :: MoiK78 blog. Be sure to check it out :: My Location :: FlashKit.com's 28215th User!

  3. #3
    Senior Member
    Join Date
    May 2001
    Posts
    140
    Hi moises
    many thanks for the reply!
    is it possible to load var like this?
    loadMovie("http://test.com/test/banner_img/"+myVars.pic_name+".jpg", "_root.target_product")

    "+myVars.pic_name+" ????

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    if (_root.myVars.link == "")

    this "" is already a value. It doesn't mean it's empty.. try:
    if (_root.myVars.link == undefined)

    or declare the variable on first frame of the movie:
    myVars.link = ""
    Then check its value on(data) (after the vars come in)
    gparis

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