A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: how is this done?

  1. #1
    Senior Member
    Join Date
    Oct 2002
    Posts
    412

    how is this done?

    Hi,

    I am hoping that someone out there might be able to answer this question for me.

    If you take a look at this site and go to the work section and then choose a tv ad. How is the movie loading and still able to play - can this be done using the tellTarget load movie action.

    Any ideas on how it has been done please?!

    Diggz

  2. #2
    Unknowable Donkey of Spong Crash Raindog's Avatar
    Join Date
    Oct 2002
    Posts
    148
    Must be streaming it, bit like media players can. I think it's an option on the load method, set it to true and it will play while it streams. Though that's just an educated guess.

  3. #3
    Senior Member
    Join Date
    Feb 2001
    Location
    San Angelo, TX
    Posts
    120
    the preloader is set to load so much percentage of the movie before it starts playing, and the rest will stream in...

    something like

    frame 1 of 3 frame preloader
    Code:
    (BLANK)
    frame 2 of 3 frame preloader
    Code:
    if (_root.getBytesLoaded() < (_root.getBytesTotal()/2)) {
    	gotoAndPlay(1);
    }
    where (_root.getBytesTotal()/2) is half of the total size of the movie

    frame 3 of 3 frame preloader
    Code:
    gotoAndPlay("Intro", 1);
    this help? - cheers
    Just think... I'm only 2 people short of a threesome

  4. #4
    Senior Member
    Join Date
    Oct 2002
    Posts
    412
    So if I were to set up my movie and have three blank keyframes at the very beginning with that code on it should work?

    Do i need any other code? and where you have said

    "where (_root.getBytesTotal()/2) is half of the total size of the movie"

    if my movie where 300kb would I put 150?

  5. #5
    Senior Member
    Join Date
    Feb 2001
    Location
    San Angelo, TX
    Posts
    120
    here's a simple preloader for you that I've made for people having trouble getting started.. tweak the graphics symbols to your liking, but don't change the code unless you know what you're doing.. this way, you can see how it works.. if you want to preload half of the movie, then:

    frame 2 of 3 frame preloader

    Code:
    if (_root.getBytesLoaded() < (_root.getBytesTotal()/2)) {
    	gotoAndPlay(1);
    }
    the thing that makes it half is

    (_root.getBytesTotal()/2)

    if it were 3, it would be 1/3rd of the movie that preloaded, if it were 4, it would be 1/4th the movie that preloaded... etc.. if you wanted to preload the whole movie, it would just be:

    Code:
    if (_root.getBytesLoaded() != _root.getBytesTotal()) {
    	gotoAndPlay(1);}
    because the division is removed and the condition is changed from "if loaded is less than total" to "if loaded is not equal to total"

    to get the preloader into your movie, you can create a new scene and put it at the front, then select all the frames in the preloader .FLA timeline, use "copy frames", and use "paste frames" to paste them into the EMPTY scene (you do NOT have to create the new layers before you paste)

    hope this helps you understand a bit better if you need help, ask - cheers
    Attached Files Attached Files
    Just think... I'm only 2 people short of a threesome

  6. #6
    Senior Member
    Join Date
    Feb 2001
    Location
    San Angelo, TX
    Posts
    120
    bah, I just realized EXACTLY what you're talking about... i thought you meant the site... anyway, same concept.. just don't put up the preloader graphics.. use 3 frames with actions... the movie is probably being loaded from an external SWF, so keep that in mind... the preload actionscripting will be in the external swf, not the main swf... um... that's all I'm saying for now... goodnight
    Just think... I'm only 2 people short of a threesome

  7. #7
    Senior Member
    Join Date
    Oct 2002
    Posts
    412
    Thanks for that - but I can't open the fla! is it 2004 or just mx? I am using mx.

  8. #8
    Senior Member
    Join Date
    Oct 2002
    Posts
    412
    ...don't s'pose anyone else has a preloader source file that would do the job?
    ...please!

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