Drag and scroll PLEASE HELP im desperate!

a script that does this:
movieClip clicked = start drag
if it is dragged to the LEFT 100pixels it stops drag and
scrolls to the left that is -800pixels if it is dragged to the
RIGHT 100pixels it stops drag it scrolles +800pixels.
movieClip on release = stop drag
it returns to its position before dragging.
I made this so far (DOESN'T WORK):
stop();
background.onPress = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
mouseX= _xmouse;
onMouseMove = function () {
mouseX2 = mouseX - _xmouse;
if (mouseX2 > 100) {
this.stopDrag();
_root.lokacija1 = _root.background.targetx = background._x -
Stage.width;
mouseX= 0;
mouseX2 = 0;
play();
} else if (mouseX2 < -100) {
this.stopDrag();
_root.lokacija1 = _root.background.targetx = background._x +
Stage.width;
mouseX = 0;
mouseX2 = 0;
play();
background.onRelease = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.stopDrag();
delete (mouseX2);
mouseX = 0;
mouseX2 = 0;
Text

Alright, accepted. Here's the thing, it was very difficult to
tell what you were needing from your first post, and now having
reviewed the file, it is much more complex than you had indicated.
However, there still is a great deal of extraneous code in the
scripts you have been working on, and the task can be accomplish
much more simply.
I have taken a moment to reconfigure an example of your file,
you'll find that the operating code is far less complex than that
which you had been trying to force into functioning, and requires
very few variables, and loops the panning between the two images.
this script can be modified to accomidate more images or use the
speed of the mouse movement as a ratio to effect the speed of the
tween, or any number of other effects. The codes you previously had
on the p1 and p2 MCs have been stripped out, as well as the
'symbol(s)', all of which are not necessary. I haven't done any
testing as to scaling the swf in a html doc, but if you set this
publish settings up correctly it should scale to the right size
without have to use the onResize method. so here's the file:
FLA
good luck, I hope this helps you out.

Similar Messages

Maybe you are looking for

  • A Friend of mine bought a new computer and they have a WR...

    a Friend of mine bought a new computer and they have a WRT54G wireless router. The computer is connected to the router with a network cable and the only thing they use the wireless portion for id the Wii they have in the other room. Do I need to rein

  • Hmm.. don't recall re-installing Mac OS X

    when I booted up my mac mini, and logged in, the home folder poped up, my icons on my desktop are scattered all over the place, itunes in the dock ended up being a "?" and iMovie being a "?" but next to it was iMovie HD that worked. anyone know what

  • Variable exit requirement -  which i_step?

    Hi, I have created a variable on comp code which is input ready and single value. Second variable is created on fiscal year, this is also ready for input and defaultly it should get the fiscal year values for the company code user inputted. for examp

  • Publish Failed: Captivate 6.1, Mac OSX 10.8.5

    I am experiencing the dreaded and unhelpful "Publish Failed" error message as well. I receive the message only when I am publishing a project with a quiz; projects without quizzes publish without any issue. I am publishing only to SWF output. I am ru

  • Being driven crazy

    I'm going crazy trying to get exim to do what I want it to. Basically, every mail that I send (locally to myself) is being frozen. I CAN send with php sendmail. I can hardly find any info at all on this, so I'm not even sure if exim is the right prog