# Explanation of A Specific Code & Its Application

**URL:** <https://forum.kirupa.com/t/explanation-of-a-specific-code-its-application/116472>\
**Category:** Uncategorized\
**Created:** [July 18, 2004, 7:54pm UTC](https://forum.kirupa.com/t/explanation-of-a-specific-code-its-application/116472 "2004-07-18T19:54:06Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![shogun8](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@shogun8](https://forum.kirupa.com/u/shogun8)\
**Post date:** [July 18, 2004, 7:54pm UTC](https://forum.kirupa.com/t/explanation-of-a-specific-code-its-application/116472/1 "2004-07-18T19:54:06Z")

</div>

BWH2 Responded to my thread about reseting a movie clip and he attatched this thread -\> [http://www.kirupaforum.com/forums/showthread.php?t=62491](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:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 11:45pm UTC](https://forum.kirupa.com/t/explanation-of-a-specific-code-its-application/116472/2 "2004-07-19T23:45:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 20, 2004, 12:29am UTC](https://forum.kirupa.com/t/explanation-of-a-specific-code-its-application/116472/3 "2004-07-20T00:29:15Z")

</div>

go ahead and e-mail it. [brian@haveri-media.com](mailto:brian@haveri-media.com)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 20, 2004, 2:26am UTC](https://forum.kirupa.com/t/explanation-of-a-specific-code-its-application/116472/4 "2004-07-20T02:26:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 20, 2004, 2:58am UTC](https://forum.kirupa.com/t/explanation-of-a-specific-code-its-application/116472/5 "2004-07-20T02:58:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 20, 2004, 3:15am UTC](https://forum.kirupa.com/t/explanation-of-a-specific-code-its-application/116472/6 "2004-07-20T03:15:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 20, 2004, 6:15am UTC](https://forum.kirupa.com/t/explanation-of-a-specific-code-its-application/116472/7 "2004-07-20T06:15:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 20, 2004, 6:17am UTC](https://forum.kirupa.com/t/explanation-of-a-specific-code-its-application/116472/8 "2004-07-20T06:17:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 22, 2004, 9:23am UTC](https://forum.kirupa.com/t/explanation-of-a-specific-code-its-application/116472/9 "2004-07-22T09:23:50Z")

</div>

> [@shogun8](#):
>
> bwh, the acutal, non deconstructed form of my site actually includes a .jpg background image and the menu items are text only. Is there a way I can eliminate the box around the text and just have the text without messing up the effect you achieved without using an mc?

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:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 23, 2004, 6:40pm UTC](https://forum.kirupa.com/t/explanation-of-a-specific-code-its-application/116472/10 "2004-07-23T18:40:49Z")

</div>

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:  
works.\_alpha=0;  
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):

onClipEvent(enterFrame){  
if(this.\_alpha!=0){  
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.  
works.\_alpha=1;  
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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2004, 2:48am UTC](https://forum.kirupa.com/t/explanation-of-a-specific-code-its-application/116472/11 "2004-07-24T02:48:05Z")

</div>

> [@shogun8](#):
>
> 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.

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

> [@shogun8](#):
>
> 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?

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2004, 7:09am UTC](https://forum.kirupa.com/t/explanation-of-a-specific-code-its-application/116472/12 "2004-07-24T07:09:38Z")

</div>

pls send to [situsindo@yahoo.com](mailto:situsindo@yahoo.com)
