ACTIONSCRIPTERS ONLY
- Started
- Last post
- 27 Responses
- jeedoubleu
I could really use a hand with this:
http://www.jeedub.com/function.z…I know its really something simple, but it's killing me! Any help at all would be much appreciated
- 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.
- jeedoubleu0
Thanks for coming out, maybe next year slugger.
- ok_jason0
buttonClip is just a reference to the mc/object.
I used to call those type of vars thisMC in everything so I knew they were just pointers.
- fate_redux0
whatever.
- cloned0
he owes one of you two sexual favors
good luck with that
- ok_jason0
not me. not again.
- jeedoubleu0
ha ha. No really though, thank you.
- ok_jason0
cool cool. rock on.
- 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.