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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

horizontal scrolling gallery

Status
Not open for further replies.

decibelle

Technical User
Feb 1, 2005
27
US
i'm trying to create a scrolling horizontal gallery of images and when you click on an image, navigate to a swf file. here's a list of features to be included:

1. click and and drag the panel left and right horizontally only

2. the panel should loop if the user drags to the last left or right image on the screen.

3. when the user clicks on an image, navigate to a swf file.

i'm able to drag left and right, but not loop or navigate to a swf file. here's the code and other relevant info:

looptiles_mc.onPress = function(){
startDrag(this, false, -3141 , 46, 0 , 46);
}

looptiles_mc.onRollOver = function (){
delete this.onRollOver;}

looptiles_mc.onRelease = function(){
this.stopDrag()
}

function panelOver() {
this.onEnterFrame = scrollPanel;
delete this.onPress;
}
var b = stroke.getBounds(_root);
function scrollPanel() {

if (looptiles_mc._x>=0) {
looptiles_mc._x = -1328;
}
if (looptiles_mc._x<=-1812) {
looptiles_mc._x = 0;
}

}

looptiles_mc serves as the container which holds the panel_mc movieclip. the panel_mc movieclip contains the image movieclips and actionscript for onrelease events to each image movieclip. what is missing in the code that's not allowing it to loop and have the images clickable?

thanks in advance for your help!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top