-
Randomizing images
I have a some script that basically takes 7 photos and rotates them in and out. I would like to change the script slightly so that instead of going in order, the file randomly chooses the photos to rotate in and out. I'm using Flash MX and the actionscript I'm using is:
pic_arr = ["allan1.jpg", "seth1.jpg", "sri2.jpg", "cindy3.jpg", "dale1.jpg", "chandra2.jpg", "ken1.jpg"];
// specify pic locations, alpha increment each frame, and
// number of frames to keep current picture displayed before
// transitioning to the next one
blank_mc.attachMovie("slideshow", "uuShow", 1, {
_x:0, _y:0, _visible:false, fps:12, nFrames:110, alphaIncr:10,
slides_arric_arr, slideDepth:50, repeat:true});
// tell blank_mc to listen for events broadcast by uuShow
blank_mc.uuShow.addListener(blank_mc);
blank_mc.onSlideLoaded = function(i) {
(new Color(this._parent["dot"+i+"_mc"])).setRGB(color_arr[i]);
// trace('slide '+ i + ' loaded');
};
blank_mc.onAllSlidesLoaded = function() {
this.uuShow._visible = true;
this.uuShow.beginTransitions();
};
blank_mc.onShowOver = function() {
//set repeat:false in uuShow for this to be called
//trace('slideshow is over');
};
-
more info
The slideshow can be seen at:
http://www.visbuilder.com/client/sli...eftphotos.html
And the .fla can be downloaded at:
http://www.visbuilder.com/client/sli...leftphotos.fla
Or if anyone knows of an existing tutorial that does the same thing... great send me the link. All I need is a slideshow pulling these 7 photos randomly (instead of in order like I have it).
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|