dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Stupid simple question but need help!!

  1. #1

    Stupid simple question but need help!!

    OK I made a preloader for some external swfs and the preloader is in it's own movie clip and i want some buttons that are in the _parent of the preload movie clip to tell the preloader what to preload. I want to make the URL for the SWF a variable i.e.:

    content_path = "/PORTFOLIO/PRINT/RKR/RKR.swf"

    and then in the preloader code i have loadMovie and LoadMovieNum tags and I tried:
    loadMovie (content_path)
    &
    loadMovieNum(content_path, 0)
    but those didn't work. Can someone help me out with how to do this correctly? Thank for any thought you might put into this!!
    //Chris

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    depending on where content_path is declared:
    loadMovieNum(_level0.content_path, 0)
    As for your 1rst example, loadMovie(), the syntax is wrong. Where's the target clip?
    gparis

  3. #3
    The way it's set up is that I have a movie clip, "Portfolio", that has a MC for a menu in it and a "Preloader" MC. in the menu MC there are about 13 buttons for clients, for which an external swf is loaded to display the work we've done for them. These external SWFs are loaded into an exmpty movie clip in the Preloader movie clip called "loader". In the timeline of the Preloader clip is all the code for the preloader actions and that's where the "loadMovie" and "loadMovieNum" actions are. I want to set a variable (content_path)for the URL that each button links to i.e. "/PORTFOLIO/PRINT/RKR/RKR.swf" (these files are all on my server and the site is being tested there); so for one button i would put;
    on (press){
    content_path="/PORTFOLIO/PRINT/RKR/RKR.swf"
    }

    for the next i would put:

    on (press){
    content_path="/PORTFOLIO/PRINT/GAC/GAC.swf"
    }

    I've gotten these to load correctly without using the variable but I'm not sure how to write it so that it loads correctly

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    So i understand that the 'content_path' variable is on the same timeline than the loadMovie() action. So, yes, a relative path to that same variable will work.
    loadMovie(content_path,loader);//loader being also on that same timeline.
    would be the script.
    and:
    content_path = "PORTFOLIO/PRINT/RKR/RKR.swf"
    that path (to the PORTFOLIO folder) has to be relative to the main html (the one that holds the main swf)
    You do not need the first slash.
    gparis

  5. #5
    Awesome!! Thanks a lot man--I think the only thing I was doing wrong was the 1st slash! Thanks!!

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