[Flashjs] flashProxy.call problem?

Pablo pablo at blacktower.nl
Sat Feb 3 16:13:19 EST 2007


well then I can get the real server time with AJAX and PHP... but I 
first need to get this working before I can hook it up to that!!
> flash and javascript both use the client's time, not the server time.
>
>
>
> On Feb 3, 2007, at 2:28 PM, Pablo wrote:
>
>   
>> Greetings,
>>
>> I'm trying to make my flash clock to communicatie with javascript
>> because I wanna have the server time without PHP.
>> So far I have accomplished that flash execute the javascript however I
>> have trouble with recieving it back within flash..
>> I first made my own codes but when that didn't worked I try'd every
>> solution I found on the site and on google.. however I can't get it  
>> why
>> it wont work...
>>
>> Can anyone help me with this??
>>
>> //Javascript:
>>
>> <script type="text/javascript"
>> src="script/JavaScriptFlashGateway.js"></script>
>> <script type="text/javascript" src="script/FlashTag.js"></script>
>> <script type="text/javascript" src="script/FlashSerializer.js"></ 
>> script>
>> <script type="text/javascript" src="script/FlashProxy.js"></script>
>> <script type="text/javascript" src="script/Exception.js"></script>
>> <script type="text/javascript" src="script/flash.js"></script>
>>
>> <script type="text/javascript"><!--
>> var uid = new Date().getTime();
>> var flashProxy = new FlashProxy(uid,"JavaScriptFlashGateway.swf");
>>
>> function getthetime(n) {
>>     d = new Date;
>>     var time3 = d.getTime();
>>     flashProxy.call("sayHelloReturn", time3);
>>     //alert(time3);
>> }
>> //--></script>
>>
>> <script type="text/javascript">
>>     var tag = new FlashTag('clock.swf', 100, 130); // last two  
>> arguments
>> are height and width
>>     tag.setFlashvars("lcId="+uid);
>>     tag.write(document);
>> </script>
>>
>>
>>
>> //Flash:
>> import com.macromedia.javascript.JavaScriptProxy;
>> var jsProxy:JavaScriptProxy = new JavaScriptProxy(_root.lcId, this);
>> jsproxy.call("getthetime");
>>
>> function sayHelloReturn(result:String):Void
>>    {
>>        _global.myDate = new Date();
>>     _global.myDate.setTime(result);
>>     var result2 = "TRUE";
>>    }
>>
>> _______________________________________________
>> Flashjs mailing list
>> Flashjs at osflash.org
>> http://osflash.org/mailman/listinfo/flashjs_osflash.org
>>     
>
>
> _______________________________________________
> Flashjs mailing list
> Flashjs at osflash.org
> http://osflash.org/mailman/listinfo/flashjs_osflash.org
>
>
>   




More information about the Flashjs mailing list