FORUMS: list search recent posts

3d carousel...i know

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Bruce Bachman
3d carousel...i know
on Mar 21, 2009 at 1:33:51 am

Is there a way to put a limited number of images on a carousel, having the images change a different intervals, without using the mouse over feature, similar to the Microsoft MyPhoto screensaver? I want to use this for a wedding presentation.

Thanx


Return to posts index

Bruce Bachman
Re: 3d carousel...i know
on Mar 21, 2009 at 3:08:03 am

what i mean is i want 10 items on the carousel but want them to change so that i can incorporate say 40 or 50 pics without having to have them all on the carousel at the same time




Return to posts index

Graham Quince
Re: 3d carousel...i know - AS2 solution
on Mar 22, 2009 at 9:11:07 am

Not 100% sure what you're asking. But if you're saying you have your slideshow already set up and want an easy way of changing which images Flash loads in, then I'd sugegst a text file to load the images names:

&banner1=image1.jpg&
&banner2=image2.jpg&
&banner3=image3.jpg&

&done=done&

Create a movieclip in Flash and give it an instance name of holder. (TIP: set the registration point to the top-left hand corner). Have Flash load the images like this:

loadText = new LoadVars();
loadText.load("images.txt");
loadText.onLoad = function(success) {
if (this.done == "done") {
_root.dely = int(this.dely);
myArray = new Array();
myArray[0] = this.banner1;
myArray[1] = this.banner2;
myArray[2] = this.banner3;

loadMovie(myArray[0], holder);
}
};

This script loads all the variables into a clipboard referenced as 'this'. We get Flash to build a array loading each image name into a separate element.

As each array element is numbered, we can use an increasing integer to change the images:

a = int(0);

function changeround() {
a += 1;
///by getting Flash to count how many elements are in the array, we can get set Flash to keep looping the images
if (a loadMovie(myArray[a], holder);
} else {
a *= 0;
loadMovie(myArray[a], holder);
}
}

All that is left is to create a timing method, to run the changeround function periodically. Once set up, and you want to add different images, just alter the text file in include the new file names. I've set this up for three images and three only, but hopefuly you can see how to modify it for larger numbers.

Graham

http://www.YouTube.com/ShiveringCactus - Free FX for amateur films


Return to posts index


Bruce Bachman
Re: 3d carousel...i know - AS2 solution
on Mar 23, 2009 at 1:44:48 am

this is great info but will it work on a carousel?



Return to posts index

Graham Quince
Re: 3d carousel...i know - AS2 solution
on Mar 23, 2009 at 11:26:11 am

not having seen your carousel code I can't say for certain, but ultimately, I don't see why not.

By Carousel, are you talking about some sort of itunes style menu?

Graham

http://www.YouTube.com/ShiveringCactus - Free FX for amateur films


Return to posts index

Bruce Bachman
Re: 3d carousel...i know - AS2 solution
on Mar 27, 2009 at 11:00:26 pm

No what i'm referring to is the Flash 3D carousel that quite a few people use on their websites. Similar to the tutorials that are out there. here is the flash actions code:

var numOfItems:Number = 10;
var radiusX:Number = 250;
var radiusY:Number = 75;
var centerX:Number = Stage.width/2;
var centerY:Number = Stage.height/2;
var speed:Number = 0.005;

for (var i=0;i {
var t = this.attachMovie("item","item"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
}

function mover ()
{
this._x = Math.cos (this.angle) * radiusX + centerX;
this._y = Math.sin (this.angle) * radiusY + centerY;
var s:Number = this._y / (centerY+radiusY);
this._xscale = this._yscale = s * 100;
this.angle += this._parent.speed;
this.swapDepths (Math.round(this._xscale) + 100);
}

this.onMouseMove = function ()
{
speed = (this._xmouse - centerX)/1500;
}






Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]