# Carousel - link to url problem

**URL:** <https://forum.kirupa.com/t/carousel-link-to-url-problem/228111>\
**Category:** flash\
**Created:** [June 5, 2007, 1:26pm UTC](https://forum.kirupa.com/t/carousel-link-to-url-problem/228111 "2007-06-05T13:26:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![staxwax](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@staxwax](https://forum.kirupa.com/u/staxwax)\
**Post date:** [June 5, 2007, 1:26pm UTC](https://forum.kirupa.com/t/carousel-link-to-url-problem/228111/1 "2007-06-05T13:26:45Z")

</div>

Hi guys i posted part of this code earlier and got some great help but my issue is still not solved. I’m wondering if anyone can give me a hand? The latest code has been placed below. Thanks in advance!  
~ Dave

```
			 				**Thanks for the help - still a problem :)** 			
		 			 		 		 		 		Hi nick, thanks for the help...you know exactly what i'm talking about I still have not got it working though, maybe you could have a look at my code?

```

- I’m getting a ‘can’t find the file’ error… thanks!

import mx.utils.Delegate;  
import mx.transitions.Tween;  
import mx.transitions.easing._;  
var numOfItems:Number;  
var radiusX:Number = 330;  
var radiusY:Number = 100;  
var centerX:Number = Stage.width/2;  
var centerY:Number = Stage.height/2;  
var speed:Number = 0.007;  
var perspective:Number = 10;  
var home:MovieClip = this;  
theText.\_alpha = 0;  
var theText:MovieClip = this.attachMovie(“theText”, “theText”, 10000);  
theText.\_alpha = 0;  
var xml:XML = new XML();  
xml.ignoreWhite = true;  
xml.onLoad = function() {  
var nodes = this.firstChild.childNodes;  
numOfItems = nodes.length;  
for (var i = 0; i\<numOfItems; i++) {  
var t = home.attachMovie(“cuadro”, “cuadro”+i, i+1);  
t.angle = i_((Math.PI_2)/numOfItems);  
t.onEnterFrame = mover;  
t.toolText = nodes_.attributes.theText;  
t.content = nodes\*.attributes.content;  
t.objecto.inner.loadMovie(nodes\*.attributes.image);  
t.r.inner.loadMovie(nodes\*.attributes.image);  
//the URL  
the\_url = nodes\*.attributes.url;  
t.numero = i  
t.objecto.onRollOver = over;  
t.objecto.onRollOut = out;  
t.objecto.onRelease = released;  
}  
};  
function over() {  
//BONUS Section  
var sou:Sound = new Sound();  
sou.attachSound(“sover”);  
sou.start();  
home.theText.tipText.text = this.\_parent.toolText;  
home.theText.\_x = this.\_parent.\_x;  
home.theText.\_y = this.\_parent.\_y-this.\_parent.\_height/2;  
home.theText.onEnterFrame = Delegate.create(this, moveTip);  
home.theText.\_alpha = 100;  
}  
function out() {  
delete home.theText.onEnterFrame;  
home.theText.\_alpha = 0;  
}  
function released() {

```
//getURL(this._parent.numero+".jpg");
   //the modification:
  getURL(the_url);

```

}  
function unReleased() {  
//BONUS Section  
var sou:Sound = new Sound();  
sou.attachSound(“sdown”);  
sou.start();  
delete this.onRelease;  
var tw:Tween = new Tween(theText, “\_alpha”, Strong.easeOut, 100, 0, 0.5, true);  
for (var i = 0; i\<numOfItems; i++) {  
var t:MovieClip = home[“cuadro”+i];  
if (t != this.\_parent) {  
var tw:Tween = new Tween(t, “\_xscale”, Strong.easeOut, 0, t.theScale, 1, true);  
var tw2:Tween = new Tween(t, “\_yscale”, Strong.easeOut, 0, t.theScale, 1, true);  
var tw3:Tween = new Tween(t, “\_alpha”, Strong.easeOut, 0, 100, 1, true);  
} else {  
var tw:Tween = new Tween(t, “\_xscale”, Strong.easeOut, 100, t.theScale, 1, true);  
var tw2:Tween = new Tween(t, “\_yscale”, Strong.easeOut, 100, t.theScale, 1, true);  
var tw3:Tween = new Tween(t, “\_x”, Strong.easeOut, t.\_x, t.xPos, 1, true);  
var tw4:Tween = new Tween(t, “\_y”, Strong.easeOut, t.\_y, t.yPos, 1, true);  
tw.onMotionStopped = function() {  
for (var i = 0; i\<numOfItems; i++) {  
var t:MovieClip = home[“cuadro”+i];  
t.objecto.onRollOver = Delegate.create(t.objecto, over);  
t.objecto.onRollOut = Delegate.create(t.objecto, out);  
t.objecto.onRelease = Delegate.create(t.objecto, released);  
t.onEnterFrame = mover;  
}  
};  
}  
}  
}  
function moveTip() {  
home.theText.\_x = this.\_parent.\_x;  
home.theText.\_y = this.\_parent.\_y-this.\_parent.\_height/2;  
}  
xml.load(“edit.xml”);  
function mover() {  
this.\_x = Math.cos(this.angle)\*radiusX+centerX;  
this.\_y = Math.sin(this.angle)_radiusY+centerY;  
var s = (this.\_y-perspective)/(centerY+radiusY-perspective);  
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)/10000;  
};

and the xml file:

\<objectos\>  
\<objecto image=“thumb\_1.gif” url=“[http://www.kirupa.com](http://www.kirupa.com)”/\>  
\<objecto image=“thumb\_2.gif” url=“[http://www.kirupa.com](http://www.kirupa.com)”/\>  
\<objecto image=“thumb\_3.gif” url=“[http://www.kirupa.com](http://www.kirupa.com)”/\>  
\<objecto image=“thumb\_4.gif”/\>  
\<objecto image=“thumb\_5.gif”/\>  
\<objecto image=“thumb\_6.gif”/\>  
\<objecto image=“thumb\_7.gif”/\>  
\<objecto image=“thumb\_8.gif”/\>  
\<objecto image=“thumb\_9.gif”/\>  
\<objecto image=“thumb\_10.gif”/\>  
\<objecto image=“thumb\_11.gif”/\>  
\<objecto image=“thumb\_12.gif”/\>  
\<objecto image=“thumb\_13.gif”/\>  
\<objecto image=“thumb\_14.gif”/\>  
\<objecto image=“thumb\_15.gif”/\>  
\<objecto image=“thumb\_16.gif”/\>  
\<objecto image=“thumb\_17.gif”/\>  
\</objectos\>
