| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| DesignersTalk > Flash ActionScript Carousel - URGENT NEED OF HELP (KICK IN THE HEAD) |
|
LinkBack | Thread Tools | Search this Thread |
|
|
#1 (permalink) |
|
Read between da lines!
|
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 |
|
|
|
![]() |