Ok so I have been working on a project off and on for about a week and I just cant seem to get past this part of it. Basicly I have a panaramic image and I need the user to be able to scroll left and right so the image scroll left and right depending where the cursor is located. After some research on the website I found the code to do right on this website, the link to it is kirupa.com - Interactive Image Panning, Page 1 when I attempt to add this just as it shows in the tutorial to my flash intro it gives me errors and doesnt work at all. I get the follow errors
1120: Access of undefined property _xmouse. 1119: Access of possibly undefined property width through a reference with static type Class. 1119: Access of possibly undefined property width through a reference with static type Class. 1120: Access of undefined property bg_mc.
Thanks ahead for anyone that takes the time to look into this problem! (Yeah I know I am new to flash)
Are you publishing using ActionScript 3? (Press Ctrl+F3 to bring up the properties inspector to find out) The tutorial was designed for ActionScript 2.
Alternatively, you can try using the version of the code that I rewrote in ActionScript 3: http://reclipse.net/kirupa/tutorial/imagePan_AS3.fla
Oh yes I am publishing user ActionScript 3 Thank you!
When I click on the link it just shows text, I do know its suppose to be a download but for some reason my browser isn’t letting me download the file?
When I click on the link it just shows text, I do know its suppose to be a download but for some reason my browser isn’t letting me download the file?
Yeah, that is just because my server is sending the wrong MIME type for the FLA filetype. When the text is up, just do File > Save As… and then it should work properly.
Thank you so much for the help and fast responses!
Ok sorry, I am not understanding what you did because your old tutorial was set up different then your .fla that you just sent me it seems. When I look at where you have added the action script you have made a separate layer above the “bgImage” layer called “action” which contains the ActionScript on the first frame. But in your tutorial it says to apply the ActionScript to the Movie clip layer on the 1st Frame (Which is the Background image Movie Clip). When I do apply the ActionScript to the frame of my movie clip it gives me an error saying
1120: Access of undefined property bg_mc.
am I naming the layers wrong or does that matter in this case? Once again thank you for your time its greatly appreciated!
The name of the layer doesn’t matter. Actually, it doesn’t really matter which of the three layers the ActionScript is on, since they don’t really exist once the movie has been compiled.
Have you completed the step that looks like this?: 
If that doesn’t fix it, then you may want to find the option “Automatically declare stage instances” in Publish Settings > Flash > ActionScript version: Settings > Stage and enable it if it hasn’t been enabled already.
Yeah I tried every step over and over and doesn’t seem to be working. I am still getting the compile error also. I checked to see if the Automatically declare stage instances was enabled and it was. Could I send you the .fla and you look at it? If not what other options do I have?
Sure, I’ll take a look at it.
Okay:
[LIST=1]
[]You still had some of the old ActionScript 2 script on the signlight1 symbol. That was causing some troubles for the compiler.
[]Move the ActionScript on the ‘bg’ layer forward 2 frames so that it runs on frame 3, with the new keyframe.
[]Give the instance of trainstation_symb the instance name ‘bg_mc’.
[]Right click on the last frame (frame 101) on the ‘bg’ layer and click ‘Clear keyframe’. That will prevent the copy of trainstation_symb from replacing the one that already has some event handlers registered on it.
[/LIST]
That should make it work, or I can send you the modified version.
Can you send me the modifed files please?
Sorry to bother you once again but is there a way to have it so the Movie Clips I placed on top of the background move with it? Instead they seem to not move yet the background does, take a look http://www.StreetFamous.net/work.swf
Sorry I got this to work just fine! Thank you for all your help and great website!