Viewpoint Developer Central    Viewpoint Forums    Viewpoint Forums  Hop To Forum Categories  Viewpoint ZoomView & Flash Authoring    Calling Javascript from Flash Textures

Moderators: e_phoenix13
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Posted
Hi..

I sent a post a month or two ago about working buttons on Flash maps. That all works now.

I have another similar query. Once again I have an swf mapped to an object as a texture. I have a javascript function in my HTML file - 'myFunction()'. The swf has a Button - i'd like to be able to call this javascript function 'myFunction()' on the release of this flash button - I've had no success yet!

Any suggestions??

Cheers - Mick
 
Posts: 9 | Location: Melbourne, AUSTRALIA | Registered: February 20, 2006Reply With QuoteEdit or Delete MessageReport This Post
EnIgMaTiCScOrPioN
Member
Picture of e_phoenix13
Posted Hide Post
Hey !!

Put the following code on the Flash button:
on(release){
   fscommand("PostMessage", "Message=some_message");
}


Put the following interactor in your MTX file to handle the message triggered by flash:
<MTSInteractor Name="my_int">
	<MTSHandle Event="some_message" Action="MTSJavaScript" Func="'myFunction()" />
</MTSInteractor>


Hope this helps.

Cheers,

Anup
 
Posts: 557 | Location: India | Registered: February 12, 2003Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of Admin
Posted Hide Post
Hi Mick,

In addition to what Anup has told you, if you're using the interactive swf as a texture on a 3D object and you want to be able to pass mouse events to it, you'll need to swap the mouse coordinates to the texture coordinates. I attached an example for you to peruse. It's pretty straight-forward.

Regards

Zip/GZ archiveinteractive_swf_on_3D.zip (42 KB, 44 downloads)
 
Posts: 1188 | Registered: January 08, 2003Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community  
 

Viewpoint Developer Central    Viewpoint Forums    Viewpoint Forums  Hop To Forum Categories  Viewpoint ZoomView & Flash Authoring    Calling Javascript from Flash Textures