I'm attempting to add a skip intro button within the intro. I've tried using methods that have worked with regular animations but they aren't working.

I tried this code with no luck so I'm hoping someone else has something that will work.

monkey_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
    navigateToURL(new URLRequest("http://www.domain.com/"));
}

Recommended Answers

All 5 Replies

Member Avatar for rajarajan2017

Your code is working, are you expecting to open in the same window
Sample:

hit_btn.addEventListener(MouseEvent.CLICK,TestURL);
function TestURL(e:MouseEvent):void
{
var serverpath:String="http://localhost/Raja/AS3.0 PHP/TestPHP.php";
var urlrequest:URLRequest=new URLRequest(serverpath);
navigateToURL(urlrequest,"_self");
}

Hope this helps!

The class or interface 'MouseEvent' could not be loaded.
The class or interface 'URLRequest' could not be loaded.

I was told by someone that since the intro is just an embedded flv that a normal button code for an animation wouldn't work.

Can you look at the intro and maybe it will give you an idea?
joshsonunionsquare dot com

Member Avatar for rajarajan2017

The given embedded flv is your intro right! then its working fine with your skip intro button right!. I want more explanation!!!!

The given embedded flv is your intro right! then its working fine with your skip intro button right!. I want more explanation!!!!

At the moment I have a separate skip intro button outside of the intro due to that code not working with an embedded flv as an intro.

I suppose I'll just leave a separate button to skip the intro since the person I'm building this for said that is just as fine.

Member Avatar for rajarajan2017

If you want to use the button within flv, that is not possible! but this is the embeded flv, so you can place the button on the flv while designing, thats enough!!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.