A Flash Developer Resource Site

Results 1 to 14 of 14

Thread: Path does not exist...

  1. #1
    Senior Member
    Join Date
    Feb 2002
    Posts
    272

    Path does not exist...

    Hey all!
    I'm working on a file that can't find any images I'm trying to load into an array... it is searching for a directory I cannot find. When I compile the flash file, I get an error that the image cannot be opened but I can't find where that path is being specified anywhere in the movie. I tried the movie explorer to search the fla for references to this directory, but found nothing. Anyone have any ideas?
    Woody

  2. #2
    FK Slacker
    Join Date
    Jun 2000
    Location
    vancouver
    Posts
    3,208
    What code are you trying to use to load the images?

    K.

  3. #3
    Senior Member
    Join Date
    Feb 2002
    Posts
    272
    I'm using:
    load_image_name = function (image)
    {
    author = image;
    author_text = new String(author);
    author_field.text = author_text.toUpperCase();
    };
    portfolio_xml = new XML();
    portfolio_xml.ignoreWhite = true;
    portfolio_xml.onLoad = function (success)
    {
    if (success)
    {
    portfolio_config(portfolio_xml);
    }
    };
    portfolio_config = function (xmlDoc_xml)
    {
    createEmptyMovieClip("thumb_holder", 1);
    var _l1 = 0;
    while (_l1 < xmlDoc_xml.childNodes.length)
    {
    thumb_holder.attachMovie("portfolio_thumb", "thumb" + _l1, _l1, {image: portfolio_xml.childNodes[_l1].childNodes[0].childNodes[0].nodeValue, name: portfolio_xml.childNodes[_l1].childNodes[1].childNodes[0].nodeValue});
    if (location_trigger != 1)
    {
    next_x = 10;
    next_y = 10;
    location_trigger = 1;
    column = 1;
    }
    else if (column < 5)
    {
    next_x = next_x + 41;
    column = column + 1;
    }
    else
    {
    next_x = 10;
    next_y = next_y + 33;
    column = 1;
    } // end if
    target = thumb_holder.getInstanceAtDepth(_l1);
    target._x = next_x;
    target._y = next_y;
    _l1++;
    } // end while
    first_project = portfolio_xml.childNodes[0].childNodes[1].childNodes[0].nodeValue;
    //change the below directory relative to the main movie
    visuals.loadMovie(rel + "images/" + first_project + ".jpg");
    first_image = portfolio_xml.childNodes[0].childNodes[0].childNodes[0].nodeValue;
    load_image_name(first_image);
    delete first_image;
    delete first_project;
    delete location_trigger;
    delete next_y;
    delete next_x;
    delete column;
    delete target;
    };
    portfolio_xml.load(rel + "portfolio.xml");
    stop();
    Woody

  4. #4
    FK Slacker
    Join Date
    Jun 2000
    Location
    vancouver
    Posts
    3,208
    I don't see where you are defining the variable rel:

    visuals.loadMovie(rel + "images/" + first_project + ".jpg");

    K.

  5. #5
    Senior Member
    Join Date
    Feb 2002
    Posts
    272
    oops, you're right... but when I take that out... I still get the same error. =(
    Woody

  6. #6
    FK Slacker
    Join Date
    Jun 2000
    Location
    vancouver
    Posts
    3,208
    What exactly is the error?

  7. #7
    Senior Member
    Join Date
    Feb 2002
    Posts
    272
    Error opening URL "file:///C|/Documents%20and%20Settings/Student%20%26%20Work/Desktop/Summer%20Classes/Flash/Example%20Files/gallery/flash/content/portfolio/thumbnails/myimage_1.jpg"
    I don't know where "flash/content/portfolio/" is coming from.
    The path from the swf should be:
    "file:///C|/Documents%20and%20Settings/Student%20%26%20Work/Desktop/Summer%20Classes/Flash/Example%20Files/gallery/images/thumbnails/myimage_1.jpg"
    Woody

  8. #8
    Senior Member
    Join Date
    Feb 2002
    Posts
    272
    here is what I'm working with...
    Last edited by woodman650; 06-07-2005 at 09:05 PM.
    Woody

  9. #9
    FK Slacker
    Join Date
    Jun 2000
    Location
    vancouver
    Posts
    3,208
    Looks like your Publish Settings are messed up...go into the Publish Settings panel and click the Use Default Names button...that seems to have fixed it for me...

    K.

  10. #10
    Senior Member
    Join Date
    Feb 2002
    Posts
    272
    hmm... I tried and I'm still getting the error. you don't get any errors and you can see the full-size image and the thumbnail?
    Woody

  11. #11
    Re Member websam's Avatar
    Join Date
    Jul 2000
    Location
    Australia (VIC)
    Posts
    660
    Can you tell the following info:

    1. FULL path of the FLA
    2. FULL path of your thumbnail images?
    3. value of a variable "rel"?
    4. trace result of your XML object
    Last edited by websam; 06-07-2005 at 09:16 PM.
    Challenging you: I explore my strengths;
    Being challenged: I discover my weaknesses;
    Defeating you: I GIVE you my knowledge;
    Being defeated: I GAIN your knowledge;

  12. #12
    Senior Member
    Join Date
    Feb 2002
    Posts
    272
    1. C:\Documents and Settings\Student & Work\Desktop\test
    2. C:\Documents and Settings\Student & Work\Desktop\test\images\thumbnails
    3. "rel" variable removed
    4. I don't know what this is, haha
    Woody

  13. #13
    Re Member websam's Avatar
    Join Date
    Jul 2000
    Location
    Australia (VIC)
    Posts
    660
    It is obvious that the relative path for all thumbnails are in "images/thumbnails/" ranther than just "images/".

    Do following steps:

    Step 1. check what first_project returns you
    Code:
    first_project = portfolio_xml.childNodes[0].childNodes[1].childNodes[0].nodeValue;
    trace(first_project);
    If it returns only the image file name without path, do following step:
    Code:
    //change the below directory relative to the main movie
    visuals.loadMovie("images/thumbnails/" + first_project + ".jpg");
    *******
    This will work ONLY if the export path is the same as FLA path (default export setting), if not, please show the full path of your export SWF in export setting for further assistance.
    Last edited by websam; 06-08-2005 at 09:57 AM.
    Challenging you: I explore my strengths;
    Being challenged: I discover my weaknesses;
    Defeating you: I GIVE you my knowledge;
    Being defeated: I GAIN your knowledge;

  14. #14
    Senior Member
    Join Date
    Feb 2002
    Posts
    272
    I tried what you recommended Sam, but instead of the full image appearing and the thumbnail not... now only the thumbnail appears (in place of the large image).

    my publish settings are default. here is the file...
    Attached Files Attached Files
    Woody

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