I load an image over MovieClipLoader.
Than I need to click this image and link it simply with getURL to another page.
This is the loading:
// *** START load depandance image
var container:MovieClip = createEmptyMovieClip ("container", getNextHighestDepth ());
container._x = 525;
container._y = 0;
//
var myMCloader:MovieClipLoader = new MovieClipLoader ();
myMCloader.loadClip ("depandance.jpg", "container");
myMCloader.addListener (this);
//
var listener:Object = new Object ();
listener.onLoadProgress = function (target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void
{
trace (target + " " + bytesLoaded + " " + " " + bytesTotal);
//create txt load progress
if (bytesLoaded > 0)
{
_root.createTextField ("loading", getNextHighestDepth (), 525, 0, 300, 20);
}
_root.loading.text = "Nahrávám obrázek depandance: " + bytesLoaded;
//_root.loading.border = true;
// create text format
var myTF:TextFormat = new TextFormat ();
myTF.font = "Verdana";
myTF.size = 10;
myTF.color = 0xFF9900;
_root.loading.setTextFormat (myTF);
if (bytesLoaded == bytesTotal)
{
_root.loading.removeTextField ();
}
};
myMCloader.addListener (listener);
// loading complette
var listenerComplett:Object = new Object ();
listenerComplett.onLoadComplete = function ()
{
trace ("onLoadComplete ivoked!");
};
myMCloader.addListener (listenerComplett);
// *** END load depandance image
I tried this but this no works
// on click link to depandance page
var clickImg:Object = new Object ();
clickImg.onRelease = function ()
{
getURL ("images/depandance/PenzionUHrdkudepandance/index.html", "_blank");
};
container.addListener (clickImg);