문제

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