Skip to main content
Participant
August 23, 2006
Question

External API - What the hell?

  • August 23, 2006
  • 1 reply
  • 181 views
Hello all, excuse me, but what's going on with the External API?
I've tried it and got it working on component buttons...but not
on custom buttons?

Have anybody here experience from this?

Why isn't it working?

Cheers
Adrian
This topic has been closed for replies.

1 reply

amccoolAuthor
Participant
August 23, 2006
Hello all,

Sorry, I'm quite new to Flash so I forgot to add the script inside the button...
Well it didn't work root of the movie trying with this:

send_button.addEventListener("click", clickListener);
function clickListener(eventObj:Object):Void {
ExternalInterface.call("jsFunc", "test");
}

So I had to do it like this, inside the button:

on (release) {
import flash.external.ExternalInterface;
ExternalInterface.call("jsFunc", "test");
}

is it possible to add: import flash.external.ExternalInterface;
outside the button using ex. global?

/A