Play Flash movie then exit?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • EtherGnat
    Forum Member
    • Jul 2003
    • 4

    Play Flash movie then exit?

    I want to play a Flash movie introduction while a web page loads in AMS4.

    I thought I had it figured out with Application.Sleep and then a Page.HideObject but the entire application exited when I tried that. I was able to successfully put the Flash object on another page and do a Page.Jump to my web page but that kind of kills the point because the web page does not begin to load until the Page.Jump.

    I don't have access to the original Flash file so modifications to that would be difficult and or impossible.

    Is there some way to do what I want to do?
  • eric_darling
    Indigo Rose Customer
    • Jun 2002
    • 1801

    #2
    Re: Play Flash movie then exit?

    You could build two (actually three) separate projects - the first one plays the Flash file, and the second contains the browser object.

    Have the Flash file contain an FScommand at the end, and then use the On FSCommand handler to introduce an Application.Exit command.

    So the third project would just be a project loading app that would file.execute your others and then exit. The order of the load here would be what determined what would play on top - flash project or web browser project - dictated by which one runs first.

    Maybe I'm missing something more simple, though...
    Eric Darling
    eThree Media
    http://www.ethreemedia.com

    Comment

    • EtherGnat
      Forum Member
      • Jul 2003
      • 4

      #3
      Re: Play Flash movie then exit?

      One more thing...I have multiple pages in my product, one of them being a web page. If you click to another page and then return to the web page the web page reloads. Is there a way to make the web page persistent?

      It wouldn't be a big deal but the web page is a java application which takes about a minute to load on a modem connection and it's an online game so the player loses there game if they want to go to another page (say instructions) and then come back.

      Comment

      • Corey
        Indigo Rose Staff Alumni
        • Aug 2002
        • 9741

        #4
        Re: Play Flash movie then exit?

        It sounds like you might need a better design strategy. It's easy enough to trigger actions with Flash using an fscommand on the last frame but if it's not your flash then you'll have to build a placeholder movie which contains an fscommand on the last frame and then load your .swf into that placeholder (or a _level) dynamically using actionscript.

        As to the Java page, it's not good practice to have several objects running independently on the same page as it will choke older systems, especially if you have a top heavy java app there, so you're probably going to have to keep that on it's own page, perhaps posting a warning would work, i.e. "exiting this page restarts game". Using Java applications will cause you to have performance issues from my experience, and they should be avoided if possible for best end results. On my machine for example no Java runs, it's turned off.

        Corey Milner
        Creative Director, Indigo Rose Software

        Comment

        • EtherGnat
          Forum Member
          • Jul 2003
          • 4

          #5
          Re: Play Flash movie then exit?

          Why does using the Page.HideObject command on a flash object exit the entire application though?

          Comment

          • Corey
            Indigo Rose Staff Alumni
            • Aug 2002
            • 9741

            #6
            Re: Play Flash movie then exit?

            It doesn't.

            Corey Milner
            Creative Director, Indigo Rose Software

            Comment

            • EtherGnat
              Forum Member
              • Jul 2003
              • 4

              #7
              Re: Play Flash movie then exit?

              OK, I figured out my problem. It wasn't with Page.HideObject it was with the Application.Sleep command. I was trying to apply the actions on the Flash object itself which is maybe a no-no. The Application.Sleep action applied to the Flash object would cause the entire application to exit at the end of the sleep time, which is what made me think it was the Page.HideObject action.

              I moved the Application.Sleep and Page.HideObject actions to the Page Properties "On Show". Everything works approximately the way I want it now using the Application.Sleep command rather than an fs.command in the flash file. Exact timing isn't important for my application. Still, locking the user out for 20 seconds could be a problem if they change their mind after loading the page. I'll rewrite it at some point I suppose.

              Thanks for the help.

              Comment

              • Corey
                Indigo Rose Staff Alumni
                • Aug 2002
                • 9741

                #8
                Re: Play Flash movie then exit?

                Like I say, I think you might do better with an improved general strategy but as long as you're happy then great...

                You need to bear in mind that Flash plays back slower on older systems and faster on new systems so using an application sleep action will be a very inaccurate method in this case, i.e. your flash will cut out early, i.e. mid-movie for users on older systems. Application sleep was intended to allow for instances where an object needs to catch up with your AMS app, i.e. Flash (because the Flash object was slower than AMS) and is not reccomended for long pauses as it disables the GUI...

                Corey Milner
                Creative Director, Indigo Rose Software

                Comment

                Working...
                X