Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This is done in Flash 5. it works f 1

Status
Not open for further replies.

Azmaramza

Technical User
Feb 23, 2000
123
CA
This is done in Flash 5. it works fine scrolling right but when it scrolls left the pictures don't reapear they just keep moving left any ideas???

// I have 1 pic made into a movie with the label mouse
// I have 7 pictures that i used labeld a1, a2, a3 ect
// This in a key frame
startDrag ("/mouse", true);
x = 0;
while (Number(x)<10) {
x = Number(x)+1;
setProperty (&quot;a&quot; add x, _x, getProperty(&quot;a&quot; add x, _x)+(getProperty(&quot;mouse&quot;, _x)-350)/20);
if (getProperty(&quot;a&quot; add x, _x)<-350 and getProperty(&quot;mouse&quot;, _x)<-350) {
setProperty (&quot;a&quot; add x, _x, 800);
}
if (getProperty(&quot;a&quot; add x, _x)>800 and getProperty(&quot;mouse&quot;, _x)>-350) {
setProperty (&quot;a&quot; add x, _x, -350);
}
}

Az
azmaramza@home.com

ICQ 59238403

AIM azmaramza
 
not too difficult:

startDrag (&quot;/mouse&quot;, true);
x = 0;
while (Number(x)<8) { this was changed from 10 to 8]
x++;
setProperty (&quot;a&quot; + x, _x, getProperty(&quot;a&quot; + x, _x)+(getProperty(&quot;mouse&quot;, _x)-350)/20);
if (getProperty(&quot;a&quot; + x, _x)<-350 and getProperty(&quot;mouse&quot;, _x)<-350) {
setProperty (&quot;a&quot; + x, _x, 800);
}
if (getProperty(&quot;a&quot; + x, _x)>800 and getProperty(&quot;mouse&quot;, _x)>-350) {
setProperty (&quot;a&quot; + x, _x, -350);
}
}

dave
davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
oops, sorry A

will fix......
dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
sorry for that Az, jumped to wrong conclusion, this one does work however. I've made the position of the mouse the main indicator (which also makes the 'drag' action irrelevant for calculation purposes). I tested this on a 400*400 movie in the player only, I'm guessing that you'll have to alter the _root._xmouse ro something like (_root._xmouse+200) to allow it to work outwith Flash's own movie tester.

x = 0;
while (Number(x)<8) {
x = Number(x)+1;
setProperty (&quot;a&quot;+x, _x, getProperty(&quot;a&quot;+x, _x)+((_root._xmouse)/20));
if ((getProperty(&quot;a&quot; +x, _x)<-200) and (_root._xmouse<-200)) {
setProperty (&quot;a&quot; +x, _x, 800);
}
if ((getProperty(&quot;a&quot; +x, _x)>800) and (_root._xmouse>-200)) {
setProperty (&quot;a&quot; +x, _x, -200);
}
}


dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
ok thx for the help Dave
Az
azmaramza@home.com

ICQ 59238403
MSN azmaramza@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top