hi, just want to ask if i want to put more pics i that menu or make it wider how i have to change the code ?? If i make mine stage wider or i put more pics it’s not going smooth anymore.. but i dont knoew exactly what i need to change to make it smoothly also on different wide’s of scene or more pics. Thanks
import gs.*;
var middle:Number = stage.stageWidth / 2;
var galleryWidth:Number = images.width;
var speed:Number = 0;
addEventListener(Event.ENTER_FRAME, move);
function move(e:Event):void {
speed = -(0.05 * (mouseX – middle));
images.x+=speed;
if (images.x>0) {
images.x=(-galleryWidth/2);
}
if (images.x<(-galleryWidth/2)) {
images.x=0;
}
}
Comments
hi, just want to ask if i want to put more pics i that menu or make it wider how i have to change the code ?? If i make mine stage wider or i put more pics it’s not going smooth anymore.. but i dont knoew exactly what i need to change to make it smoothly also on different wide’s of scene or more pics. Thanks
import gs.*;
var middle:Number = stage.stageWidth / 2;
var galleryWidth:Number = images.width;
var speed:Number = 0;
addEventListener(Event.ENTER_FRAME, move);
function move(e:Event):void {
speed = -(0.05 * (mouseX – middle));
images.x+=speed;
if (images.x>0) {
images.x=(-galleryWidth/2);
}
if (images.x<(-galleryWidth/2)) {
images.x=0;
}
}
Any code for XML driven images? PLEEEASSEEEEEEE
What kind of things are you looking to do?