Explanation of A Specific Code & Its Application

BWH2 Responded to my thread about reseting a movie clip and he attatched this thread -> http://www.kirupaforum.com/forums/showthread.php?t=62491 to help explain the included code and how it can be used to move an objects y and x coords in a movie. My question is, and this pertains to my thread (Reseting a Movie Clip); How do I modify the code so that when I click on a button it resets the original y coords of a button. I understand his “tutorial” of this but I am struggling to apply this to my problem. Any thoughts?
-shogun8 (the shogunate) :asian:

hmm I have hit a bit of a snag, It seems to want to glide upward automatically upon enter and I think this is because I can’t include the “button” code you have included- and I think this is due to the fact that my “buttons” are movie clips through and through. Do you have an email I can send my .fla to you to take a look at? Like I said its too big for the forums (its only 80kb tho). I think I am just putting something somewhere it shouldn’t be.

go ahead and e-mail it. [email protected]

If you check this first, it should be there by now. Anyway like I said I appreciate your help so far. This is a pretty important project for my architecture degree I need to prepare over the summer, so like I said, thanks. The site isn’t complete, and what I sent you is just a broke down version of it. Its just the menu right now, the rest I tore apart to make it more reasonable to send via email

wondering if it works when i put it together the work mc slide away please have a look

hmmm I can’t open your file. Is it mx? I have had this problem with someone else. rename it as something else and try again. I am open to anything right now. thanks

shogun8. i just decided to remake your file b/c having the buttons as mc’s screws things up and it’s messy. this should be fairly easy to understand, i think…

i wasn’t sure how you were doing the enter key thing, so i didn’t include that. but i told you how the AS would change if you did use it. let me know how it goes.

// edit, i forgot the button instance names. re-uploaded correct file a few minutes later.

gupps. unexpected file format. sure you aren’t using mx2004? i can’t remember if that’s the reason that appears.

if you’re not, just try posting your AS changes and such in here and i’ll look at it.

this fla used bwh2’s AS, but i didn’t use button, n the box around the text has gone. what do u think? :cons:

Alright this one is for both of you guys:
First of all, bwh. Okay now I understand the code that you gave me, but I think its a bit fragmented because I keep getting errros like “you can’t use onenterclip with a button, it has to be an mc”. Where I am putting the code in wrong. The other thing is, I don’t need to do a “hit enter to begin” I know it only works with the internal swf player in flash; so I am going to use a “click to enter”. In that case where to do I insert the onrelease at? With what bits of code? You said:

AS in main timeline so the MC’s and vuttons aren’t visible at start:
process._alpha=0; // do the rest of the mc’s like this
buttonworks._visible=false; // do the rest of the buttons like this
in the main timeline? what frame of what do I put those in? does the works._alpha=0; go to the first frame in the main time line for the mcs. And does the buttonworks._visible go to the first frame for the buttons in the main timeline, OR do you they remain grouped together?
Then you said:
Then in each MC (AS is the same in each MC):

this._alpha+=1; // make this number higher to speed up fade in

What frame of the motion tween do I put it on? The first? Does that carry throughout the clip or just between the first keyframe and the middle-between the tweens?
Then you said this about the on enter. Well Like I said I am not going to use the enter. So what do I use in this code- an onrelease? And where do I put it.
process._alpha=1; // go through all of the MC’s
buttonworks._visible=true; // do all the buttons like this.

Sorry if my questions seem tedious, Iam just a visual learner and have a hard time knowing what goes where in flash since there are so many levels to each layer/mc/button etc.

And as for you 40unregistered, great. I like your idea for my project. If you have an email address I can email my fla to, then I can show you what I am trying to do with that text and a larger transition in the beginning of my page. Maybe you can chip in and provide a second opinion. My fla is too big to post here, its about 120kb.

as it says, onClipEvent events can only be used for MC’s, not buttons. so always put those in buttons.

on(release), on(rollOver), and on(rollOut) apply to buttons. so you select a button, then go to the actions panel to insert the AS. you do not want to actually open up the symbol, just select it.

instead of trying to re-explain the AS, i just made the new fla. so take a look at the AS for the buttons, MC’s, and in the main timeline. i’m not going to be on vacation for a week, so i won’t be around. hopefully that works out for you.

pls send to [email protected]