7 Replies Latest reply on Apr 14, 2011 5:35 AM by davidwegs

    Problem with Button in Learning Interaction

    ginneswatson

      I have created a Flash file with 4 "Fill in the Blank" questions (from the Learning Interactions continued within Flash CS3) at the end. I'm then using the swf file in two different ways. One way simply loads the swf file onto a 'stand-alone' page on my website and it works perfectly.

       

      The other way I want to use it is integrated into a more complicated website where I have a Flash File into which various swf files are loaded when needed. In this version the "Control Button" doesn't change to "Check Answer" and "Reset" as it should and the whole question doesn't work.

       

      The working version is at http://web.me.com/ginneswatsonkelso/New_Chemical_Resources/Name_Isomers_Alkanes.html

      Select "4 For You to Try" to go directly to Quiz Questions.

       

      The non-working version is at  http://web.me.com/ginneswatsonkelso/New_Reaction_Pathways/New_Reaction_Pathways.html

      Go to "Extras" in Menu and select Naming Alkane Isomers, then "4 For You to Try" again.

       

      I'm using ActionScript2 and set for Player 9.

        • 1. Re: Problem with Button in Learning Interaction
          Ned Murphy Adobe Community Professional & MVP

          If your AS2 code is using "_root" references then that may be the cause of the problem if you are dynamically loading this into another file.  If that's the case, then look into using the _lockroot property.

          1 person found this helpful
          • 2. Re: Problem with Button in Learning Interaction
            ginneswatson Level 1

            I was expecting that it might be something along those lines.

             

            Don't pretend to understand much, but the AS2 code starts off using _parent in most of the initialising.

             

            It did occur that once loaded into another Flash file that _parent may be the wrong code but, as I said, my understanding of ActionScript is limited and I would need some help in suggesting what I change it to.

            • 3. Re: Problem with Button in Learning Interaction
              ginneswatson Level 1

              Played around with _lockroot but with no obvious success. In the end I went back to the original 'Parent' Flash File and changed where the 'daughter' swf files are stored within my website and file now loads and works correctly. Shouldn't have made a difference but the desktop version (where all files are in the same folder) worked while my website version (Parent loaded first from one folder and other daughter files had to be stored in Folder for web page (using iWeb)) didn't work.

               

              Would still be interested in any other ideas.

              • 4. Re: Problem with Button in Learning Interaction
                Ned Murphy Adobe Community Professional & MVP

                When you load a Flash file into a web page, the web page becomes the reference for loading for the swf, meaning if you have the swfs in a different folder than the html, but you target the other swf's in that one swf as if they are in the same folder, you will be off target.  Once the swf is loaded into the web page, it is essentially operating in that web page's folder, and anything it is trying to load needs to be targeted as such.

                • 5. Re: Problem with Button in Learning Interaction
                  ginneswatson Level 1

                  Yes, my original technique was to upload the Parent SWF to a folder and then the HTML widget on my webpage would load the file from that location. As you say, all the daughter swf's had to be uploaded into the folder created for that webpage when iWeb uploads my website to MobileMe. This has worked fine for all my other daughter swf's but (I'm presuming) there is something about the Learning Interaction that doesn't let it work this way.

                   

                  The other disadvantage of doing it that way is that anytime I tweak the original webpage and iWeb uploads the changes, it recreates the page folder minus all my daughter swf's and I have to upload them manually again.

                   

                  What I've now done is uploaded all the daughter swf's to the same folder as the Parent and added a full web address to this folder in all my loadMovie commands in the Parent swf. Done this way, the swf with the Learning Interaction works as intended.

                   

                  Many thanks for taking the time and interest to help.

                  • 7. Re: Problem with Button in Learning Interaction
                    davidwegs

                    Thanks for the info Ned, great help.