On Tue, Mar 2, 2010 at 9:58 AM, Susan Day <suzieprogram...@gmail.com> wrote:

> On Tue, Mar 2, 2010 at 9:47 AM, Geografiek <geograf...@geografiek.nl>wrote:
>
>> Hi Susan,
>>
>> Didn't you attach that url in DisplayPicLoaded in the line
>> displayObject.url = myURLs[countRounds];?
>>
>
> No. I attached jpgs.
>
>
>> Error 1119 has to do with referring to a non-existent property. Do you
>> know which?
>>
>
> Yes. url.
>
>
>> Tracing is your friend here I would say.
>>
>
> Trace what? It breaks on the line with the url, as I stated previously (in
> last email). I put a trace just below that line that didn't.
>
>
>> To be honest I don't know if the Navigate.to line is correct AS3.
>>
>
> It calls a function that I've already successfully tested.
>

OK. Got it:

function DisplayPicLoaded(evt:Event):void
{
var container:MovieClip = new MovieClip();
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.filters = [createBevel()];
container.addChild(displayObject);
container.text = myURLs[countRounds];
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.text);
}

I had to convert my container into an mc and then add a text property.
Couldn't do it with a sprite.
Susan
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to