0

hello,

Please any one send me sample code,...

1)How to embed the flash movie in iframe using swfobject in javascript?


2)How to send parameters from Iframe loaded with flash to that flash movie?


With regards,
Eswaran Saravanan,
University west,
sweden.

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by eswar.aspire
0

For 1), just create a php, cf, or asp page and call it swf_page.ext. Next set the CSS body, html, and swf height + width to 100%. Then embed the swf object. When you lauch the page, it should take up the whole screen. next make it where the params get what is passed in the url.

For 2), you will have to pass the parameters using a link. So we will call this main.html. create an iframe (width 300, height 300) and a side nav with a link.

<script type="text/javascript">
function pass_param(param1) {
    document.getElementById("iframe").src = "swf_page.ext?height="+param1;
}
</script>
<a onlick="pass_param('100')">Adjust height to 100</a>

Or if you want to use more than one parameter.

<script type="text/javascript">
function pass_param() {
    var param1 = document.getElementById("input1").value; 
    var param2 = document.getElementById("input2").value;
    document.getElementById("iframe").src = "swf_page.ext?param1="+param1+"&param2="+param2;
}
</script>
<form>
<input type="text" id="input1">
<input type="text" id="input2">
<a onlick="pass_param()">Submit</a>

i hope this helps

0

hello fobos,

Thank you very much for your response...

With regards,

Eswaran Saravanan,
University west,
Sweden.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.