I tried bringing this issue up before and was curious what peoples thoughts were. See my post here for additional info:

http://osflash.org/pipermail/osflash_osflash.org/2005-June/000499.html

The products at my company are desktop apps with wrappers around them. Bottom line is all of the data and window manipulation is done via javascript so I had to work out a way of communicating flash to javascript / javascript to flash. I ended up working it out so that I can send multiple events, one after another (example: download status bars in flash for video that's downloading to the user's computer).

I'd love to see what solution we could come up which could be rolled back into the integration kit. I'll look for Mike around here at flashforward today and bug him :)



Tim


Mike Chambers wrote:

Woah. Lets all read the email.

he is not having an issue with calling ActionScript to JavaScript. We have fixed the issues around calling getUrl multiple times (after jesse brought it to our attention).

He is having an issue making quick calls into flash from actionscript. I spoke with Christian about this, and we think we have a pretty good solution that will fix this issue.

mike chambers

[EMAIL PROTECTED]
On Jul 7, 2005, at 5:08 PM, Allen, Christopher S. wrote:

Yeah,



Although I’m not using the JavaScript integration kit, but I had similar issues with using getURL() with our piece that communicates with JavaScript and had to change the calls to fscommand. It works well, now that I made the change, but it sure was a pain to figure out that that was what was going on.



I suppose the main problem with using fscommand is that fewer browsers support it; but if you need to make calls in rapid succession I think it’s the only way.



-Chris



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:osflash- [EMAIL PROTECTED] On Behalf Of JesterXL
Sent: Thursday, July 07, 2005 5:01 PM
To: Open Source Flash Mailing List
Subject: Re: [osflash] rapid JavaScript to ActionScript proxy calls



I believe that the current build of Flash/JSIK is based on getURL. I had recommended that not use that as the direct communciation method to JavaScript because of this very issue, but apparently no one was reporting such issues beyond me until now.



If you can go find the actual call the getURL and change to fscommand, that's the first part, however, I know from the code I saw awhile ago, you'll need to some changes on the JavaScript side to support fscommand.



Bottom line, getURL fires only once per frame, and even then it's not accurate vs. fscommand which is syncronous to JavaScript.



If you link me to the SVN, I can try to take a look tonight.



----- Original Message -----

From: Justin Peck

To: [email protected]

Sent: Thursday, July 07, 2005 4:47 PM

Subject: [osflash] rapid JavaScript to ActionScript proxy calls



Hello all.



I have checkout out the lastest Flash / JS Integration kit code (via svn), compiled it, and am running into the following problem:



I have several ActionScript calls (8 total) to a JavaScript function named doCommand(). These I see and are all received by my JavaScript function. So far so good...



Now each time the doCommand() function is called, it immediately issues a call back ActionScript using the FlashProxy object. Listed below are those eight commands:



flashProxy.call ("setCoreChildren","student_id,student_name,lesson_location");
flashProxy.call("setCoreMode","browse");
flashProxy.call("setLessonLocation","");
flashProxy.call("setSuspendData","");
flashProxy.call("setTotalTime","00:00:00");
flashProxy.call("setObjectivesCount","0");
flashProxy.call("setInteractionCount","0");
flashProxy.call("setStudentName","Smith, Jonathan");





In my flash movie, I have each of these methods trace what they receive, and unfortunately the last ActionScript function "setStudentName" is the only one being called.



I recall someone posted bug and a fix for this issue, but I wasn't sure if the fix addressed the problem from ActionScript rapidly calling JavaScript, or vice versa. Can someone please shed some light on this? Is there a known issue calling the FlashProxy object multiple times in rapid succession?



~Justin

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org



_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org


_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to