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

Can I use the extern-object to call vetscript-functions too? And if possible, how do I pass arguments?

I tied this:
//Actionscript:
var mess = "actionscript_param";
extern.new_message(mess);

//VETScript:
function new_message(data) {
	alert(data);
}

But i didn't work. Maybe someone can tell me how to do something like this...

thanks in advance
 
Posts: 48 | Registered: November 28, 2005Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of Admin
Posted Hide Post
Try

extern.NameOfVETScriptAnimator.new_message()
 
Posts: 1188 | Registered: January 08, 2003Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
What do you mean exactly with NameOfVETScriptAnimator?

I tried this:
<MTSAction Name="vet_functions"  Type="VETScript" >
<!--
function myfunction(){
	//debugtext_LayerData.text += 'new message from actionscript\\n';
	alert('message from actionscript');
}
-->
</MTSAction>

with the refering actionscriptcall:
extern.vet_functions.myfunction();

But it didn't work.
 
Posts: 48 | Registered: November 28, 2005Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of Admin
Posted Hide Post
When using VETScript, you have to create a VETScriptInterpreter animator type:

<MTSTimeElem Type=”VETScriptInterpreter” />

You can give it a name like so:

<MTSTimeElem Type=”VETScriptInterpreter” Name="myVetScriptInterpreter" />

And use it to access your functions:

extern.myVetScriptInterpreter.new_message()

However this is experimental. Let me know if it works.
 
Posts: 1188 | Registered: January 08, 2003Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community