A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Problem with external swf loading

  1. #1
    Junior Member
    Join Date
    Jul 2010
    Posts
    11

    Problem with external swf loading

    Hi there.

    I have a main.swf file.

    In first frame i load a background slideshow with this code:

    var loader:MovieClipLoader = new MovieClipLoader();

    this.createEmptyMovieClip("myGalleryContainer",1);

    myGalleryContainer._lockroot=true;

    loader.loadClip("slideshow.swf",myGalleryContainer );

    myGalleryContainer._y =3;

    myGalleryContainer._x =2;

    myGalleryContainer.swapDepths(myMenu);


    In the same frame (1st) in different layer, i load 3 .swf files for language selection with this code:

    var loader:MovieClipLoader = new MovieClipLoader();

    this.createEmptyMovieClip("myGalleryContainerlang" ,5);

    this.createEmptyMovieClip("myGalleryContainerlang2 ",6);

    this.createEmptyMovieClip("myGalleryContainerlang3 ",7);

    myGalleryContainerlang._lockroot=true;

    myGalleryContainerlang2._lockroot=true;

    myGalleryContainerlang3._lockroot=true;

    loader.loadClip("clock-athens.swf",myGalleryContainerlang);

    loader.loadClip("clock-london.swf",myGalleryContainerlang2);

    loader.loadClip("clock-roma.swf",myGalleryContainerlang3);

    myGalleryContainerlang._y =0;

    myGalleryContainerlang._x =450;

    myGalleryContainerlang2._y =0;

    myGalleryContainerlang2._x =543;

    myGalleryContainerlang3._y =0;

    myGalleryContainerlang3._x =630;




    In the second frame, i load a .swf file which loads external xml html content page (483 kB) with this code:

    var loader:MovieClipLoader = new MovieClipLoader();

    this.createEmptyMovieClip("myGalleryContainerhtmlt ext",2);

    myGalleryContainerhtmltext._lockroot=true;

    loader.loadClip("html_content_page-el.swf",myGalleryContainerhtmltext);

    myGalleryContainerhtmltext._y =30;

    myGalleryContainerhtmltext._x =2;


    In 3rd frame, i load another external xml html content page with this code:

    var loader:MovieClipLoader = new MovieClipLoader();

    this.createEmptyMovieClip("myGalleryContainerhtmlc ontact",2);

    myGalleryContainerhtmlcontact._lockroot=true;

    loader.loadClip("html_contact_page-el.swf",myGalleryContainerhtmlcontact);

    myGalleryContainerhtmlcontact._y =30;

    myGalleryContainerhtmlcontact._x =2;


    I want the gallery to play on the background all the time.

    My problem is that when the site loads the 1st time and click from the menu to go to the 2nd frame (1st content page) then i have to wait at about 3-4 seconds to load my html content. The same for the 3rd frame.

    If these two content pages load for the 1st time, then the pages open immediately. What can i do for this?

    Is there a way to open this content pages more quickly, or place a loader, and with what code?

    Thank you in advance

  2. #2
    Junior Member
    Join Date
    Jul 2010
    Posts
    11
    I just noticed that in .fla i use a mc_embed_font movieclip which contains 4 fonts that i want to use in xml loaded text. If i delete this movieclip i get a .swf file of about 120 kB but if i leave this movieclip in .fla then the .swf file is about 450 kB!

    How can i solve this problem?

  3. #3
    Member
    Join Date
    Sep 2010
    Posts
    73
    lot of code to loadmovie.

    why not make the movieclip in the flash as a 10 by 10 square and then give it a instant name

    _level0.instantname.loadMovie("some.swf",4);

    Then use the layers to have clip one at the bottom clip two in the mid and clip three as the top..

    Then you have a 3D Timeline For ever!

    _level0.instanstname1.instanstname2.loadMovie("som e.swf",4); then you have a 4th dimension deep layering

    its very simple, also you can use cross domain.xml to upload to your site, and work from any where.
    WiiStream A Social Movie Network Version 0.1.1 Demo Testers Aproved http://wiistream.net/WiiStream.exe

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