A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: will an .swf stream outside of an HTML wrapper file?

  1. #1
    Senior Member ceglia's Avatar
    Join Date
    Jan 2003
    Location
    Los Angeles
    Posts
    262

    will an .swf stream outside of an HTML wrapper file?

    perhaps this is a stupid question, but is it possible to launch an SWF in a separate window WITHOUT using a HTML wrapper file and have the SWF stream?

    i don't mean embedding the SWF in a HTML wrapper file and then launching a new window calling that wrapper file. that will obviously work.

    but i've noticed that whenever i simply launch the SWF itself...

    example:
    onClick = "window.open('myMovie.swf','MyMovie','width=820,he ight=441,status,scrollbars=no,resizable=yes')"

    ...my SWF will only begin playing after it has been completely downloaded. the SWF even has a preloader built into it, so the first couple of frames are only 2k in size, but the preloader is rendered useless because the first frame won't even begin playing until all frames have been loaded. the user ends up staring at a blank screen.

    thanks.

  2. #2
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    What's the advantage of not putting the swf into a html page?

  3. #3
    Senior Member ceglia's Avatar
    Join Date
    Jan 2003
    Location
    Los Angeles
    Posts
    262
    the advantage is that my pixel fonts remain crisp. but i'm not sure whether this is a universal advantage that applies to all SWFs or whether this is only happening to my SWF.

    basically, if i set the HEIGHT and WIDTH settings of my SWF to "100%" in the HTML wrapper file (i'm doing this so that the movie will resize if the window is resized), the pixel fonts get blurry, even though all text is set at the right point size, is flush left, and is positioned on integer coordinates.

    oddly, my pixel fonts remain crisp if i make my SWF non-resizable, defining pixel dimensions consistent with those of my stage for the HEIGHT and WIDTH attributes.

    the thing is i need the movie to be resizable, and i've found that by launching the SWF itself, i'm not running into blurry font problems, and the movie can be resized. however, my movie doesn't stream, and on the whole, that's a much bigger problem.

    does that make any sense?

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Does that movie stream when embedded in an html? Or does it only play when fully downloaded, since you have a preloader?

    What's the preloading code? And what is the content of that movie?
    Components? Attached sounds or movie clips? Embedded fonts?

  5. #5
    Senior Member ceglia's Avatar
    Join Date
    Jan 2003
    Location
    Los Angeles
    Posts
    262
    hi oldnewbie,

    yes, the movie streams when embedded in a HTML file. however, because of the preloader, the main movie won't actually begin playing until it has been completely loaded. i know it's streaming because i can see the preloader animation (the first three frames of the main movie).

    when i launch the SWF itself, i never actually see the preloader, just a white screen, and a "downloading file" message in my browser status bar.

    the preloader code is set out below:

    FRAME 1:
    //hide some buttons that should only be visible after preloading is done
    mainMenu.bienvenida._visible = 0;
    mainMenu.itinerarios._visible = 0;
    mainMenu.informacion._visible = 0;
    mainMenu.contacto._visible = 0;

    FRAME 2 (loadFrame):
    loadedbytes = getBytesLoaded();
    totalbytes = getBytesTotal();
    if (loadedbytes == totalbytes) {
    //show the buttons
    mainMenu.bienvenida._visible = 1;
    mainMenu.itinerarios._visible = 1;
    mainMenu.informacion._visible = 1;
    mainMenu.contacto._visible = 1;
    //play rest of movie
    gotoAndPlay("homeFrame");
    } else {
    frame = int(loadedbytes/(totalbytes/100));
    tellTarget (this.loader) {
    gotoAndStop(this.frame);
    }
    }

    FRAME 3:
    gotoAndPlay("loadFrame");

    FRAME 4 is "homeFrame".

    the content of the movie is a web site. no components were used or movie clips attached. one 3k sound is attached. i'm using two pixel fonts. one is used in a dynamic text field for the preloader, and "embed all characters" is checked. the other is used in the movie in static text fields. i didn't manually embed this second font, but i didn't think it was necessary to do so for static text. am i wrong?

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