ACTIONSCRIPTERS ONLY
- Started
- Last post
- 27 Responses
- AMFA0
FYI
you can also use _root["var"+counter]
this will allow more options...
eg
if you need to set a dynamic var:
eval("var"+i) = "hello"
will throw and error,
and
_root["var"+1] = "hello"
will notboth work if you do:
myVar = eval("test"+i)
or
myVar = _root["test"+i]
but eval wont work the other way....
- jeedoubleu0
Wicked, thanks AMFA. I remember when your site was a tutorial site, it was wicked, but then your stopped posting shit.
Oh well its still hot shit.
I'm gonna get back to the matrix. Thanks again all!
- AMFA0
ah.. yes thats cause im starting a new flash resource site under a different name.... been a little busy, but I am working on it....
It will (should) be live in the next few months.
- ok_jason0
AMFA - first off, i just checked your site out..it is really nice so i do not doubt you coding skills.
But you advice here is kind of odd. hard coding the path to _root is not really that portable. Your example about setting a dynamic var saves one line of code for a step back.
Ultimately, none of the code in the FLA is really that good. I have never really used buttons and cannot think a reason to, frame labels are poor versions of states and there is a total absence of any OOP.
not trying to diss you Jee(or AMFA) just trying to clear up the comments that live below actionscript in the PVN. So smile...i am too old to battle, even on PVN.
- AMFA0
no its cool man...
and i agree with you... i was just trying to solve jd's specific fla problem.
true, hard coding the _root is unadvisable.
but i was just trying to let people know that if you use eval, you can only use it in certain capacities...
typically, , i use a control class that handles all my code, so is is completely separated from the design...
- AMFA0
wow. i think i had about 5 errors in that post....
- caseyc0
Jason, that third paragraph in your last post is friggin hilarious! How are you going to "clear up the comments that live below actionscript in the PVN" by making silly one sided statements:
1. none of the code in the FLA is really that good
2. I have never really used buttons and cannot think a reason to
3. frame labels are poor versions of states
4. and there is a total absence of any OOP
Thanks for the laugh.
- ok_jason0
great response. I was afraid I would sound like prick..
yeah. i think we see it the same. Like I said, I can see that your site is done nicely so keep on doing it.
- ok_jason0
Sorry. I should of just emailed offline to AMFA. I was not trying to be rude.
- AMFA0
i dont think it was rude at all....
he brought up some very good points.
- cloned0
what do you want it to do
- jeedoubleu0
the file is 1k.
I'm basically trying to get a movieclip to jump to a labelled frame in its own timeline, through a function on the main timeline.
Did I explain that right?
Once you download it open it up. You'll see what i'm trying to say.
- jeedoubleu0
This little peice of shit code has my mined fuckin' warped. Any help at all would be appreciated, and possibly rewarded with a sexual favour? Yes? No?
- ok_jason0
buttonClip = eval("button" + counter);
- jeedoubleu0
sorry jason, maybe im an idiot :) but I dont get it. Are you saying to just ad brackets?
- fate_redux0
The name of the MC is button1, not buttonClip. Fix your code.
- ok_jason0
Hi..
No. Just use
eval("button" + counter);in your button actions. You need to turn the string into an object.
- fate_redux0
oops, all you need is an eval statement
on (release) {
buttonClip = "button" + counter;
eval(buttonClip).gotoAndStop("ye...
counter ++;
trace(buttonClip);
}
- jeedoubleu0
Yo Jay!! I owe you big time! Just holla at me, aight
- fate_redux0
damn ok_jason beat me to it.