[jboss-user] [JBoss Seam] - Re: Seam and Adobe Flex
PatrickMadden
do-not-reply at jboss.com
Wed Jul 18 11:34:41 EDT 2007
I use ExternalInterface in both directions - Flex/Flash to javascript and javascript to Flex/Flash. In my case user's can use the mouse wheel to zoom in and out on the diagram very easily. In my HTML page I have a toolbar that has a combobox showing the current zoom percent. When users uses mouse wheel inside flex I update the html page dynamically using External Interface method as follows:
| /**
| * Updates the zoom combobox in the html page owning this movie
| */
| public function updateZoomComboBox() : void
| {
| ExternalInterface.call("flashUpdateZoomComboBox",
| String(Math.round(getCloosterApp().getGraphCanvas().scaleX * 100.0)));
| }
|
For the reverse direction I first register callbacks with the player. These methods can then be called from javascript.
| /**
| * The methods below can be called from javascript code in the browser.
| */
| protected function registerExternalFunctions() : void
| {
| ExternalInterface.addCallback("zoomIn", zoomIn);
| ExternalInterface.addCallback("zoomOut", zoomOut);
| ExternalInterface.addCallback("zoomTo", zoomTo);
| ...
|
It works for me and I would assume you would be able to use the seam remoting as long as you import the seam remoting javascript file in you xhtlm, or jsp page etc.
Thanks,
PVM
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065439#4065439
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065439
More information about the jboss-user
mailing list