A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Help with loading seperate movies

  1. #1
    Junior Member
    Join Date
    Jun 2001
    Posts
    28

    Help with loading seperate movies

    I have one movie with graphics and i want to load the audio using a seperate movie file.

    But when i use load (audio movie )at level 1 the initial movie plays before the audio movie is loaded

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    That is probably because level 1 is still loading while level 0 is playing. You need a more sophisticated setup. I will defer to Johnie on this.

  3. #3
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    The best way to solve this problem is to use "audio streaming" (not "audio movie").

  4. #4
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    I agree that streaming it would probably be easier...

    If you have to have it loaded you would want to build a Preloader for the Audio Level.


    A Basic preloader is going to compare Frames or Bytes Loaded with the Total Frames or Bytes.

    You use the _Level#.getBytesLoaded() and _Level#.getBytesTotal() or _Level#._framesloaded and _Level#._framestotal

    An Example.

    You Create 3 Frames after you use your LoadMovie into Level 1 Action and Label The First one loading and the third One Start.



    On the Second Frame you attach this script;

    loaded=_level1._framesloaded;
    total=_level1._framestotal;

    if(loaded==total)
    {
    gotoandplay("Start");
    }
    else
    {
    gotoandplay("loading")
    }


    You can swap out framesloaded and framestotal with _level1.GetBytesLoaded() and _level1.GetBytesTotal() if you so desire.


    Likewise to Debug you can create two text boxes and Call them Total and Loaded.

  5. #5
    Junior Member
    Join Date
    Jun 2001
    Posts
    28

    Re

    Thanks guys

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