Viewpoint Developer Central    Viewpoint Forums    Viewpoint Forums  Hop To Forum Categories  Viewpoint ZoomView & Flash Authoring    Text dynamic change in to Flash animation on ZoomView photography

Moderators: e_phoenix13
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
<warren>
Posted
Dear friends
i have a Flash animation into a ZoomView photography: in this animation there is a text. Can i create a procedure than dinamically change the text (with a little database) into my Flash animation on ZoomView Photography?
If the answer is "Yes" how can i do to assemble this work??

Thank You
Warren
 
Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of duncan
Posted Hide Post
The answer is "yes" Wink you can do this. There is more than one way to do this, but perhaps the easiest is to use javascript as the intermediary. The path of the data would be this: DB->HTML->XML->SWF. In other words, you would create you own custom property in the mtx (XML). You would then set the value of this property via javascript (HTML), and in turn call an action that passes the value of this property to the dynamic text field of the embeded Flash movie. It would look something like this:

HTML:
// pass a string into your custom property
function setText(myString)
{
vmp.SetProperty ('myString', 'Data', myString, 'mts_str');
vmp.PostEvent ('setText', 0);
}


XML:
<!-- define the property -->
<MTSProperty Name="myString" Data="temp text" Type="mts_str"/>
<!-- pass the string to a flash variable -->
<MTSAction Name="setFlashText">
   <MTSSetProperty Target="myFlash.SWF._root.myDynamicTextField" Value="MTSScene.myString"/>
</MTSAction>
<!-- event which calls your action -->
<MTSInteractor Name="getMessage">
   <MTSHandle Event="setText" Action="setFlashText"/>
</MTSInteractor>


...where "myDynamicTextField" is the var label of your dynamic text field in your embeded Flash movie, and "myFlash" is the name of the MTSTimeElem that loads your embeded Flash movie.

HTH, let me know if you need further assistance, regards,
Daimen
 
Posts: 381 | Registered: January 24, 2003Reply With QuoteEdit or Delete MessageReport This Post
<warren>
Posted
tank you duncan
and sorry for my bad english ( in italy we d'not know well English but we know very well soccer (sig!!!.

warren
 
Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of duncan
Posted Hide Post
oops, it seems MTSProperty doesn't work as expected in the current player release... that'll teach me to test my suggestions before I post them Wink Anyway the workaround is easy, here's the tested scenario:

HTML:
function setText(myString)
{
vmp.SetProperty('myInteractor', 'stat', myString, 'mts_str');
vmp.PostEvent('setText', 0);
}


XML:
<!-- pass the string to a flash variable -->
<MTSAction Name="setFlashText">
   <MTSSetProperty Target="myFlash.SWF._root.myDynamicTextField" Value="val"/>
</MTSAction>
<!-- interactor which holds the string and event which calls your action -->
<MTSInteractor Name="myInteractor" StartState="dummy">
   <MTSHandle Event="setText" Action="setFlashText" val="myInteractor.stat"/>
</MTSInteractor>

This message has been edited. Last edited by: duncan,
 
Posts: 381 | Registered: January 24, 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    Text dynamic change in to Flash animation on ZoomView photography