Results 1 to 6 of 6

Thread: gallery is not loading in main.swf help please

  1. #1
    Join Date
    Jan 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default gallery is not loading in main.swf help please

    Hi all,

    I am doing for a project to creating a gallery with thumbnails and dynamically loading the images and thimbnails via xml. I got it to work the way I want and exported this file as "gallery.swf"


    When I click the link to load gallery.swf from the main swf using:

    loadMovie("gallery.swf",this);

    it doesn't display the thumbnails, images or the dynamic text but it does display the Flash buttons and roll overs.

    However, when I open gallery.swfit plays perfectly, thumbnails scroll left and right image .

    here index.html is used to display main.swf which is in /flash/main.swf.
    the gallery.swf is also in /flash/gallery.swf only
    the thumbs and pic and XML also in /flash/

    i am using flash mx 2004

    I've been stuck on this for 2 days now , Does anyone know what the problem is?

    Thank you.

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    The context for loadMovie(); is one of the easiest to use, but as such it is also one of the easiest to mess up.

    You are using loadMovie(); to load gallery.swf into main.swf on a button click.

    gallery.swf is loading an XML, some images and thumbnails.

    the XML, the thumbnails, the images, gallery.swf and main.swf all need to be in the exact same directory.

    Once in there everything should work out fine as long as loadMovie is set up correctly.

    First you should have a spot inside main.swf for gallery.swf to load. An empty movieclip is perfect. To make an empty movieClip >> Make sure NOTHING on your stage is selected. choose "Insert" then choose "New Symbol" give the new symbol a name of "empty", then check the "Advanced" button. Then check the box next to "Linkage: [] Export For ActionScript"

    Click "Okay" now you are in edit mode of the new movie clip. Click back to your main scene without doing ANYTHING to the new movie clip.

    From your library drag the emptyMC to the stage where ever you want gallery.swf to load. Then give it an instance name of "empty"

    Once all that is done, click on your button you are using to load gallery.swf and in the actions panel put this:

    Code:
    on(release){
        _root.empty.loadMovie("gallery.swf");
    }
    That's it. Upload everything and test it out
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Feb 2008
    Location
    Arizona
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by BLiZZaRD View Post
    The context for loadMovie(); is one of the easiest to use, but as such it is also one of the easiest to mess up.

    You are using loadMovie(); to load gallery.swf into main.swf on a button click.

    gallery.swf is loading an XML, some images and thumbnails.

    the XML, the thumbnails, the images, gallery.swf and main.swf all need to be in the exact same directory.

    Once in there everything should work out fine as long as loadMovie is set up correctly.

    First you should have a spot inside main.swf for gallery.swf to load. An empty movieclip is perfect. To make an empty movieClip >> Make sure NOTHING on your stage is selected. choose "Insert" then choose "New Symbol" give the new symbol a name of "empty", then check the "Advanced" button. Then check the box next to "Linkage: [] Export For ActionScript"

    Click "Okay" now you are in edit mode of the new movie clip. Click back to your main scene without doing ANYTHING to the new movie clip.

    From your library drag the emptyMC to the stage where ever you want gallery.swf to load. Then give it an instance name of "empty"

    Once all that is done, click on your button you are using to load gallery.swf and in the actions panel put this:

    Code:
    on(release){
        _root.empty.loadMovie("gallery.swf");
    }
    That's it. Upload everything and test it out

    Hey.
    Found this thread really useful and was wondering if you could help?

    I have a similar problem, where I am basically trying to get a button, when on release or on click, to open another swf file in the same window.

    I tried your method shown in this thread, and it opened the swf file in the same window but along with the original swf file. I just basically want this to happen in a blank one, but in the same window.
    I've tried other solutions and this is the only one that has worked for me so far!

  4. #4
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Well, the loadMovie method is used to import external media (.swf, images, etc..) into the current flash movie. It doesn't complete replace it.

    If you want it(mov2) to totally replace the original movie (mov1), you would need to create a third .swf (mov3) which holds both.

    The flow works like this:

    mov3 loads mov1
    you click a button in mov1 to load mov2
    after mov2 is done loading, you remove mov1

    all of this can be done with the MovieClipLoader class (http://livedocs.adobe.com/flash/8/ma...=00002538.html).

    More specifically loadClip() and unloadClip()

  5. #5
    Join Date
    Feb 2008
    Location
    Arizona
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Medyman View Post
    Well, the loadMovie method is used to import external media (.swf, images, etc..) into the current flash movie. It doesn't complete replace it.

    If you want it(mov2) to totally replace the original movie (mov1), you would need to create a third .swf (mov3) which holds both.

    The flow works like this:

    mov3 loads mov1
    you click a button in mov1 to load mov2
    after mov2 is done loading, you remove mov1

    all of this can be done with the MovieClipLoader class (http://livedocs.adobe.com/flash/8/ma...=00002538.html).

    More specifically loadClip() and unloadClip()
    Thanks for that,
    however that really baffled me

    Basically, I have an introductory flash video with a button, which I want to then open a Menu on click or on release.
    On the menu, I'll then have a number of other flash links etc...

  6. #6
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Have a look at this, http://www.gotoandlearn.com/player.php?id=27

    It's a tutorial on preloading external SWF files when bringing them into a container. I think it might be useful.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •