A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Image loading with external text file....help!

  1. #1
    Member
    Join Date
    Mar 2002
    Posts
    44

    Image loading with external text file....help!

    Hello,

    I have a movie clip with the instance name "holder"
    On the same layer/keyframe I have the following action script:

    Code:
    _root.loadVariables("image_loading.txt");
    holder.loadMovie(image);
    In the textfile "image_loading.txt" i've put:
    Code:
    image=foto1.jpg
    But when I play the movie, the movie clip "holder" stays white...
    I've tried everything but I can't make it work.

    When I play it without the textfile and directly using:
    Code:
    holder.loadMovie("foto1.jpg")
    the picture loads in the movie clip...

    Can anybody help me with this ?
    Thank you!
    Roland le Fèvre

  2. #2
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789
    Code:
    getImage = new LoadVars();
    getImage.onLoad = function(success) {
    	if (success) {
    		trace("Load successful.");
    		holder.loadMovie(this.image);
    	} else {
    		trace("Error loading data; check path and try again.");
    	}
    };
    getImage.load("image_loading.txt");

  3. #3
    Member
    Join Date
    Mar 2002
    Posts
    44

    Thank you!!

    I have to learn a lot I see
    It works!
    Thank you.
    Roland le Fèvre

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