Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / June 2005



Tip: Looking for answers? Try searching our database.

error calling a javascript function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
zekazeka - 22 Apr 2005 03:20 GMT
i have a flash movie that calls a function in the html.. the function will set
a value in other flash movie also loaded in the html.

function SendVal(param){
window.document.GetInfo.SetVariable("val",param);
}

this function works well in a PC using IE, but on MAC browser's seem's that
SetVariable is invalid.
does anyone knows a substitute function that i can use in an html object, for
setting a value in a var inside a flash movie trough javascript? thnks
James Fee - 22 Apr 2005 15:19 GMT
this is probably because window.document.GetInfo is null on the Mac.

You would need to do something like the following:

var myMovie = document.getElementById("GetInfo");
if (myMovie != null){
   myMovie.SetVariable("val",param);
}
Signature

Jim Fee
Viking Electronic Services
jfee (at) vikinges (dot) com

>i have a flash movie that calls a function in the html.. the function will
>set
[quoted text clipped - 10 lines]
> for
> setting a value in a var inside a flash movie trough javascript? thnks
kaeptn-q - 25 Apr 2005 18:41 GMT
Hi.

I?m trying to figure out the same thing all the day now it does not work with
both of the mentioned ways.

This problem with javascript occurs in several forums, but nobody seems to
have solution to this. even the example in the regarding technotes do not work
on mac.

IE produces an error message like "object doesn?t support method", but that
also doesnt help. i think that the flash-player-plugin should somehow extend
the methods of the object-object, but doesn?t do so.

frustrating...

tom
Cesar Mascarenhas - 29 Apr 2005 13:58 GMT
Sorry for the terrible english! I'm a Brazilian!
Try to make de function reload de swf file with the variable!!
like this:

Function reloadWithVariable(param){
   document.getElementById("swf id here").src =
"swf_file.swf?variablename="+param;
}
works fine for me!
:-)
gaming2day - 05 Jun 2005 09:52 GMT
To pass dates into a .swf file I use this javascript and it works fine:

function flashDate() {

    var now = new Date()

        window.document.getElementById("calendar").SetVariable("myday",
now.getDate() );
        window.document.getElementById("calendar").SetVariable("myorigmonth",
now.getMonth() );
        window.document.getElementById("calendar").SetVariable("myyear",
now.getFullYear() );
        window.document.getElementById("calendar").SetVariable("fromscript", 1);  }

However, it does not work for netscape/mozilla. I've tried alternative such as:
document.getElementById("calendar").src="calendar.swf?myday="+mydate;
and
window.document.calendar.SetVariable("myday", mydate);

but no luck.

any ideas?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.