Pass variables from .as to main project

Hy guys,

Im trying to pass a number to 1 function in my .as…

In 1 part of my project i want to sent a number to .as function, and in another part i want to receive another value…

like this…

The sintax is wrong, but i think i can made myself easier to understand…


In this part i want to send a value to my .as function…
Ultimo(var int guardaultimo = 1);


This is my .as function
function Ultimo(int valo) {
if ((valo == 1) & (guardapenultimo = 4)) {
Tweenduration = 4.0}
return (Tweenduration); }


and in this part i want to receive Tweenduration value
var velocidade:Number;
velocidade = Ultimo(int val);

Hope i made myself clear… and hope u can help me :slight_smile: