3 Replies Latest reply on Oct 17, 2010 4:35 PM by Loveanie

    Creating a SWF to embed in HTML


      First of all ... I'm very new to Flash and most of the other Adobe Utilities. I'm trying to create a SWF file that I can embed in a web page. I've created a file by importing a .flv, then exporting it to create the swf. When I embed it in my web page (on an external server), I get nothing displayed using Internet Explorer. When I tried using Firefox, I get  a message that basically tells me it can't find the FLV file. The reason seems to be that the SWF file is looking for the FLV on my local disk(where I imported it from in the first place). It obviously is not going to find that file on the web server. So... I need to address this in one of two ways:


      Encapsulate the FLV in the SWF so it doesn't have to find the FLV file at some external location




      Somehow modify the SWF to point to the correct location for the FLV file.


      Am I on the right track?


      Thanks for any help...



        • 1. Re: Creating a SWF to embed in HTML
          Loveanie Level 1

          Well, you can embed the video when you import it in Flash... but that's really not the best way to do it...


          You simply have to put the .flv file in the same directory as the .swf file on the server via ftp (well, actually, the same relative path... but I guess on your machine that the .swf file and the .flv files were in the same directory).


          Also, you could open an html page in Dreamweaver and put a .flv file from there... but in that case, you'll still need to put the .flv file on the server.


          In other words, the only way to just put the .swf file (and html file) is to embed the video in the Flash file (.fla and .swf), but, as mentioned, it's not the best way to do it.

          • 2. Re: Creating a SWF to embed in HTML
            riversr54 Level 1

            I figured how to embed the FLV file in the SWF file and that works ... but if that is not the be

            st way, then I'm still stumped. Since I created the SWF file on my Windows Laptop, the SWF

            file expects to find the imported FLV file in a local folder on my windows system. When I attempt to a

            ccess the HTML file that contains the <object> tag for the SWF, it complains that it c

            an't find the FLV file and says that it is looking for it on a local Windows file location

            . This is obviously not correct since the HTML file is served on a Linux Apache server.


            Is there a way for me to modify the FLV file location within the SWF file?

            • 3. Re: Creating a SWF to embed in HTML
              Loveanie Level 1

              Well, I don't think you can in the .swf file... but you can in the fla file...


              When you click on the FLV Playback instance on the stage (i.e. the video), what is the src attribute? (you find the source attribute in the Properties panel in CS5 or the Component Inspector in previous versions).


              If it's something different than just the name of the .flv file, you need to change it or have the same path (i.e. hierarchy) on the server (with the .flv file also, of course)... You didn't mention if the .flv file was uploaded to the server, but it's the first thing to do...