Load unique .FLV's into .SWF player

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • ericahlstrom
    Indigo Rose Customer
    • Jun 2004
    • 62

    Load unique .FLV's into .SWF player

    Here is the situation.

    (1) you have many .FLV's with many more to come in the future.
    (2) You create an .SWF wrapper for the (Flash Object) in AMS to see.
    (3) The .FLV plays in AMS great.
    (4) Now it's time to load another .FLV into the same .SWF wrapper.

    Question: How can I do this in AMS without having to create an unique .SWF for each and every new .FLV I create?
  • reteset
    Indigo Rose Customer
    • May 2006
    • 1692

    #2
    hope this heps a bit

    Flash :

    PHP Code:
    _root.AMS_command "";
    _root.FLVpath "";

    this.onEnterFrame = function()
    {
        if ( 
    _root.AMS_command eq "Load")
        {
            
    _root.AMS_command ""// clean for next time ,and block a endless loop
            
    _root.FLVpath "";
            
    player_mc.Load(FLVpath); // load flv movie with path
            
        
    }

    AMS :
    Code:
    Flash.SetFlashVariable("Flash1", "FLVpath", "C:\\MyMovie.flv");
    Flash.SetFlashVariable("Flash1", "AMS_command", "Load");
    amsplugins.com Is Closed.

    Facebook Page

    Comment

    • reteset
      Indigo Rose Customer
      • May 2006
      • 1692

      #3
      sorry it is too late to edit

      flash side needs a correction

      PHP Code:
      _root.AMS_command ""
      _root.FLVpath ""

      this.onEnterFrame = function() 

          if ( 
      _root.AMS_command eq "Load"
          { 
              
      player_mc.Load(FLVpath); // load flv movie with path 
              
      _root.AMS_command ""// clean for next time ,and block a endless loop 
              
      _root.FLVpath ""
              
               
          } 

      amsplugins.com Is Closed.

      Facebook Page

      Comment

      • ericahlstrom
        Indigo Rose Customer
        • Jun 2004
        • 62

        #4
        I really appreciate your help.

        Should I load PHP code into frame one of my Flash Doc?

        Also, is it loading the playing automatically or do I need to import a .flv into flash to create the player first as a template?

        Comment

        • reteset
          Indigo Rose Customer
          • May 2006
          • 1692

          #5
          i assumed you have fimiliarity with flash,

          1 : create a new flash project
          2: new project comes with an empty layer & frame
          3: put this code to frame's action pane

          Code:
          _root.AMS_command = "";  
          _root.FLVpath = "";  
          
          this.onEnterFrame = function()  
          {  
              if ( _root.AMS_command eq "Load")  
              {  
                  player_mc.Load(FLVpath); // load flv movie with path  
                  _root.AMS_command = ""; // clean for next time ,and block a endless loop  
                  _root.FLVpath = "";  
                   
                    
              }  
          }
          4: create a new layer and put a player component to this layer
          5: set properties of player compnent
          6: set player component's instance name as player_mc
          7: compile

          8: put autput swf into a folder in your AMS project
          9: move that swf to your AMS page
          10 : put a button on page surface
          11 : and put his code to button's On click Event with correct arguments

          Code:
          Flash.SetFlashVariable("Flash1", "FLVpath", "C:\\MyMovie.flv");
          Flash.SetFlashVariable("Flash1", "AMS_command", "Load");
          amsplugins.com Is Closed.

          Facebook Page

          Comment

          • ericahlstrom
            Indigo Rose Customer
            • Jun 2004
            • 62

            #6
            I followed your instructions but file isn't loading. I have attached both my ams file as well as my flash doc.

            If you have time and could check the files it would be most appreciated.
            Attached Files

            Comment

            • reteset
              Indigo Rose Customer
              • May 2006
              • 1692

              #7
              here is a working sample

              this is a Flash 8 project and Actionscript 2.0 used
              fla document is in Flash folder of AMS project

              you should set file path to yours (in button's on click event)
              Attached Files
              amsplugins.com Is Closed.

              Facebook Page

              Comment

              • ericahlstrom
                Indigo Rose Customer
                • Jun 2004
                • 62

                #8
                Thanks again for your time. It works and has helped a lot.

                Comment

                • aae991
                  Indigo Rose Customer
                  • Oct 2004
                  • 30

                  #9
                  Is there a way to get the flash component to go full screen when adding the wrapper in Flash? So far I have been unable to get the flash object in AMS 7.5 to go full screen (toggle).

                  Thanks.

                  Comment

                  • Michael
                    Forum Member
                    • Feb 2000
                    • 186

                    #10
                    Reteset,
                    longedge pointed me to your flv example and it works great. I now need to make a "pause" button in addition to the play button. AMS's flash commands don't work directly, so I'm thinking that the actionscript:

                    _root.AMS_command = "";
                    _root.FLVpath = "";
                    this.onEnterFrame = function ()
                    {
                    if (_root.AMS_command eq "Load")
                    {
                    player_mc.load(FLVpath);
                    player_mc.play();
                    _root.AMS_command = "";
                    _root.FLVpath = "";
                    }
                    };


                    needs an addition for that to work. Is it possible to add it? My knowledge of flash is limited, but would appreciate any help with this.
                    Thanks,
                    Michael

                    Comment

                    • reteset
                      Indigo Rose Customer
                      • May 2006
                      • 1692

                      #11
                      here is a more advanced one

                      FLVPlayer Example
                      amsplugins.com Is Closed.

                      Facebook Page

                      Comment

                      • Imagine Programming
                        Indigo Rose Customer
                        • Apr 2007
                        • 4252

                        #12
                        Originally posted by reteset View Post
                        here is a more advanced one

                        FLVPlayer Example
                        Aaah Flash 8, finally a fla i can open lol

                        It's hard to find old fla's these days
                        Bas Groothedde
                        Imagine Programming :: Blog

                        AMS8 Plugins
                        IMXLH Compiler

                        Comment

                        • reteset
                          Indigo Rose Customer
                          • May 2006
                          • 1692

                          #13
                          yes , i agree

                          Flash 8 is more stable , more easy , more clean and looks more professional than Adobe's **

                          i do not want to install an Operating system for make a flash movie

                          just my idea
                          amsplugins.com Is Closed.

                          Facebook Page

                          Comment

                          • Imagine Programming
                            Indigo Rose Customer
                            • Apr 2007
                            • 4252

                            #14
                            Originally posted by reteset View Post
                            yes , i agree

                            Flash 8 is more stable , more easy , more clean and looks more professional than Adobe's **

                            i do not want to install an Operating system for make a flash movie

                            just my idea
                            hehe i totally agree, at my college we had to install flash cs4 on our college laptops. But first we had to install more ram (on top of the 1,5 gb in it) before it would do anything...

                            So we stuck with Macromedia flash 8
                            Bas Groothedde
                            Imagine Programming :: Blog

                            AMS8 Plugins
                            IMXLH Compiler

                            Comment

                            • longedge
                              Indigo Rose Customer
                              • Aug 2003
                              • 2498

                              #15
                              Hah..... I struggle with Actionscript and have to make use of autocomplete (after you put the "." in) so I was a bit foxed as to how to get a pause. Typing "player_mc.pa" doesn't show "pause" as an option. I started thinking about getting the current position and then doing something like a gotandplay *but* player_mc.pause(); works I've said it before - I hate flash :lol

                              Thanks Reteset for the example :yes
                              Last edited by longedge; 03-14-2009, 12:00 PM.

                              Comment

                              Working...
                              X