|
-
Observe Alot By Watching
Calling a Javascript Function from Flash
Hi Guys,
I'm growing grey hair trying to figure this out, and all I can find on the net and resources is alert windows / fscommands / and as2 solutions which arent doing the trick except for fscommand which is kinda getting the job done but is redirecting the page at the same time. I have created this project using as1 and flash player 6 and thats why I haven't gone the as2 flash 8 nice and easy route for this solution.
Here's my problem/challenge.
I've got this javascript code in my html/php page which basically registers a sale from my flash app.
<script id="pap_x2s6df8d" src="sale.js" type="text/javascript"></script>
<script type="text/javascript"><!--
var TotalCost="1.00";
var OrderID="1";
var ProductID="1";
function testmovie_DoFSCommand(command, args) {
if (command == "call_alert") {
papSale();
}
}
--></script>
<SCRIPT LANGUAGE="VBScript">
<!--
// Catch the fscommand in ie with vbscript, and pass
// it on to JavaScript.
Sub testmovie_FSCommand(ByVal command, ByVal args)
call testmovie_DoFSCommand(command, args)
end sub
//-->
</SCRIPT>
On my flash frame I've got this...
fscommand("call_alert");
Which should just call the function and leave it at that. Good news is that it calls the function just, but why does my page then redirect???
Are there any alternatives using AS1? Or why is the page redirecting?
Thanks in Advance
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
|