AS3 with(){} - any way to refer to the object in ()?
-
25-10-2019 - |
Question
Can I refer the thing I just mentioned in with() with a reserved variable or something? Or do I have to write the entire thing out?
with(something){
someFunction(something)
}
In this example it's simple, but sometimes it's really long and I would like to avoid it if possible.
Solution
If it was javascript, then you could use valueOf(). I don't know if AS3 supports that.
OTHER TIPS
Yes you can, see this actionscript reference page on help.adobe.com:
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow