actionscript 2

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

ian macwiliam

Thread Starter
Joined
Mar 21, 2009
Messages
30
panel.onRollOver = panelOver;
function panelOver(){
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}
var b = stroke.getBounds(_root);
function scrollPanel(){
if(_xmouseb.xMax ||_ymouseb.yMax){
this.onRollOver = panelOver;
delete this.onEnterFrame;
}
if(panel._x>=-15){
panel._x-15;
}
if(panel._x<=-640){
panel._x = -640;
}
var xdist = _xmouse-250;
panel._x +=Math.round(-xdist/7);
}

This is the code(above)
what im trying to do is make a navigation bar where theres a little window when you move the mouse to the right the buttons move automatically to the left,untill the last picture comes up then they stop moving,which works fine. But when i move to the left it doesnt stop at the last button it carrys on.
the link to the website is http://www.flashfridge.com/tutorial.asp?ID=204 and i think there is a line in the code missing but im not sure(this isnt my website its a tutorials site but if you look at it this is what mine is suppost to do. Any help would be greatful. Thanks
 
Joined
Mar 3, 2009
Messages
327
i have just been to your site and i got this error code
Microsoft JET Database Engine error '80040e09'
Cannot update. Database or object is read-only.
/tutorial.asp, line 104
this may be unrelated i don't know
 

ian macwiliam

Thread Starter
Joined
Mar 21, 2009
Messages
30
no it isnt my website i am learning actionscript and i use this site for ideas.where u can see that it moves from side to side and when it gets to the end it stops (on the website).
i have tried to duplicate it using the actionscrpt on the page but mine, when the pictures move left and the last picture comes into view stops.but when it moves right and the last picture on the left keeps going.
 
Joined
Mar 3, 2009
Messages
327
i don't understand this bit
panel._x +=Math.round(-xdist/7);

should the + be there, this could be the problem or it might not
 

ian macwiliam

Thread Starter
Joined
Mar 21, 2009
Messages
30
i took out the " + " and tried it but it wouldnt scroll much either way if you look at the website
ianmacwilliam.site88.net
the top version has the original code.
The bottom version has the " + " taken out.
as you can see it moves only a little in the bottom version.
 

ian macwiliam

Thread Starter
Joined
Mar 21, 2009
Messages
30
As im learning actionscript 2 i dont understand most of it. I know a little as ive done some programming in BASIC, a few years ago when i had the Amiga.
As you can see in the top one it move to the left and stops at the last picture but when you move the bar to the right the picture keeps going and doesnt stop on the last picture.
 

ian macwiliam

Thread Starter
Joined
Mar 21, 2009
Messages
30
Also how do it stop it scrolling when my mouse leaves the panel it just keeps scrolling.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top