Author Topic: Actionscript 3  (Read 1317 times)

  • Offline zpyder

  • Posts: 6,946
  • Hero Member
Actionscript 3
on: April 19, 2008, 13:47:53 PM
Oh dear god :| Last time I looked into actionscript was a few years ago with the basics. Back then it kinda made sense with the events like on mouse click, go here and play etc...

But AS3? Cant make head nor tails of it (Theres a reason I quite BSc computing heh)

Basically, I have a flash file with 3 buttons. I want each of the 3 buttons, when clicked, to go to a different web page. The code Ive butchered from a tutorial site is chucking up errors, and on top of that I havent even figured out how to stop the flash file on the first frame!

Code: [Select]
function newsclick(event:MouseEvent):void
{
var newsurl:URLRequest = new URLRequest(”http://www.yupyup.co.uk/news/”);
navigateToURL(newsurl);
}

function photosclick(event:MouseEvent):void
{
var photosurl:URLRequest = new URLRequest(”http://www.yupyup.co.uk/photos/”);
navigateToURL(photosurl);
}

function linksclick(event:MouseEvent):void
{
var linksurl:URLRequest = new URLRequest(”http://www.yupyup.co.uk/links/”);
navigateToURL(linksurl);
}

photography.addEventListener(MouseEvent.CLICK, photosclick);
links.addEventListener(MouseEvent.CLICK, linksclick);
news.addEventListener(MouseEvent.CLICK, newsclick);

stop();


This chucks up errors 1093 and 1084 on each of the var lines...

Any help on how to sort this extreme noobish problem greatly appreciated...

  • Offline zpyder

  • Posts: 6,946
  • Hero Member
Re:Actionscript 3
Reply #1 on: April 19, 2008, 13:50:29 PM
Heh, sorted.

It didnt like the copy-paste jobby of the " symbols. I had to delete both ends of the urls and retype them. Thats seriously backwards...

However the buttons dont actually work ><

0 Members and 1 Guest are viewing this topic.