Reply LinkBack Thread Tools Search this Thread
Old 26-03-2008, 07:50   #1 (permalink)
i3lance
Read between da lines!
 
i3lance's Avatar
 
Join Date: Apr 2005
Location: UK, former Londoner
Posts: 840
Send a message via MSN to i3lance Send a message via Skype™ to i3lance
Flash ActionScript Carousel - URGENT NEED OF HELP (KICK IN THE HEAD)

Hey guys,

I've been working for a client developing a carousel (advancing it over time) and I've finally come unstuck. I've attached a picture of what it's supposed to look like and can send you the URL for the online version.

The client now wants the each tile to be a complete tile clickable. I'm smashing my head against the wall trying to do this for them because at the moment only the "More on..." text is clickable.

Below is the code on how this has been generated;

// Create 3D camera
this.initCamera = function() {
// create camera object
this.oCamera = new Object();
// Set camera Properties
this.oCamera.z = focalLength;// target camera z position
this.oCamera.dz = 10;// initial camera z position
this.oCamera.s = 2;// camera zoom speed
this.onEnterFrame = function() {
// Move Camera
with (this.oCamera) {
dz += (z-dz)/s;
}
// shift angle of all clips
shiftAmount = (this["instance_mc_"+selectedMC].angle-90)/maxSpeed;
};
// loop and create the numer of instances defined
for (var i = 0; i<numItems; i++) {
var itmeClip = (i);

//This is the script that disables the hand cursor. Only the pointer is visible
itmeclip.enabled = true;
itmeclip.useHandCursor = true;
// attach movie
this.attachMovie(itmeClip,"instance_mc_"+i,i);
// Assign variable to the MovieClip
clip = this["instance_mc_"+i];
// define initial properties
clip.x = 200;// initial x position
clip.y = 0;// initial y position
clip.angle = i*(360/numItems);// initial item angle
// Add Blur
//var blur = new BlurFilter();
//clip.tempFilter = clip.filters;
//clip.tempFilter.push(blur);
/// render
clip.onEnterFrame = function() {
// shift angle
this.angle -= shiftAmount;
// prevents to go over 360 back to 0
this.angle %= 360;
// prevent to go under 0 back to 360
this.angle = (this.angle<0) ? 360 : this.angle;
// Transform angle degrees to radian value
var radian = (this.angle*Math.PI/180);
// Calculate x position value
this.x = Math.cos(radian)*radius;
// Calculate z position value
this.z = centerY-Math.sin(radian)*radius;
// tilt y position to reflect 3D
this.y = _root.yscroll*Math.sin(radian)-210;
// Calculating actual scale values according to scale = dz/(z+dz) formula
var scale = (this._parent.oCamera.dz-_root.zscroll*5)/(focalLength+this.z);
// Position - This current setting centres the carousel
this._x = (this.x*scale)+centerX;
//this._y = (this.y*scale) + centerY;
// I've disabled the "centerY" axis so we can manually change the HEIGHT
this._y = 180;
// set perspective adjustement
var adj = (this.z*12)/radius;
// set size
this._xscale = this._yscale=(scale*85-adj);
// Swap depths
this.swapDepths(scale*100);
// alpha
this._alpha = (scale*150);
};
}
};

My problem is that I've been working on this for so long I'm just at wits ned now...ANY HELP GUYS?

Cheers,

Desi
Attached Thumbnails
flash-actionscript-carousel-urgent-need-help-kick-head-carousel.gif  
__________________
  Reply With Quote
Old 26-03-2008, 08:00   #2 (permalink)
i3lance
Read between da lines!
 
i3lance's Avatar
 
Join Date: Apr 2005
Location: UK, former Londoner
Posts: 840
Send a message via MSN to i3lance Send a message via Skype™ to i3lance
Last thought, if you don't know the answer, can you point me to somewhere that might? (My bookmarks are not on my work laptop...they are on my home laptop but I don't have that on me...DOH).

Cheers people.
__________________
  Reply With Quote
Old 26-03-2008, 13:04   #3 (permalink)
i3lance
Read between da lines!
 
i3lance's Avatar
 
Join Date: Apr 2005
Location: UK, former Londoner
Posts: 840
Send a message via MSN to i3lance Send a message via Skype™ to i3lance
Anyone? Please? (echo)
__________________
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8