A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: load JPGs doesn't work with variable

  1. #1
    I'm not sure if it's the Flash player, but I've got a problem loading JPGs in the player for Mac and for Netscape. It works as should in Internet Explorer.

    this.loadMovie("http://www.z-bra.com/filesBoekjes/animaux_color/cover.jpg");

    works perfectly

    this.loadMovie("http://www.z-bra.com/filesBoekjes/"+naam+"/cover.jpg");

    doesn't work at all, even though Flash has the variable naam, I've checked..

    Anyone know what to do? Getting a bit desperate.. Client is on Mac, can't see anything I've done on the site..


    Thanks

  2. #2
    President, save the
    New Zealand dollar foundation

    Join Date
    Jun 2000
    Posts
    1,743
    The variable "naam" may be out of scope,
    where does it reside?
    May need a
    Code:
    var folder = _root.naam;
    this.loadMovie("http://www.z-bra.com/filesBoekjes/" + folder + "/cover.jpg");

  3. #3
    thanks, but I don't think that's the problem...

    This is the complete code:

    frame1:
    Code:
    naam=_parent._parent.naam;
    frame 4:
    Code:
    if(naam==undefined){
    	gotoAndPlay(1);
    } else {
    	_parent.gotoAndStop(2);
    	loadMovie("http://www.z-bra.com/filesBoekjes/"+naam+"/cover.jpg", this);
    }

  4. #4
    Senior Member
    Join Date
    Jul 2000
    Posts
    419
    try a little test

    do a trace like this

    trace("http://www.z-bra.com/filesBoekjes/"+naam+"/cover.jpg");


    then watch for extra blank space like so


    http://www.z-bra.com/filesBoekjes/bob /cover.jpg



    this happens to alot of people loading vars externally

  5. #5
    that's it, thanks.

    There was a hard return in there

    Because it loads from a textfile, I had arranged them under eachother to make it easier to read, hence the return..

    Can I put some character in there that'll prevent the break? I need it to be under each other, because the client is going to use it to update the site..

    Otherwise, I'll get the breaks out in flash..

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