School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,369 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,459 people online right now. Registration is fast and FREE... Join Now!




actionscript 3 for a simple logo

 

actionscript 3 for a simple logo, actionscript

chrisdegrote

19 Jun, 2009 - 11:49 AM
Post #1

New D.I.C Head
*

Joined: 18 Nov, 2008
Posts: 12

Hello people,

for my site I've got a logo in flash. But I don't got enough knowledge of actionscript 3.0 to get it working properly.

What I want is an eventlistener to go to my homepage when clicked on.
http://www.baanict.com

This is the code I've got until now.
CODE

logo_mc.buttonMode = true

var url:String = "http://www.baanict.com";
var request:URLRequest = new URLRequest(url);
try {
  navigateToURL(request, '_self'); // second argument is target
} catch (e:Error) {
  trace("Error occurred!");
}


Thanx in advance

User is offlineProfile CardPM
+Quote Post


BetaWar

RE: Actionscript 3 For A Simple Logo

19 Jun, 2009 - 04:35 PM
Post #2

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 4,729



Thanked: 269 times
Dream Kudos: 1400
My Contributions
If you are talking about the top left logo it seems to work (I click and the page goes to http://www.baanict.com/). Not sure if I am understanding what you are trying to do that isn't working. (I am using IE 7).
User is offlineProfile CardPM
+Quote Post

chrisdegrote

RE: Actionscript 3 For A Simple Logo

20 Jun, 2009 - 02:19 AM
Post #3

New D.I.C Head
*

Joined: 18 Nov, 2008
Posts: 12

It works because I implemented the solution already thanx for giving it a glance. The solution for my problem is here

CODE

var url:String = "http://www.baanict.com";
var request:URLRequest = new URLRequest(url);

logo_mc.addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
logo_mc.buttonMode = true;

function onClick(e:MouseEvent):void
{
    navigateToURL(request, '_self');
}


This post has been edited by chrisdegrote: 20 Jun, 2009 - 02:22 AM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 08:57PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month