Skip to main content
October 12, 2010
Answered

Flash interactive slide problem.

  • October 12, 2010
  • 1 reply
  • 971 views

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.

This topic has been closed for replies.
Correct answer Ned Murphy

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.


.


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.

1 reply

Ned Murphy
Legend
October 12, 2010

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.

October 15, 2010

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..

Participant
October 16, 2010

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