8 Replies Latest reply on Feb 22, 2011 6:32 AM by adninjastrator

    Flash and Dreamweaver Integration (external loaded file is not visible in .html or .php)

    Ysong_1983 Level 1

      I am having problem with flash and dreamweaver integration in an externally loaded file.

      1. scrollbar (AS3 scripted) with
      2. dynamic text field {which is called to .txt. file}

      var reqIntro:URLRequest = new URLRequest("Introduction.txt");
      var loaderIntro:URLLoader = new URLLoader();

      function fileLoaded(event:Event):void
          intro_txt.htmlText = loaderIntro.data;

      loaderIntro.addEventListener(Event.COMPLETE, fileLoaded);

      I have an updates section made in flash with scrollbar and externally loaded .txt file [Introduction.txt].  When i publish the file in .swf, it works fine. The scrollbar and the  externally loaded .txt file are working great. But as i have publish it  to HTML in flash only the scrollbar is working and the externally loaded  text is not visible. And even if i inserted the .swf to dreamweaver  {copied the external .txt. file} and save as .html or .php, it has the same output. The scrollbar is working well but the .txt file seems not loaded.

      I  am planning to have some flash files and insert it to dreamweaver. Am i  using the right method and properties for AS3? Or am i missing some  steps in order for the flash scripted file to view in .php or .html?

      can anyone help me with my situation? any suggesations how can i manage this one? i am gladly to here from you, guys.. Thank you.


        • 1. Re: Flash and Dreamweaver Integration (external loaded file is not visible in .html or .php)
          robdillon Most Valuable Participant

          You can publish both an html and swf files directly from Flash. Have you done this? Does it work correcly? From your description it sounds like the .txt file is not in the correct location when you are using Dreamweaver.

          • 2. Re: Flash and Dreamweaver Integration (external loaded file is not visible in .html or .php)
            Ysong_1983 Level 1

            hi Rob,


            i've published the files for both .html and .swf. In .swf the file working perfectly, the text are there but when i publish to .html the text are seems insivible because the scrollbar is working. I can scroll through the scrollbar but the text is not there.


            is my script right for calling an external text file for .html publishing? I am barely blinded with this one, rob. Hope you can help me?


            Thanks and Regards.

            • 3. Re: Flash and Dreamweaver Integration (external loaded file is not visible in .html or .php)
              robdillon Most Valuable Participant

              Without seeing your movie, its difficult to tell where the problem might be. Have a look at this example file and see what might be different in your movie: www://www.ddg-designs.com/downloads/importedHtmlText.zip

              1 person found this helpful
              • 4. Re: Flash and Dreamweaver Integration (external loaded file is not visible in .html or .php)
                adninjastrator Level 4

                I agree that most likely the problem is a pathing issue.

                function(){return A.apply(null,[this].concat($A(arguments)))}

                In .swf the file working perfectly

                The fact that the .swf works perfectly is often the tipoff that the pathing is WRONG... as odd as that may seem.

                That's typically the case where the .swf and the related Flash files, (text, xml, images, etc.) are all in the same folder (just like the book said) but they are NOT in the same folder as the .html Web page.

                Placing the .swf on a Web page that is not in the same folder as the .swf in effect removes the .swf from it's original folder and places it in the folder that the HTML page is in. So the path from the .swf to all those related files has changed and it doesn't work.

                If the .swf is not in the same folder as the HTML page but in a sub folder with all the other Flash assests, testing the .swf directly should NOT work! That's because it's correctly pathed to find the related text files relative to the HTML page, NOT it's physical location, which is the correct way to path it.

                Any of your Flash assets can be placed in as many different folders as you want, they DO NOT need to be in the root folder by the way. Just be sure to path the Flash assests relative to the HTML web page and things will work just fine.

                Best of luck!


                1 person found this helpful
                • 5. Re: Flash and Dreamweaver Integration (external loaded file is not visible in .html or .php)
                  Ysong_1983 Level 1

                  The publishing of .html in flash settings is now working.. Thanks for both of you.. That really helps a lot..


                  Now in Dreamweaver, upon testing the .swf published in flash and insert it on my .PHP  [i used INSERT > Media > SWF (ctrl+alt+F)] .SWF is not working. I just inserted it in DW.


                  This is my site structure:

                  1. Local Site Folder: .....\pages\

                  2. SUBFOLDERS under pages: english, french, arabic

                  3. under ENGLISH:     (a) swfs folder [where i located the .swf file through INSERT menu];

                                                   (b) txtAssets folder [where the Introduction.txt file is located] ----> these are the same path on publish settings in my FLASH files.


                  I did not change any folder or the placement of the .swf file. I just inserted it using INSERT menu in Dreamweaver.


                  Please help me with this one. Again, thank you for the help you have done so far. It really rocks me off the ground!


                  What is wrong with this picture, guys? {avatar dialogue mode] -- hehe..




                  God Bless and Regards,


                  • 6. Re: Flash and Dreamweaver Integration (external loaded file is not visible in .html or .php)
                    adninjastrator Level 4

                    From the sounds of things, you are still having a pathing problem.

                    "Publishing" the .swf in Flash has nothing to do with setting the correct path for the assets unless you publish the .swf into the same folder as your Web page.

                    "Publish" is just a generic way to generate bloated, most un-needed code for placing your .swf on a Web page. You should not rely on that method if you are placing the .swf on a Web page that is NOT in the same folder as you .swf.

                    And using DW and "Insert" is just about as bad.

                    I'm guessing that you have pathing problems because the paths to the assets are not relative to the Web page. Instead, the paths are currently set relative to the physical location of the .swf... which in this case does not work. Perhaps this old post will help clarify:


                    Pathing issues


                    Almost always when it works on the local machine and not the server, it's a pathing problem.
                    You can put your Flash related files in whatever folders you want, they do NOT have to be in the root, they do NOT all have to be in the same folder. But if you have a problem and if sticking them all in the root folder works, then you know that the issue was a pathing problem.
                    Just remember that paths used in the .swf become relative to the Web page on which the .swf is placed, NOT it’s physical location.  So for example, if your .swf is in the flash/data folder and you use that .swf on a Web page in the root folder, you are in effect, removing that .swf from flash/data and putting it in root. So if the .swf is loading any related files (xml, images, video, etc), the path used inside the .swf to load the .xml file has to be relative to it's new location in root and then back down into flash/data. This is true even though when testing the .swf by itself, it can be inside flash/data and work just fine, since relative to it's location, the path is just fine, they are in the same folder. But if that same path is used when the .swf is placed on a page two folder levels up, the relative path has changed, the old "same folder" path will not work.

                    In fact if you are placing the .swf on a web page in a different folder than the .swf is stored in, and that .swf calls external assets, then direct clicking and opening of the .swf in it’s folder should NOT work! That’s because the paths to the external assets should be relative to the Web page and not the physical location of the .swf.
                    So just be sure that you use addresses relative to the final Web page locations (not physical file locations) and you can put the Flash related files in what ever folders you want.
                    Best wishes,
                    Eye for Video



                    Do not rely on "Publish" in Flash or "Insert" in DW until you completely understand how to correctly path assets relative to the Web page that the .swf is on.

                    You might want to start with a simple test page, with a root folder where you Web page is and then a sub-folder called Flash, where all your Flash related files are. Just remember, inside the .swf (.fla) the path to the Flash assets need to be FROM THE WEB PAGE....NOT the physical location of the .swf.


                    Use this simple code to place your .swf on a completly new Web page,


                    <div id="flash">

                    <object data="path_to_file/file.swf" type="application/x-shockwave-flash" width="insert_width_of_movie" height="insert_height_of_movie">                   
                        <param name="movie" value="path_to_file/file.swf">




                    Best of luck!


                    • 7. Re: Flash and Dreamweaver Integration (external loaded file is not visible in .html or .php)
                      Ysong_1983 Level 1

                      You are really great, adninjastrator!


                      Thanks for you help... This solves my problem. I now fully understand the flash and dreamweaver pathing feature. This is my first-time to do a non full-flash site and inserting .swf files in dreamweaver. I mostly do interactive CDs/DVDs using flash.


                      Another thing, do you know where can i find tutorials {readings or video} about FLASH with log-in & search fields using actionscript 3.0? I know some of the details of how to do this in Flash AS3.0.. This is the main reason why i used dreamweaver because i know how this log-in and search works. I really want to go to the next level using AS3 and a full-flash site to avoid using DW. By the way, I am using apache for my server and php-mysql database and communication.


                      Thanks a lot, guys!! This adobe foums really did great of helping each of us! God Bless ADOBE! God Bless DESIGNERS!




                      • 8. Re: Flash and Dreamweaver Integration (external loaded file is not visible in .html or .php)
                        adninjastrator Level 4

                        You are most welcome!

                        As for tutorials, here are a couple sources that I would recommend:





                        Just remember, there is really no such thing as a "full Flash site" only HTML, PHP, ASP, etc Web sites that have some Flash content. You will still need to place your Flash on the web page, center it, set margins, etc using HTML and CSS.

                        If all of your "content" is Flash, then I would suggest you look into using "swfobject.js" to place the Flash .swf on the Web page. This allows you to create alternate, none Flash content that can greatly enhance your SEO. This alternate content can be HTML text content describing in great detail all the graphic aspects of your site and it's contents. You could also provide alternate content that would be displayed in non-Flash browsers, like the iPhone and iPad if those viewers visit your site.

                        Here is just one example of using swfobject to detect the Flash browser pluggin and provide alterante content for non-Flash browsers. Open this site and view the page.... it's just one simple jpg image turned into a .swf. The text on the image would be completely invisible to Google.

                        But view the source code and see all the alternate HTML text content... it descibes the products in great detail... all that content is indexed by Google:


                        For info on swfobject:


                        And again, this illustrates that there is no such thing as a full Flash site... you still need HTML and in this case a little javascript to place your Flash on a Web page.

                        Best of luck on your project!!