thrash_er
08.01.2009, 16:34
Обращаюсь к знающим. такая возникла ситуация,хочу прикрутить лайтбоксовский клон - milkbox
в ФАКе автор пишет
"you can launch Milkbox directly from JavaScript (and therefore even from Flash,*via ExternalInterface*)"
так как я в AS2 новичок,я уж молчу про 3й,вобщем что пишет разраб в ответ на мое письмо,ибо в ФАКе я ничего подобного не разглядел:
Learn to use ExternalInterface instead, it works better and lets you easily communicate with scripts in page and vice-versa.
http://help.adobe.com/en_US/ActionScript/3...90204-7cb2.html
http://help.adobe.com/en_US/ActionScript/3...90204-7ca8.html
Or something like this (or similar: I didn't tested):
import flash.external.*;
button.addEventListener(MouseEvent.CLICK,openMilkbox);
function openMilkbox(){
ExternalInterface.call("milkbox.showGallery",{ gallery:'name', index:0, autoplay:true});
}
The script above is in AS 3.0, but ExternalInterface is available since AS 2.0 / Flash 8 (I think).
все бы ничего,но не получается это переделать в AS2.0,подскажите кто что может)))
предположения:
import flash.external.*;
lightb_btn.onRelease = function() {
addEventListener.click(openMilkbox);
function openMilkbox() {
ExternalInterface.call("milkbox.showGallery",{gallery:'name', index:0, autoplay:true});
}
};
но не работает((
import flash.external.*;
lightb_btn.onRelease = function() {
ExternalInterface.call("milkbox.showGallery",{gallery:'name', index:0, autoplay:true});
}
тоже не срабатывает
в ФАКе автор пишет
"you can launch Milkbox directly from JavaScript (and therefore even from Flash,*via ExternalInterface*)"
так как я в AS2 новичок,я уж молчу про 3й,вобщем что пишет разраб в ответ на мое письмо,ибо в ФАКе я ничего подобного не разглядел:
Learn to use ExternalInterface instead, it works better and lets you easily communicate with scripts in page and vice-versa.
http://help.adobe.com/en_US/ActionScript/3...90204-7cb2.html
http://help.adobe.com/en_US/ActionScript/3...90204-7ca8.html
Or something like this (or similar: I didn't tested):
import flash.external.*;
button.addEventListener(MouseEvent.CLICK,openMilkbox);
function openMilkbox(){
ExternalInterface.call("milkbox.showGallery",{ gallery:'name', index:0, autoplay:true});
}
The script above is in AS 3.0, but ExternalInterface is available since AS 2.0 / Flash 8 (I think).
все бы ничего,но не получается это переделать в AS2.0,подскажите кто что может)))
предположения:
import flash.external.*;
lightb_btn.onRelease = function() {
addEventListener.click(openMilkbox);
function openMilkbox() {
ExternalInterface.call("milkbox.showGallery",{gallery:'name', index:0, autoplay:true});
}
};
но не работает((
import flash.external.*;
lightb_btn.onRelease = function() {
ExternalInterface.call("milkbox.showGallery",{gallery:'name', index:0, autoplay:true});
}
тоже не срабатывает