|
-
Substitute JavaScript for ActionScript
Hello,
Right now i have a swf that recieves parameters from a snippet of javascript in an index.html file.
<script type="text/javascript">
var flashMap = new SWFObject("main_map.swf", "main", "100%", "100%", "7.0.22", "#FFFFFF", true)
flashMap.addParam("wmode", "transparent");
flashMap.addParam("base", "./");
flashMap.addParam("align", "left");
flashMap.addParam("scale", "showall");
flashMap.addVariable("interfacedata", "skins/default/interface.txt")
flashMap.addVariable("mapdata", "flashdata.txt")
flashMap.addVariable("stateneedloaded", "")
flashMap.write("flash map container")
</script>
The first part is to embed the swf into a div, and the second part passes paramters to main_map.swf. This works fine as long as main_map.swf is the parent file. I'd like to actually embed this main_map.swf into a parent swf file which contains the rest of my layout.
The parent swf is called importMap.swf
it imports main_map.swf with :
loadMovie("main_map.swf", "_level2");
however, when i try and put importMap.swf into the index file, the paramter for "mapdata" is no longer being sent to main_map.swf
var flashMap = new SWFObject("importMap.swf", "main", "100%", "100%", "7.0.22", "#FFFFFF", true)
I've tried declaring global variables for the paramters in importMap with:
mapdata = flashdata.txt;
but it still doesn't pass properly.
Any ideas?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|