Preloading Next Scene?

Hello, I'm making a sort of flash comic. In order for most
users to be able to view it without delay or poor rendering, I want
each scene to be pre-loaded before it can be viewed.
So, in order to do this, I want to preload the next scene as
soon as the current scene is entered by the user. And once the next
scene is fully loaded, I want two buttons to show up: a button to
replay the current scene but not preload the next one again, and a
button to continue to the next scene.
Anybody have any suggestions on how to do this? Thanks!
BTW, I have Flash CS3 Professional.

Heheh, sorry, I'm a total newb to actionscripting, so I don't
quite understand what you're saying.
What is the main timeline? Is that like the total number of
frames in the movie? How can I automatically check the number of
frames in the next scene? How can I automatically check the number
of frames in the next scene, and how do I make the two buttons
present on the stage?

Similar Messages

  • GotoAndPlay next scene when reach the "end" cue point

    Hi, I have a flv with actionscript cue point "welcome_end".
    It's will be progressive download from web server. It has a
    component name "flv_welcome" on stage. What I want to do is after
    the flv play reach to its end, the flash movie will go to and play
    next scene.
    Any help will be greatly appreciated.

    See FLVPlayback.cuePoint in the help files.

  • Using Cue Points to advance to next scene

    I'm pretty new to AS3. I'm a designer trying to do it myself.
    What I'm trying to do is use a cue point at the end of my FLV (which is loaded using ui loader in my flvSWF) to go to the next scene in my mainSWF file.
    here's the code I'm using in my flvSWF:
    import fl.video.VideoEvent;
    import fl.video.MetadataEvent;
    IntroMovie.addEventListener(MetadataEvent.CUE_POINT, cp_listener); 
    function cp_listener(eventObject:MetadataEvent):void { 
    trace("Elapsed time in seconds: " + IntroMovie.playheadTime); 
    trace("Cue point name is: " + eventObject.info.name); 
    trace("Cue point type is: " + eventObject.info.type); 
    if (eventObject.info.name == "CueNextScene") {
    this.gotoAndPlay("desk");
    But of course it does not work. 
    A.  my traces don't show up. 
    B. Am I suppose to use this code in my mainSWF instead of the flvSWF
    C. An FYI  the IntroMovie is one of 4 random movies that gets played for the intro in mainSWF. The random script works fine.

    You can build out a menu by reading the cuePoints array in
    the NetStream.onMetadata handler, or by using the MetadataEvent
    with the FLVPlayback component (AS3). The simple thing for me to
    say is to refer to Chapter 9 of my new Flash Video book. :) (see
    link in my signature below.)

  • Use variable in next scene

    Hi,
    I'm trying to use a variable captured in one scene, in the next scene of the game I'm making.
    Here is the code I use to set the variable
    var player;
    player = inputbox.text;
    On the next scene, I used trace(player) to test the output. Instead of outputting the name entered in the previous frame, it instead output "undefined"
    I'm using a custom .as file which is shown below
    package  {
    import flash.display.MovieClip;
    import flash.events.MouseEvent
    public class PlayerName extends MovieClip {
    public static var player
    public function PlayerName() {
    I don't really know ActionScript, and have been using things I have found on the internet. Any help would be appreciated.

    By a stoke of luck I managed to get this working, without having to remove the scenes.
    Instead of
    var player;
    player = inputbox.text;
    and trace(player)
    I had to use
    var player;
    PlayerName.player = inputbox.text;
    and trace(PlayerName.player)
    as I had set it as a local variable.

  • How do I continually loop frames with a 20 second pause in each frame from the same scene without going to the next scene?

    How do I continually loop frames with a 20 second pause in each frame from the same scene without going to the next scene? There are buttons for the other scenes in these frames. The below works well until I am at the last frame in scene one, then it goes to the next scene and plays. How can I make scene one a continually loop.
    stop();
    var timer:Timer = new Timer(20000,0);//<--
    timer.addEventListener(TimerEvent.TIMER, timerHandler);
    timer.start();
    function timerHandler(event:TimerEvent):void {
        this.nextFrame();
        //or if you want to jump e.g 5 frames
        this.gotoAndStop(this.currentFrame+5);
    Thank you for any help.

    For this code to work, you need to empty the first frame and place all the photos a frame ahead. Then, place this code on the first frame. DONE!
    If you need more help, I'll try to answer it the fastest I can.
    Oh, and I could actualy make your photos fade out and fade in as they rotate from frame to frame, it would be awesome. Just tell me if you want me to do it. Good luck
    import flash.display.Scene;
    import flash.events.TimerEvent;
    stop();
    var timer:Timer = new Timer(2000,0);
    timer.addEventListener(TimerEvent.TIMER, timerHandler);
    timer.start();
    function timerHandler(event:TimerEvent):void {
    if (this.currentScene.name == "Scene 1") {
      if (this.currentFrame != this.currentScene.numFrames) {
       this.nextFrame();
      } else {
       this.gotoAndStop(2);
    nextFrame();

  • I need help with button coding to go to the next scene

    Hi! I have been using flash cs5 for a few years now and I've never been great with coding since i usually just do swf animations. However I am in the process of writing a story/book and I wanted to make a little guide for all of the dragons species in the story.
    Example: I had it so there is a title screen and a start button, you click the start button and you are taken to the next scene; which is a picture of a mist dragon I drew and then audio plays; describing mist dragons. in the corner there is a "next" button and when you click it, it takes you to the next species and the audio plays just like with the mist dragon.
    my major problem is my code is muffed up( I know it is totally incomplete, but this code is what I am comfortable working with, anybody know whaat the full code is?). I typed in what I could remember from class... could anybody help me?
    here is the code i remembered:
    Stop();
    btn1.addEventListener(MouseEvent.CLICK…
    function btn1Listener(e:MouseEvent):void {
    gotoAndStop(1, "mist dragon");

    use:
    Stop();
    btn1.addEventListener(MouseEvent.CLICK,btn1Listener);
    function btn1Listener(e:MouseEvent):void {
    gotoAndStop(1, "mist dragon"); //<- you may want gotoAndPlay(1,"mist dragon")

  • HT1657 I have rented a movie from Itunes, but when I try to watch it it pauses itself, then skips to the next scene...can anyone tell me why and as I have paid money for this shouldn't I at least be able to watch without any hiccups?

    I have rented a movie from Itunes, but when I try to watch it it pauses itself, then skips to the next scene...can anyone tell me why and as I have paid money for this shouldn't I at least be able to watch without any hiccups?

    You've tried restarting the film ? If it still skips then try the 'report a problem' link from your purchase history : log into your account on your computer's iTunes via Store > View My Account and you should then see a Purchase History section with a 'see all' link to the right of it ; click on that and you should see a list of your purchases ; find that film and use the 'Report a Problem' link and fill in details about the problem (iTunes support should reply within, I think, 24 to 48 hours).
    Some people have had a problem with the 'report a problem' link (it's been taking people to this site on a browser instead of showing a form in iTunes) - if it does that to you then try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page.

  • (Click and move to next scene).  Need help with a simple action, just need a little guidance.

    I am building a simple flash movie clip in Flash cs4. All I want to do is run the play head through a one 5 frame scene and stop, and then you press a button that will send the play head to the next 10 frame motion tween scene.
    When I run the movie all I get is a movie clip that pauses for a millisecond then loops back around.
    I have three different books on flash action script, read all three still not doing so hot. I am using the navigational button concept maybe that is what I am doing wrong. Can someone show me the right method or lead me in the right direction.
    farosgfx ( [email protected] )

    You can just place an invisible button on the top layer of
    the flash time line and code it to getURL. When you said "hyperlink
    to another page", are you referring to an html page or another swf
    file? To make an invisible button in Flash, you can hit Ctrl+F8 to
    bring up the dialog box to create a new symbol, name your button,
    make sure you select the type of button, hit ok, now you are inside
    the button and need to create a "hit" area. Click on the "hit"
    state and press F7 to create a blank key frame. Using the drawing
    tools, select the square, no stroke, and any fill color you want,
    draw a square shape, click on the shape and in your Info Panel,
    change the size of this shape to match the size of your stage,
    lastly, make sure the registration point is (0,0) by using the
    Align Panel. Go back to your main time line, add a layer on your
    time line and make sure it's at the top, drag your new button from
    the library to the stage and align it to (0,0).
    There are two ways to code the button, so to make it easier,
    click on the button once to select it, hit F9 to bring up the
    actions panel and type this
    on(release){
    getURL("
    http://www.someWebsite.com",
    "_blank");// you can also use "_self" //
    If some of this isn't new to you, disregard parts of it. If
    you have any buttons in your Flash application, this will cause
    problems because the invisible button will counter-act anything
    below it. Let me know if this works for you. Of course, this all
    assumes you have access to the flash file.

  • Move to next scene

    I have a scene and I want it to move to scene two when the enter key is pressed.
    Anyone know how I can do that?
    Thanks

    You may want to pursue something else for changing scenes.  Using the Enter key can be somewhat of an issue as compared to other keys.  Generally, in order for it to work you need to click the stage or textfield that the listener is assigned to give that object focus before use of the Enter key will register.  In any case, here is some code that will work under the right conditions...
    stage.addEventListener(KeyboardEvent.KEY_UP, doStuff);
    function doStuff(evt:KeyboardEvent):void {
        if(evt.keyCode == Keyboard.ENTER){
            gotoAndStop(1, "Scene 2");

  • Seamless transition to next scene

    Hello! I'm fairly new to Flash CS4. I took an introductory course and I'm working on my first project for my organization. It's basically an animated slideshow with music. It would be a lot easier to break it down into scenes that doing it all in one timeline, however, transitioning between scenes seems to fade a little. Is it possible to make the transition between scenes seamless? I am not using actionscript because it is not going to be interactive. I'm putting it on DVDs.
    Thanks!!

    Hello! I'm fairly new to Flash CS4. I took an introductory course and I'm working on my first project for my organization. It's basically an animated slideshow with music. It would be a lot easier to break it down into scenes that doing it all in one timeline, however, transitioning between scenes seems to fade a little. Is it possible to make the transition between scenes seamless? I am not using actionscript because it is not going to be interactive. I'm putting it on DVDs.
    Thanks!!

  • Preloader loads and loops my scene! (I am desperate...)

    I am using flash cs3.
    I created my preloader in a separate scene. calling the scene I want.
    what I wanted was the preloader to load and play the all next scene, where I have my core website running.
    it works fine till one point! here is my drama!
    it loads the scene I want, but it gets stuck in a loop.
    function preLoader():Void {
    bTotal = getBytesTotal();
    bLoaded = getBytesLoaded();
    pLoaded = Math.round((bLoaded/bTotal)*100);
    pNoRound = (bLoaded/bTotal)*100;
    var newxpos = pNoRound*2.5;
    mc_loading.g_loading.mc_loader.loader_mask._x = mc_loading.g_loading.mc_loader.loader_mask._x + (newxpos - mc_loading.g_loading.mc_loader.loader_mask._x)*.2;
    if(pLoaded<10) {
    pLoaded = "0"+pLoaded
        mc_loading.g_loading.mc_loadText.loadText.text = pLoaded;
       gotoAndPlay("Scene1,  1"); //this loads the scene but messes it up looping de menu
       _root.gotoAndPlay("start, 1") //even creating a label in my scene for my loader to find, nothing happens. it doesnt even load
    please anyone help me!
    thanks cristina

    Scenes are unreliable. Try this much more stable method of preloading:
    http://www.gotoandlearn.com/play?id=85

  • Preload scene

    How do I preload a scene and not an entire movie, My movie
    have multiple scenes and my preloader is taking too long. is there
    a way to preload one scene at a time instead of the whole movie.
    this is the code I am using now. thankyou

    if you know the number of frames in your scene (and you
    should), you can use your _root._framesloaded property for your
    preloader and start playing when your scene is loaded.

  • Adding a Preloader

    Hello,
    I am sort of doing this backwards...I just finished a small site in Flash, but I've realized I probably should have a preloader before it begins. Is it too late to add this? Is there a way of having a preloader in a separate file and when it's finished it loads the actual? If not, how can I move every frame aside?
    Any help would be appreciated - I hope it's not too late to add one in!!
    Katie

    Hi Katie,
    Like ol' Granny used to say in the 1860s: "It's never too late to add a preloader, son!".
    OK, enough with the jokes...
    You can add a preloader after you're done with the site (like I do, sometimes), by simply adding a scene to your project; In the preloader scene you tell Flash to go to the next scene (website) using AS.
    Done.
    Hope this helps...
    JC

  • UI Loader Component causing delay in preloader

    Hi All-
    I would really appreciate if you could help me with this
    issue.
    I have a preloader in the first scene. In the next scene is
    my main movie, in which I have a UI Loader Component. I've
    unchecked "export in first frame" in the linkage options for the UI
    loader, but "export for Action Script" is still checked.
    The problem is, when I do a "simulate download" my preloader
    will not show on screen until it's about 15% loaded already. I'm
    assuming this is because the "export for Action Script" for the UI
    loader is still on, but the loader obviously won't work without
    that option checked...
    Is there any way to fix this??
    I'm still new to Flash so please bear with me...

    Thnx for the response Ned, I did do that. First inside of flash with control>test movie. The file worked so I brought onto the DW page and tested in Firefox. Didnt work.

  • Loading frames before images (preloader question)

    I've got an .swf of which is 83% images and weighs ~4mb.
    For that big size I decided I would do an preloader, however, the preloader's frame will only load after images and other resources are loaded.
    Basically, the preloader will only appear after 83% of that .swf is loaded, which leaves the white screen for a big time, and only then displays the preloader.
    In even simpler words, I want to set the loading priority of something(a resource? a scene? a frame?), or, load only a single frame and then let that frame load the rest.
    Please point out if you didn't understand what I mean.

    No, I'm using Flash CS5.5. Maybe it was fault of my interpretation.
    I'm currently editing a .fla file, not an .swf. This .fla file has two scenes, whose the first is used for the preloader, which will skip to the next scene when the movie is loaded.
    If that is revelant, here is the code of the preloader:
    var total:Number;
    var loaded:Number;
    this.onEnterFrame = function()
    total = _root.getBytesTotal();
    loaded = _root.getBytesLoaded();
    if(loaded >= total){
    delete(onEnterFrame);
    nextScene();
    _root.ppl = (Math.floor((loaded/total)*100)).toString() + "%";
    stop();
    "ppl" is the variable which holds the contents of an dynamic text which shows the percentage.

Maybe you are looking for