Maurice Posted November 8, 2006 Share Posted November 8, 2006 Hi all,first of all thanks for all help received so far, it really helped me out of some nasty things. Now I have one more question, which I can't find the answer of.In my actionscript, I have a variable (number) created inside a function. Then I have another function, where I need that variable again. I thought this was no problem, but it seems that ActionScript can't read out variables created inside one function into another. Again, this variable is a number.1) Is there a 'special' trick how I can read the variable from one function into another? Then one small question related to this, does a function inside a function is allowed? So like: button_btn.onPress = function() { *** button2_btn.onPress = function() { *** }} Link to comment Share on other sites More sharing options...
Maurice Posted November 8, 2006 Author Share Posted November 8, 2006 Never mind, found my answer after trying and trying The best way (in some cases) to learn,Cheers,Maurice Link to comment Share on other sites More sharing options...
Sniffy Posted November 9, 2006 Share Posted November 9, 2006 Just for myself to know, how is this done?Is it as simple as me just declaring the variable outside of the function? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now