A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [RESOLVED] Loading web links from txt file

  1. #1
    Junior Member
    Join Date
    Mar 2007
    Posts
    12

    [RESOLVED] Loading web links from txt file

    I am making a sort of flash news post that posts 5 news posts and goes through them automatically. I would like it so when you clicked on one of the buttons (1,2,3,4,5) it would go to the full article that is posted on the site.

    So on the main actions layer, I did:

    this.createEmptyMovieClip("loader", 0);
    loadVariables("links.txt",loader);

    On button 1 I did:

    on(release)
    {
    getURL(loader.url1, _blank);
    }

    and in the text file I have:

    links.txt
    url1="www.google.com"&url2="www.paypal.com"

    However #1 when I view it on my computer, it tries to go to file:///C|/Documents%20and%20Settings/...........
    When i put it up on a site, it doesn't do anything at all.

    Please help me out here!
    All of the files are here - http://csulb.edu/~adurgavi/Flash/
    thanks
    Attached Images Attached Images
    • File Type: jpg 1.jpg (27.7 KB, 14 views)
    Attached Files Attached Files

  2. #2
    Member
    Join Date
    Jul 2007
    Posts
    77
    Code:
    var loader_lv:LoadVars = new LoadVars()
    loader_lv.onLoad = function(){
    button1.onRelease = function(){
    getURL(loader_lv.url1, _blank);
    }
    }
    loader_lv.load("links.txt");
    www.ugonna-nwosu.com
    If at first you don't succeed... Try not to look suprised.

  3. #3
    Junior Member
    Join Date
    Mar 2007
    Posts
    12
    when i have url1 = www.google.com it tries to take my site to - http://www.mysite.com/%22www.google.com%22
    and when i have url1 = http://www.google.com the whole thing doesnt work at all! Any suggestions?

  4. #4
    Member
    Join Date
    Jul 2007
    Posts
    77
    take the quote marks out from the text file

    links.txt
    url1=www.google.com&url2=www.paypal.com
    www.ugonna-nwosu.com
    If at first you don't succeed... Try not to look suprised.

  5. #5
    Junior Member
    Join Date
    Mar 2007
    Posts
    12
    Ooo Thank You So Much!

  6. #6
    Member
    Join Date
    Jul 2007
    Posts
    77
    no probs
    www.ugonna-nwosu.com
    If at first you don't succeed... Try not to look suprised.

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