uaveeman
03-08-2006, 04:47 PM
I'm new to flash. I have MX 2004. went with a template to try and learn some of it on my own. it loads a random image for the homepage and each following subpage. from what I can gather, it takes all the information from these two commands:
loadMovie("galleries/home/"+_root.poza+".jpg", "pic1");
and
_root.createEmptyMovieClip("s", 1);
_root.s.onEnterFrame = function() {
t = pic1.getBytesTotal();
l = pic1.getBytesLoaded();
trace(l);
if (l == t and t != -1) {
gotoAndPlay(3);
removeMovieClip(_root.s);
}
};
stop();
the template also had two buttons, a previous and next button to move through the images...
code for previous button:
on (press) {
if (_root.poza>1) {
_root.poza--;
} else {
_root.poza = 3;
}
pics.gotoAndPlay(1);
}
code for next button:
on (press) {
if (_root.poza<3) {
_root.poza++;
} else {
_root.poza = 1;
}
pics.gotoAndPlay(1);
}
The template came with 3 photos to randomly show up on the pages...but now I have 8 images that i would like to show. can I change this somehow to file through my 8 pictures instead of 3?
Thanks for any help!
regards,
David V.
loadMovie("galleries/home/"+_root.poza+".jpg", "pic1");
and
_root.createEmptyMovieClip("s", 1);
_root.s.onEnterFrame = function() {
t = pic1.getBytesTotal();
l = pic1.getBytesLoaded();
trace(l);
if (l == t and t != -1) {
gotoAndPlay(3);
removeMovieClip(_root.s);
}
};
stop();
the template also had two buttons, a previous and next button to move through the images...
code for previous button:
on (press) {
if (_root.poza>1) {
_root.poza--;
} else {
_root.poza = 3;
}
pics.gotoAndPlay(1);
}
code for next button:
on (press) {
if (_root.poza<3) {
_root.poza++;
} else {
_root.poza = 1;
}
pics.gotoAndPlay(1);
}
The template came with 3 photos to randomly show up on the pages...but now I have 8 images that i would like to show. can I change this somehow to file through my 8 pictures instead of 3?
Thanks for any help!
regards,
David V.