Okay, I’m not looking for the code (I want to try and figure it out), just a point in the right direction.
Here’s what I need to do.
On my navigation, I have 3 options. On first click on any of these, I need to place an animation only once and never again.
Obviously, I need to establish some script stating if it the first click then perform ‘this’ but not if the second click.
However, it has to work a little differently. It shouldn’t be first click on each button, but first click on any button.
What is will do is load the content (some fancy animation), but obviously I don’t want to load it each time as it’s all in the same MC so is unnecessary.
I’m guessing I maybe need to set up ‘if/else’ statements or perhaps 'array’s or ‘both’?
Hints anyone? Remember, no giving it away or I’ll never learn.
I’m not sure I totally understand what you’re trying to do…
So, you want an animation to play only once when you click a button. However, no matter which of the three buttons you click, you want it to play they play no more?
Just making sure before I point you in a "point"less direction! (hyuk…hyuk… sorry).
And sometimes you can learn from getting all the code at once, as long as it’s explained to you
On inital load of my site, no content will be present. So, when the user selects one of the nav options, I want to play a ‘little’ animation that will eventually reveal the content. But, this only needs to play once, not every time the user selects a nav option.
So, I need to tell my movie, that if this is the first time a nav component as been selected, play this animation. However, if they have already selected a nav option, and then pick another, I don’t want the animation to play. Does that make sense?
You’re right, getting the code can be just as useful, feel free to give it to me if you have it.
I’m getting in the shower right now (like you needed to know that), but real quick before I go:
Try making all the nav buttons an instance of the same symbol. The symbol has the AS to make the movie play only once, while each instance can contain the AS to do their navigation duties.
Just a shot, I am pretty new to AS
Well anyways, let me know how things go. I’ll help more later if need be.
York, If I understand you correctly, what you need is an action that performs only once then disables itself. David helped me with a similar problem awhile back in another thread. Here’s the link to that thread, it might come in handy. =)
*Originally posted by electrongeek *
**I envy you York, I can’t read or write actionscripts. When it comes to actionscripting, I feel like a blind asian guy trying to read Hebrew. :-\ **
First off here’s the AS on the actions layer of my nav:
cranium.onPress = function() {
with (_root.loadcontent) {
if (_currentframe == loadcontent) {
_root.targetx = -280;
_root.slide.gotoAndPlay(“move”);
} else {
with (_root.loadcontent) {
gotoAndPlay(“firstload”);
}
}
}
};
Here’s the clitch.
Now, everytime I press this particular button, it will play the animation (firstload) rather than just progressing and doing the part in the ‘if’ section. What did I do wrong?