Everlongdrummer
06-10-2008, 10:55 AM
I am working on a site that requires a flash with buttons that link to a URL thats defined outside the flash in the HTML page.
The preview page is here (green flash header with the 3 buttons): http://www.bizmagic.com.au/farmfreshdirect/index.html
At the moment, inside the flash each button has the following code:
on (release) {
getURL(link);
}
And inside the HTML I use swfscript, and the following code to both show the flash and replace the "link" variable with a URL.
<script type="text/javascript">
var so = new SWFObject("flashmovie.swf", "mymovie", "755", "216", "8", "#E0DBCB");
so.addParam("FlashVars", "link=http://www.google.com/");
so.write("flashcontent");
</script>
This worked perfectly and I was happy, so I went to did the same technique to a different flash on a different page. When testing in browser, it linked to a page called "undefined".
So I went back to the first page (where it worked) to find any code differences, and then that page decided to link to the undefined page as well (which of course doesnt exist) without any change to the code.
Just wondering if anyone has any ideas as to why this would be so. Weirdly enough, the 3rd (last) button at http://www.bizmagic.com.au/farmfreshdirect/index.html decides to link correctly while the first two don't. Very confused here.
The preview page is here (green flash header with the 3 buttons): http://www.bizmagic.com.au/farmfreshdirect/index.html
At the moment, inside the flash each button has the following code:
on (release) {
getURL(link);
}
And inside the HTML I use swfscript, and the following code to both show the flash and replace the "link" variable with a URL.
<script type="text/javascript">
var so = new SWFObject("flashmovie.swf", "mymovie", "755", "216", "8", "#E0DBCB");
so.addParam("FlashVars", "link=http://www.google.com/");
so.write("flashcontent");
</script>
This worked perfectly and I was happy, so I went to did the same technique to a different flash on a different page. When testing in browser, it linked to a page called "undefined".
So I went back to the first page (where it worked) to find any code differences, and then that page decided to link to the undefined page as well (which of course doesnt exist) without any change to the code.
Just wondering if anyone has any ideas as to why this would be so. Weirdly enough, the 3rd (last) button at http://www.bizmagic.com.au/farmfreshdirect/index.html decides to link correctly while the first two don't. Very confused here.