Вопрос

I am beginner with ExternalInterface js and truly i doesn't know about is that how to working with it. I have 100 flash video all on web. user visit on web and started saw first video. When the first video end the pop up window opened and showing play again or Next Video. When Next Video link clicked and URL of next video open and then next video will play. and so on...

i just need guidance from where to start and any help about understanding to externalInterface or any other way to do this task..

i am not asking for code.. just need guidance . from where to start and what is right way to do this.

Это было полезно?

Решение

You can use Actionscript to call a Javascript Function:

The JS:

function sayHello(data){
    alert("Hello, "+data.name);
}

The AS:

ExternalInterface.call("sayHello",{name:"John Doe"});

Or, you can do the reverse and use JS to call an AS function

The AS:

ExternalInterface.addCallback("sayHello",function(name:String){
    trace("Hello, "+name)
});

The JS:

myFlashMovie.sayHello("John Doe");
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top