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

 

  1. stop();
  2. import flash.events.mouseevent;
  3. var gethome:urlrequest = new.urlrequest("http://www.mydomain.com/");
  4. btn_home.addeventlistener(mouseevent.click, home);
  5. function home(event:mouseevent):void{
  6. navigatetourl(gethome);
  7. }

 

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

Popular posts from this blog

Joomla site hacked, cant see front and - Joomla! Forum - community, help and support

Christian Home School Programs - Joomla! Forum - community, help and support

Trouble with PF_OutFlag_I_USE_AUDIO and PF_CHECKOUT_LAYER_AUDIO