[Flashjs] flashProxy.call problem?

Geoff Stearns geoff at deconcept.com
Sat Feb 3 17:00:46 EST 2007


first: is your flash movie lower version than flash 8? if it's 8 or  
higher, you can use ExternalInterface, which will save you some hassle.

If not, you can try my version of the integration kit - it's a little  
simpler to set up.

You can grab it from here:
http://blog.deconcept.com/code/intkit/

check the sample page to see how to set it up.

(you may also want to grab the latest swfobject version instead of  
the one that is included with this zip)



On Feb 3, 2007, at 4:13 PM, Pablo wrote:

> 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
>>
>>
>>
>
>
> _______________________________________________
> Flashjs mailing list
> Flashjs at osflash.org
> http://osflash.org/mailman/listinfo/flashjs_osflash.org




More information about the Flashjs mailing list