10 Replies Latest reply on Oct 31, 2010 11:00 AM by Tony404

    Flash interactive slide problem.

    Tony404 Level 1

      Hi

       

      I recently add a zoom and pan to my flash slide show. The zoom and pan works fine when tested on the flash editor. I publish the project and upload it to my website, but for some reason the pan and zoom function refuses to work.

       

      I hope some one could help me.

       

      cheers.

        • 1. Re: Flash interactive slide problem.
          Ned Murphy Adobe Community Professional & MVP

          You'll need to explain the design approach and show any relevant code in order to get help with this.  The way you implement it online might also need to be explained, especially if you load this into another file.

          • 2. Re: Flash interactive slide problem.
            Tony404 Level 1

            Hi

             

            Yes I load it into another file. I have a button of the .swf on the site. The button inside the swf opens another .swf which has the slide and zoom. For some reason the slide and zoom does not work when on the web but works fine in flash.

             

            More explaination:

             

            They is a tim.swf inside a web page. tim.swf has a button that when clicked loads another swf which has the slide and zoom. When the slide and zoom swf is loaded for some reason the slide and zoom fails to work. On the flash editor the slide and zoom works fine.

             

             

            Hope you can help.

             

            Cheers..

            • 3. Re: Flash interactive slide problem.
              Devid Haryalesmana

              maybe when u clicked that button on the web, they still load ur other swf. Why not made it in single file?

              • 4. Re: Flash interactive slide problem.
                Ned Murphy Adobe Community Professional & MVP

                Does your slide and zoom utilize any code involving "_root"?  If so, you need to make use of the _lockroot property.  You should be able to assign it to whatever moviecliip you load the swf into, as in....  mcName._lockroot = true;

                1 person found this helpful
                • 5. Re: Flash interactive slide problem.
                  Tony404 Level 1

                  Hi

                   

                  The Slide swf has the _root property. I changed all the properties in the loaded slide to _lockroot. In the .swf that loads the slide I also tried to implement the code snippet you uploaded.

                   

                  Here is the code:

                   

                  Button1.onRelease = function(){




                  blank.loadMovie("Slideshow.swf");   
                  blank._lockroot = true;
                  }

                   

                  I think I mite have implemented it in correct because the zoom and pan in the Slideshow.swf still does not operate.

                   

                   

                  Cheers.

                  • 6. Re: Flash interactive slide problem.
                    Tony404 Level 1

                    HI

                     

                    The file I need to load is a slide which should not be showing untill the user clicks the button so I can not have it in the same file.

                    so

                     

                    Cheers.

                    • 7. Re: Flash interactive slide problem.
                      Ned Murphy Adobe Community Professional & MVP

                      I am not sure what you did when you say "The Slide swf has the _root property. I changed all the properties in the loaded slide to _lockroot."

                       

                      _root is not a property, it essentially points to an object, the root timeline.  So if you changed _root to _lockroot, you shouldn't have.  The _lockroot property just tells the file that it is set to true for to treat any _root references in the code as the main timeline of the file using it and not the main timeline of the file that loads it.

                      1 person found this helpful
                      • 8. Re: Flash interactive slide problem.
                        Tony404 Level 1

                        Hi

                         

                        Sorry for the late reply Adobe change the webpage and had problems logging in. So are you saying  I should create  a actionscript keyframe in the swf that calls the Slide.swf which contains the zoom and pan function which is not working.How would I implement the lockroot?

                         

                        What I have just said is not that clear.

                         

                        Okay I have a swf called main.swf which has a button that calls another swf file called slide.swf. slide.swf has a zoom and pan function wiith actionscript making the zoom and pan work.

                         

                        When the button in main.swf loads the slide.swf  zoom and pan function suddenly does not work when running on the server. You adviced me to use the lockroot property if they where any pieces of my action script had the _root in place.

                         

                        What I am not sure of is. Should I put _lockroot in an simple action script key frame on the main.swf or inside the slide.swf. action script keyframe means creating a layer in one of the specified files and adding actionscript that contains the _lockroot code you uploaded.

                         

                         

                        Cheers. Hope you understand explaination.

                         


                        .

                        • 9. Re: Flash interactive slide problem.
                          Ned Murphy Adobe Community Professional & MVP

                          In frame 1 inside the slide.swf you only need to specify the _lockroot property once...

                           

                          this._lockroot = true;

                           

                          That is all you need to change.  That tells the slide.swf file that any _root references it uses in its code will refer to its own timeline and not the _root timeline of the main .swf when it gets loaded into it.

                           

                          Just for info sake.... Assuming you load the slide.swf into a movieclip in the main.swf, you could have instead assigned the _lockroot to that movieclip, but if you have access to edit the slide.swf, it's better to have it inside like I just explained--saves you from having to wonder if you reuse it like this in the future and it again puzzles you as to why it doesn't work.

                           

                          If using the _lockroot does not fix this, then you have some other issue that will probably be a little harder to resolve.

                          • 10. Re: Flash interactive slide problem.
                            Tony404 Level 1

                            Thank you for the help.