Hi Susan,
Didn't you attach that url in DisplayPicLoaded in the line
displayObject.url = myURLs[countRounds];?
Error 1119 has to do with referring to a non-existent property. Do
you know which?
Tracing is your friend here I would say.
To be honest I don't know if the Navigate.to line is correct AS3.
HTH
Willem
On 2-mrt-2010, at 14:28, Susan Day wrote:
On Tue, Mar 2, 2010 at 9:15 AM, Geografiek
<geograf...@geografiek.nl> wrote:
Hi Susan,
In DisplayPicLoaded you add displayObject as a child of container.
So in navToURL you can reference it as e.currentTarget.displayObject
Half-way there. I now have this code:
function DisplayPicLoaded(evt:Event):void
{
var container:Sprite = new Sprite();
var myXArray:Array = new Array(10,176,342,508,674,840);
var loaderInfo:LoaderInfo = evt.target as LoaderInfo;
var displayObject:DisplayObject = loaderInfo.content;
displayObject.width = 150;
displayObject.height = 150;
displayObject.x = myXArray[countRounds];
displayObject.y = 10;
displayObject.url = myURLs[countRounds];
displayObject.filters = [createBevel()];
container.addChild(displayObject);
addChild(container);
navPics.push(displayObject);
container.addEventListener(MouseEvent.CLICK, navToURL);
if (countRounds < 5)
{
countRounds++;
init();
}
}
function navToURL(e:Event):void
{
e.currentTarget.removeEventListener(MouseEvent.CLICK, navToURL);
Navigate.to(e.currentTarget.displayObject.url);
}
This throws an error 1119 on this line:
displayObject.url = myURLs[countRounds];
How do I attach that url?
TIA,
Susan
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders