Click to See Complete Forum and Search --> : Student project


kcbruski
05-12-2009, 12:12 AM
I am making a pretty basic flash game using AS3, its a 'fill in the blank' type. I think I basically have this code figured out, but I think I need a string variable for the 'word' part, but I've never coded that before, so I was looking for some guidance on that topic. Here is the code I have right now:

import flash.net.navigateToURL;
import flash.net.URLRequest;

goButton.addEventListener(MouseEvent.CLICK, clickHandler);

function clickHandler(event:MouseEvent):void
{
var request:URLRequest = new URLRequest(word+".html");
navigateToURL(request);
}

When I have that code typed I get this error: 1120: Access of undefined property word. I am new to this and pretty confused, so any help would be appreciated.

atrips
05-12-2009, 06:00 AM
I think you haven't defined this "word" variable anywhere in your file. pls crosscheck.