Actionscript external interface onload
Hi
I Have this external interface code that sends a video url to a video player when a user clicks a button it goes some thing like this:
<script language="JavaScript" type="text/javascript">
$(document).ready(function() {
function callJavascript(sendText){
window.document.myMovie.SetVariable("testValue", sendText);
}
});
</script>
The code above works fine when a user click a button with onclick the passed variable is a video url
and is send to the player.
The problem is I would like to get the video url passed when the page is loaded.
I have tried.
<script language="JavaScript" type="text/javascript">
$(document).ready(function() {
var sendText=$("Videosroll/Videos/1.flv").val();
window.document.myMovie.SetVariable("testValue", sendText);
}
</script>
This does not work. I think its because the videoplayer is not fully loaded when this action is called.
I have looked at javascript timers etc. If any one has a solution please help.
