How to attach a Callto Link to a swf-file?
Hi,
I'm currently working on an animated skype button (swf-file) which I included into my website and I'd like to attach the following command to it:
Callto://myskypeid
It would be perfect, if - when hovering on it - it shows that it contains an active link (showing the "hand") and when clicking on it, it calls the user's skype app. to phone me on skype
So, in the adobe tutorials I found the following code for inserting a "hyperlink" to a button.
import flash.events.MouseEvent;
function gotoAdobeSite(event:MouseEvent):void
{
var adobeURL:URLRequest = new URLRequest("http://www.adobe.com/");
navigateToURL(adobeURL);
}
linkButton.addEventListener(MouseEvent.CLICK, gotoAdobeSite);
I customised the code:
import flash.events.MouseEvent;
function openskype(event:MouseEvent):void
{
var Skype:URLRequest = new URLRequest("Callto://myskypeId");
navigateToURL(Skype);
}
linkButton.addEventListener(MouseEvent.CLICK, openskype);
But the problem is that there occur "linkbutton not defined property or method" errors when running the code.
My swf or rsp. my fla file contains 10 movieclips which run one after another on the timescale, all in different layouts so that the colour changes during the "run".
I tried it with the first movieclip - layer1 - and named its instance "linkButton".
Didnt work.
Then I tried to insert another layer and attached another picture with alpha=0, converted it into a button and gave its Instance the name "LinkButton", but also didnt work.
Can someone please help me here? I suppose its just a "small" mistake and I couldn't be "so far away" from succeeding...
That would be great! Thanks for the help in advance!!