3 Replies Latest reply on Aug 10, 2008 8:14 AM by Shandy Elliott

    Loading listener

    thefelerticia
      I have an application in which i will load an external .swf into my Loader component and to show the progress to user i used a progress listener , but it seems not working for me.
      Can anyone help me?

      I uploaded all the project (520kb) to one of my websites. Download it here please
        • 1. Re: Loading listener
          Shandy Elliott Level 1
          I think the problem is in your code to load a particular swf file. Why all the code to load a swf file in frame 10? Can you explain why it's coded like that? What are you checking for? I can't really test anything without the xml file because I keep getting "No Movie matched idc" in your text box. Also, for your progress bar, you really should do away with the tween and use action script to control the red status bar's width (convert it to a symbol with instance name of mcStatusbar), then use action script with something like

          loadListener.progress = function(eventObj) {
          percentage=myloadbar.bytesLoaded/myloadbar.bytesTotal;
          ldng_clip.mcStatusbar._width=percentage;
          };
          • 2. Re: Loading listener
            thefelerticia Level 1
            Hi



            Thanks for your attention and your time on my thread on Adobe forum,
            http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=288&threadid =1384586&enterthread=y



            I just copied and pasted scripts from somewhere else , and it has just become a mess :(

            The project was defined like this:

            Create a flash movie which reads the address bar of the Internet Explorer, then reads an XML file, and matches the "id=" in the address bar with the entry in the XML, and then loads the relative .swf file



            Now I explain my .fla

            - frame 1, mc, is where the address is fetched from the address bar, and stored in page_href



            - frame 1, Actions layer, is where the XML file is read and stored in 3 different arrays

            in_ex array to show if the address of the swf file is internal or external

            url array to keep the url of the swf file

            id array to keep the id of the swf file



            - frame 10, Actions layer, is where the string "id=" is recognized in the address (lines 1 to 4) and the number after it will be found (lines 4-17) and stored in the movie_found, (lines 18-23). if the number after "id=" doesn't match any cells of id array , movie_found 's value is -1, else movie_found will show the id.



            Other scripts are very simple.



            Note that the files should be in a directory inside the IIS folder (C:/inetpub/wwwroot) so that flash.external.ExternalInterface.call can read the address bar, and that's why you always received the error id not found.



            Also, try something like this in your address:

            localhost/Foldername/hrefgetter.html?id=3

            • 3. Re: Loading listener
              Shandy Elliott Level 1
              Is there more to any of this? Why don't you just hard code which swf file to load?