Ciao a tutti avrei un problema da chiedervi.
ho realizzato un menu in flash che fa riferimeto a file xml, ogni tasto carica tramite il fil xml delle immagini 8icone tasto) ora vorrei che cliccando sul tasto possa aprire l'immagine piu grande (invede dell'URL) il codice è il seguente:
import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;

var numOfItems:Number;
var radiusX:Number = 300;
var radiusY:Number = 75;
var centerX:Number = Stage.width / 2;
var centerY:Number = Stage.height / 2;
var speed:Number = 0.05;
var perspective:Number = 130;
var home:MovieClip = this;
theText._alpha = 0;

var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",1);
tooltip._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("item","item"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
t.toolText = nodes[i].attributes.tooltip;
t.content = nodes[i].attributes.content;
t.icon.inner.loadMovie(nodes[i].attributes.image);
t.r.inner.loadMovie(nodes[i].attributes.image);
t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
}
}

function over()
{
//BONUS Section
var sou:Sound = new Sound();
sou.attachSound("sover");
sou.start();

home.tooltip.tipText.text = this._parent.toolText;
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
home.tooltip._alpha = 100;
}

function out()
{
delete home.tooltip.onEnterFrame;
home.tooltip._alpha = 0;
}

function released()
{
//BONUS Section
var sou:Sound = new Sound();
sou.attachSound("sdown");
sou.start();

home.tooltip._alpha = 0;
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
t.xPos = t._x;
t.yPos = t._y;
t.theScale = t._xscale;
delete t.icon.onRollOver;
delete t.icon.onRollOut;
delete t.icon.onRelease;
delete t.onEnterFrame;
if(t != this._parent)
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,tru e);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,tru e);
var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
}
else
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,t rue);
var tw2:Tween = new Tween(t, "_yscale", Strong.easeOut, t._yscale, 100, 1, true);
var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,200,1,true);
var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,320,1,true);
var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true );
theText.text = t.content;
var s:Object = this;
tw.onMotionStopped = function()
{
s.onRelease = unReleased;
}
}
}
}

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,tr ue);
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
if(t != this._parent)
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,tr ue);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,tr ue);
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["item"+i];
t.icon.onRollOver = Delegate.create(t.icon,over);
t.icon.onRollOut = Delegate.create(t.icon,out);
t.icon.onRelease = Delegate.create(t.icon,released);
t.onEnterFrame = mover;
}
}
}
}
}


function moveTip()
{
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/122;
}

xml.load("icons.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;
}

MENTRE IL CODICE XML e questo:

<icons>

<icon image="fumo1b.jpg" toolti="LimeWire" content="LimeWire is a peer-to-peer file sharing client for the Gnutella network. It is free software released under the GNU General Public License. Limewire was the first file sharing program to support firewall-to-firewall file transfers, a feature introduced in version 4.2, which was released in November 2004.LimeWire is written in Java and therefore runs on any computer with a Java Virtual Machine installed. To facilitate installation for casual users, installation packages are available for Microsoft Windows, Mac OS X, and in the RPM format for Linux. Support for Mac OS 9 and previous versions has been dropped with LimeWire 4.0.10. The Windows version of the LimeWire installer includes a version of Sun Microsystems' Java installer which will download and install version 1.5 of the Java Runtime Environment if it detects the machine does not have a recent version of Java installed." />

<icon image="fumo2b.jpg" toolti="Rubik's Cube" content="Rubik's 3333Cube is a mechanical puzzle invented in 1974 by the Hungarian sculptor and professor of architecture Erno Rubik. The plastic cube comes in four different versions: the 2×2×2 (Pocket Cube), the 3×3×3, the 4×4×4 (Rubik's Revenge), and the 5×5×5 (Professor's Cube). The 3×3×3 version, which is the version usually meant by the term Rubik's Cube, has nine square faces on each side, for a total area of fifty-four faces, and occupies the volume of twenty-seven unit cubes. Typically, the faces of the Cube are covered by stickers in six solid colours, one for each side of the Cube. When the puzzle is solved, each side of the Cube is a solid colour. The original 3×3×3 version celebrated its twenty-fifth anniversary in 2005, when a special edition Cube in a presentation box was released, featuring a sticker in the center of the white face with a Rubik's Cube 1980-2005 logo." />

<icon image="fumo3b.jpg" toolti="Widgets" content="A widget (or control) is an interface component that a computer user interacts with, such as a window or a text box. Widgets are sometimes qualified as virtual to distinguish them from their physical counterparts, e.g. virtual buttons that can be clicked with a mouse cursor, vs. physical buttons that can be pressed with a finger. Widgets are often packaged together in widget toolkits. Programmers use widgets to build graphical user interfaces (GUIs)." />

<icon image="fumo4b.jpg" toolti="Trash Can" content="A waste container (known more commonly in British English as a dustbin and American English as a trash can) is a container, which can be made out of metal or plastic,[1] used to store refuse. Other names include rubbish bin, litter bin, trash barrel, garbage can and trash bin. Indoor bins are traditionally kept in the kitchen[2] to dispose of culinary excess such as fruit peelings or food packets, although there are also wastepaper baskets or wastebaskets which are used in offices to dispose of waste paper and other office refuse.Most bins have lids on the top to seal in the odor that trash tends to emit. Though most have to be opened manually, indoor bins sometimes have pedals which open the lid when stepped on." />

<icon image="fumo5b.jpg" tooltip="Compass" content="A compass (or mariner's compass) is a navigational instrument for finding directions on the earth. It consists of a magnetised pointer free to align itself accurately with Earth's magnetic field, which is of great assistance in navigation. The cardinal points are north, south, east and west. A compass can be used in conjunction with a clock and a sextant to provide a very accurate navigation capability. This device greatly improved maritime trade by making travel safer and more efficient. The compass was developed in China more than seventeen hundred years ago, however the original inventor remains in dispute; legend has it was invented by emperor Huang Di." />

<icon image="fumo6b.jpg" tooltip="Toaster" content="Modern toasters are typically one of two varieties: pop-up toasters and toaster ovens.In pop-up toasters, the bread is inserted vertically into slots (generally only large enough to admit a single slice of bread) on the top of the toaster. A lever on the side of the toaster is depressed, activating the toaster. When an internal device determines that the toasting cycle is complete, the toaster turns off and the toast pops up out of the slots. The heating elements of a pop-up toaster are oriented vertically, parallel to the bread. By comparison, toaster ovens are small electric ovens with a door on one side and a tray within. To toast bread with a toaster oven, one lays down slices of bread horizontally on the tray, closes the door, and activates the toaster, usually by means of a lever. When the toast is done, the toaster turns off, but the door must be opened manually. Toaster ovens are capable of performing most of the functions of ordinary ovens, but on a much smaller scale." />



ora quale comando devo dare per aprire un file esternoe oprtarlo sulla pagina FLASH (quindi root.content)

forse la spiegazione è complessa e poco chiara, aspetto vostre proposte
grazie mille