Viewpoint Forums
Viewpoint Forums
Viewpoint ZoomView & Flash Authoring
Calling Javascript from Flash Textures|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Member |
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 |
||
|
|
EnIgMaTiCScOrPioN Member |
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 |
|||
|
|
Member |
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 interactive_swf_on_3D.zip (42 KB, 44 downloads) |
|||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|
Viewpoint Forums
Viewpoint Forums
Viewpoint ZoomView & Flash Authoring
Calling Javascript from Flash Textures
