Yet another simple button question
i created masthead in flash cs4 hoping try as3. want 1 simple button go url when clicked.
i'm using actionscript tutorial found. after numerous attempts keep getting same syntax error:
"scene 1, layer 'actions', frame 1, line 3 / 1084: syntax error: expecting identifier before dot."
my script follows
- stop();
- import flash.events.mouseevent;
- var gethome:urlrequest = new.urlrequest("http://www.mydomain.com/");
- btn_home.addeventlistener(mouseevent.click, home);
- function home(event:mouseevent):void{
- navigatetourl(gethome);
- }
gethome variable
btn_home instance name of button.
what doing wrong? i've tried adding dots , colons in various locations in line 3 nothing works.
thanks.
hi,
instead of this
var gethome:urlrequest = new.urlrequest("http://www.mydomain.com/");
use this
var gethome:urlrequest = new urlrequest("http://www.mydomain.com/");
More discussions in ActionScript 3
adobe
Comments
Post a Comment