A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: undefined variable

  1. #1

    undefined variable

    Hi all,
    Why do i get undefined when i use the following;
    Code:
    loadVariablesNum ("quotes.txt", 0); 
    newquote = random(numQuotes);
    _root.myquote = eval("quote" +newquote+ "txt");
    Regards,
    mic

  2. #2
    Senior Member hanszorg2's Avatar
    Join Date
    Sep 2004
    Posts
    308
    newquote = random(numQuotes);

    do u think the above line in your script is correct

  3. #3
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    You will need a couple of frames before Flash has loaded the textfile, before using the variables in it..

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  4. #4
    Thanks for the reply.
    i'm assuming it is correct. I've even tried putting in a number to replace numQuotes but it doesn't seem to work either.

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