dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: loadMovie problem with site structure

  1. #1

    loadMovie problem with site structure

    Hi there

    I have searched and searched and not found a definitive answer to my problem. I have found lots of interesting info which i either don't understand or have tried and it has not worked.

    [working on a mac/ie5/fmx at the mo - but might change to work on a pc]

    i'm creating a portfolio site in flash MX and have created a main flash file 'em2003' [embedded into an html page 'em2003.html'] that contains the main navigation and when clicking on certain buttons within this flash file, external swf files will be loading into a blank holder mc [called 'img_holder'].

    the problem i am having is to do with the site structure. I want all my external swf files to sit within separate folders within my site structure.

    when the external files sit withing the same folder as the main flash movie, when using:

    Code:
    on (release) {
    	_root.img_holder.loadMovie("f_int01.swf");
    }
    the external file 'f_int01.swf' loads fine into the 'img_holder'.

    when i then put my external swf file elsewhere in the site structure, i can't get it to load with relative or absolute paths. eg

    Code:
    on (release) {
    	_root.img_holder.loadMovie("flash/interactive/f_int01.swf");
    }
    doesn't load the swf file and neither does :

    Code:
    on (release) {
    _root.img_holder.loadMovie("http://www.eskymo.co.uk/em2003/flash/interactive/f_int01.swf");
    }

    i've read about something to do with 'System.security.allowDomain' - don't know whether i have to use this. don't know if this is a problem because i'm using a mac/ie5. or whether i'm being a complete numpty and my syntax is completely wrong.

    please help it's driving me insane.

    thanks

    e

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Seems strange that the absolute url does not work.
    Links made in Flash are relative to the html documents location and not the Flash file.
    I cant see anything wrong with your code either.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  3. #3
    well someone has just advised me to write it like this instead :

    on (release) {
    loadMovie("flash/interactive/f_int01.swf", "_root.img_holder.");
    }

    and guess what - it works - even though this does the same as what my script does.

    i feel like i've wasted an entire w/e trying to figure this out when i could have just writen my syntax slightly differently.

    please explain....

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