5 Replies Latest reply on Jul 4, 2006 9:20 AM by Newsgroup_User

    Still got a big problem

      First, please check out my site...this will be easier to explain once you see it....

      http://www.ekorastudios.com/index2.html

      Navigate yourself to "Portfolio" and then to "Video"
      I can't get any of my flv files to play, and I'm guess it's because when you click on the thumbnail of a particualr video you want to watch, it pops up a new window with just a swf file in it that plays the flv file. I've been told not to do this (I should use html to embed the swf), but I did it out of necessity.

      Here's my wish, please let me know if you can help me figure out how to do this...
      I'd like to make one swf file with a keyframe for each movie clip to show. I'd like to code the buttons to open up that one swf file and tell it to go to a specific frame. That way, everything is in one swf file (not the actual flv files of course, I use the flv player to call them in) instead of 60 different swf files and 60 different html files.

      Please help!!! Thanks,
      B


        • 1. Re: Still got a big problem
          Level 7
          Why do you need the external swfs or separate MCs? Do they have unique
          imported static assets that are related to each FLV?

          If not then just use the contentPath property for the FLVPlayback and a
          single FLVPlayback component and use AS to change the that value. Use an
          array to hold the various FLV file names and the buttons to make the switch.



          --
          Lon Hosford
          www.lonhosford.com
          Flash, Actionscript and Flash Media Server examples:
          http://flashexamples.hosfordusa.com
          May many happy bits flow your way!
          "ekora" <webforumsuser@macromedia.com> wrote in message
          news:e8260i$e95$1@forums.macromedia.com...
          > First, please check out my site...this will be easier to explain once you
          > see
          > it....
          >
          > http://www.ekorastudios.com/index2.html
          >
          > Navigate yourself to "Portfolio" and then to "Video"
          > I can't get any of my flv files to play, and I'm guess it's because when
          > you
          > click on the thumbnail of a particualr video you want to watch, it pops up
          > a
          > new window with just a swf file in it that plays the flv file. I've been
          > told
          > not to do this (I should use html to embed the swf), but I did it out of
          > necessity.
          >
          > Here's my wish, please let me know if you can help me figure out how to do
          > this...
          > I'd like to make one swf file with a keyframe for each movie clip to show.
          > I'd like to code the buttons to open up that one swf file and tell it to
          > go to
          > a specific frame. That way, everything is in one swf file (not the actual
          > flv
          > files of course, I use the flv player to call them in) instead of 60
          > different
          > swf files and 60 different html files.
          >
          > Please help!!! Thanks,
          > B
          >
          >
          >
          >


          • 2. Re: Still got a big problem
            "If not then just use the contentPath property for the FLVPlayback and a
            single FLVPlayback component and use AS to change the that value. Use an
            array to hold the various FLV file names and the buttons to make the switch."

            Hi Lon,

            Your response was a little above my actionscript knowledge, but I kind of understand. What would I put in the contentPath property box? I don't really understand what you meant by "use a single FLVPlayback component and use AS to change the that value."

            You also siad to use an array to hold all of the FLV file names ...where would I put that array? I've never written an array before, could you provide an example?

            Also, you said I could control it with a button - each of these are attached to a button already, so how would I change the script on the button to control this?

            Thanks in advance....
            B

            • 3. Re: Still got a big problem
              Level 7
              Frame 1 main timeline:
              var myFlvUrls:Array = new Array()
              myFlvUrls[0] = "FixingPasta.flv";
              myFlvUrls[1] = "Birthday.flv";
              myFlvUrls[2] = "SillyCats.flv";
              myFlvUrls[3] = "camping/TheBearAttack.flv";
              An FLVPlayback component on stage with an instance name. I am using
              myFlvPlayBack for the example below.

              FLVPlayback.contentPath: http://livedocs.macromedia.com/flash/8/main/00003539.html

              On the button to play the first flv.

              on (release)
              {
              myFlvPlayBack.contentPath = myFlvUrls[0];

              }

              Repeate for each button but change the index in square brackets.


              --
              Lon Hosford
              www.lonhosford.com
              Flash, Actionscript and Flash Media Server examples:
              http://flashexamples.hosfordusa.com
              May many happy bits flow your way!
              "ekora" <webforumsuser@macromedia.com> wrote in message
              news:e890p8$l30$1@forums.macromedia.com...
              > "If not then just use the contentPath property for the FLVPlayback and a
              > single FLVPlayback component and use AS to change the that value. Use an
              > array to hold the various FLV file names and the buttons to make the
              > switch."
              >
              > Hi Lon,
              >
              > Your response was a little above my actionscript knowledge, but I kind of
              > understand. What would I put in the contentPath property box? I don't
              > really
              > understand what you meant by "use a single FLVPlayback component and use
              > AS to
              > change the that value."
              >
              > You also siad to use an array to hold all of the FLV file names ...where
              > would
              > I put that array? I've never written an array before, could you provide
              > an
              > example?
              >
              > Also, you said I could control it with a button - each of these are
              > attached
              > to a button already, so how would I change the script on the button to
              > control
              > this?
              >
              > Thanks in advance....
              > B
              >
              >
              >


              1 person found this helpful
              • 4. Re: Still got a big problem
                Thank you very much for the response. Two questions:

                1) If the button is in a seperate swf file all together and it opens up a new window (where the FLV player & array would be), would the on (release) event change? Would it still work if it's not in the same swf file?

                2) I checked out the docs about FLV Playback.contentPath and it looked like I'm supposed to put the FLV file there - i.e.
                my_FLVPlybk.contentPath = " http://www.helpexamples.com/flash/video/water.flv"; - Wouldn't this only play water.flv then?

                Thanks again...
                B



                • 5. Re: Still got a big problem
                  Level 7


                  "ekora" <webforumsuser@macromedia.com> wrote in message
                  news:e8a2ha$ro5$1@forums.macromedia.com...
                  > Thank you very much for the response. Two questions:
                  >
                  > 1) If the button is in a seperate swf file all together and it opens up a
                  > new
                  > window (where the FLV player & array would be), would the on (release)
                  > event
                  > change? Would it still work if it's not in the same swf file?
                  >

                  From what I can tell from your link, the first swf requests a new web page
                  with another swf.

                  What cannot tell is if you intended the second swf to be the same for all
                  flvs or you are having a different swf for each flv?

                  If different swf for each flv file, then you place the FLVPlayback component
                  in each and simply set the contentPath ( you can do this in the Parameters
                  panel when you click it on stage).

                  If the same swf for all flv files, then you need to learn how to pass
                  information from one swf to another running in a different web page window.
                  Based on you novice level, you are moving into challenging scripting
                  territory both in Actionscript and in Javascript along with dynamic HTML tag
                  writing.

                  Perhaps on design it would be wise to use two frames in one swf and dispense
                  with the popup html windows.

                  Frame 1 is the flv selection page and frame 2 is the page with the
                  FLVPlayback component.

                  Frame 1 sets a timeline scoped variable for the flv url

                  var myFlvUrl:String;

                  and stops
                  stop();

                  Frame 1 has a button for each video

                  on (release)
                  {
                  myFlvUrl = "TheCowJumpedOverTheMoon.flv"
                  gotoAndStop(2);
                  }
                  Repeate for each video button on frame 1

                  On frame two the action is

                  myFlvPlayBack.contentPath = myFlvUrl;

                  a FLVPlayback component with the instance name myFlvPlayBack.contentPath.

                  A button that returns to flv selection page (frame 1)
                  on (release)
                  {
                  gotoAndStop(1)
                  }


                  > 2) I checked out the docs about FLV Playback.contentPath and it looked
                  > like
                  > I'm supposed to put the FLV file there - i.e.
                  > my_FLVPlybk.contentPath =
                  > " http://www.helpexamples.com/flash/video/water.flv";
                  > - Wouldn't this only play water.flv then?

                  A variable name can also go there or more generically any String expression.
                  The variable represents a URL. The variable was assigned dynamically
                  elsewhere in the scripting such as via a button. Thus you only need only one
                  FLVPlayback component and scripting to dynamically change the variable's
                  value.

                  myFlvPlayBack.contentPath = aVariableName;




                  >
                  > Thanks again...
                  > B
                  >
                  >
                  >
                  >
                  >

                  --
                  Lon Hosford
                  www.lonhosford.com
                  Flash, Actionscript and Flash Media Server examples:
                  http://flashexamples.hosfordusa.com
                  May many happy bits flow your way!


                  1 person found this helpful