526
SCI Syntax Help / Re: Bit of help with 3 Things
« on: June 07, 2007, 09:30:15 PM »Would you be willing to show me which code? I've been messing with it for a while now and I still can't figure it out. Not with the selector landing on the button you click, anyway.
Are you saying you want to click on the button, have the selector animate on the button for a split second and then move on to whatever the actual button does? If so, I would create something like this:
Code: [Select]
(instance buttonPress of Script
(properties)
(method (changeState newState)
= state newState
(switch (state)
(case 2 = cycles 3
(code where the selector animates on the given button)
(case 3
(code that does what the button says)
)
)
)
)
To get this instance to work you have to do a couple things:
(1) on any one of your views that you have initialized, you need to add "setScript(buttonPress)" like:
Code: [Select]
(theThrone:init()setScript(buttonPress))
This will make it so the instance is recognized.(2)Then, wherever you have the click code you put in this: (buttonPress:changeState(2)), which will tell the script to run that code, send you to 3 cycles of the selector landing on the particular button, and then going on to run whatever that button does.
If you do this, you will have to do some re-working on your code. You should be able to figure it out though.
Quote
My title screen is just about finished now. I just need to get that double-click issue sorted out. One last thing. I have these sparkles animating on the title. Right now they're only animating forwards and looping. How do I get it to loop forwards then backwards and loop that way?
easiest way I think is to just make the view to shimmer out and back in again. But if you want it to shimmer out and in, and then wait a moment, you would have to do something like what I just showed you in creating another changeState instance that controls them...you should be able to find out how that works from what I described...but if you have questions, I will try to answer them.