-
[help] var problem
var B = 1;
var A? = 123;
trace(A1);
Is it possible to change the ? to variable B so the name of the var should be A1? If not can u give me an sugiestion of another code that will work the same as the code im trying to do? im making a blackjack game do i need an current card var :S
-
Not exacty sure what's goin' on, here, but I think what you want is
code: set ("A" + B, 123);
-
-
Hype over content...
Sorry to be all pendatic, but the set command has been deprecated for around 5 years now.
The format is
this["A"+B]=123;
Squize.
-
Well, excuuuuse me, princess.
Honestly, I've just been using set() because I found it whilst combing through the built-in ActionScript index. ...Now I know what all those people who use tellTarget feel like.
Thanks for the update. I'll use that format from now on, if I can remember it.
-
Hype over content...
Yeah sorry, wasn't highlighting the error of your ways or anything ( Well, actually I was ), but I figure it's better to show the right way to do things, as so many of the newer guys read each thread and pick up bad habits.
As to tellTarget, it's only last year I finally let that go ( And I still won't use with{ } to replace it )
Squize.
-
yeah i think that was a little easier
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|