# Pass variables from .as to main project

**URL:** https://forum.kirupa.com/t/pass-variables-from-as-to-main-project/299808
**Category:** flash
**Created:** [November 11, 2009, 10:08am UTC](https://forum.kirupa.com/t/pass-variables-from-as-to-main-project/299808 "2009-11-11T10:08:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Nimaro](https://avatars.discourse-cdn.com/v4/letter/n/7bcc69/32.png) [@Nimaro](https://forum.kirupa.com/u/Nimaro)
#### Post date: [November 11, 2009, 10:08am UTC](https://forum.kirupa.com/t/pass-variables-from-as-to-main-project/299808/1 "2009-11-11T10:08:02Z")

</div>

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 🙂
