Jump to content

getting variable out of function...


Maurice

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...