# I give up! Some clues?

**URL:** https://forum.kirupa.com/t/i-give-up-some-clues/5138
**Category:** Uncategorized
**Created:** [September 2, 2002, 8:14pm UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138 "2002-09-02T20:14:48Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![fadingblack](https://avatars.discourse-cdn.com/v4/letter/f/48db29/32.png) [@fadingblack](https://forum.kirupa.com/u/fadingblack)
#### Post date: [September 2, 2002, 8:14pm UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/1 "2002-09-02T20:14:48Z")

</div>

I’ve been trying over and over again and i am not capable of makin code to work!! Damm, i’m even more numb for this than i thought. I want a movie clip to grow to a certain point and when it reaches it decrease till certain point, and grow again etc. But it has to answer to the movement of the mouse. And i can’t even make it grow and decrease. Please someone give me a hint… i’d love to develope something myself… not just copy-pasteThis shouldn’t be so complicated, right??. Is a challenge for me I HAVE TO BE CAPABLE!! 😉 (maybe i’m not ☹ )  
I have come to this, but is not working at all…

onClipEvent (load){  
i= i+1;  
this.\_xscale = i;  
this.\_yscale = i;  
}

onClipEvent (enterFrame){  
var x = \_xscale  
var y = \_yscale  
if (x\>=100) this.\_xscale = (x-1);  
if (y\>=100) this.\_yscale = (y-1);  
if (x\<= 10) this.\_xscale = (x+1);  
if (y\<= 10)this.\_yscale = (y+1);  
}

---

<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: [September 3, 2002, 2:20am UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/2 "2002-09-03T02:20:24Z")

</div>

well…check your if statements. Your syntax is incorrect. Since you dont’ want to copy and paste…

a few pointers…

take one thing at a time. It is a mistake to try to tackle all the code as once; especially if you’re just starting out.

use trace whenever possible. Trace is your friend.

Think about what you’re coding. (sound dumb? It’s not…) For example, when to use onClipEvent(load), instead of …(enterframe). The difference will make or break your code.

Post back when you’re ready…we’ll try to nudge you there.

---

<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: [September 3, 2002, 11:32am UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/3 "2002-09-03T11:32:53Z")

</div>

Hey, what’s wrong with the ifs? They look good to me.

A few things I find strange:

- sometimes you use this.\_xscale, sometimes you don’t.
- the load isn’t correct. The normal scale for an object is 100, so doind i=i+1 (i=1 would do the same) and then \_xscale=i makes the clip very very small
- the enterFrame looks good, but you shouldn’t use the variables x and y, work directly with \_xscale and \_yscale.

pom :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: [September 3, 2002, 12:07pm UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/4 "2002-09-03T12:07:44Z")

</div>

yes… actually they are correct… I am a dunce and somehow was looking at the wrong thing! Sorry… the rest stands true, however.

---

<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: [September 3, 2002, 12:17pm UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/5 "2002-09-03T12:17:14Z")

</div>

Ok, I’ll deal with this today and hopefully tonight I will have something to say… I’ll be happy of having found the correct code or I will be with my head in the bath tube flushing again and again  
😉 !!  
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: [September 3, 2002, 9:02pm UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/6 "2002-09-03T21:02:33Z")

</div>

I have half head in the tube bath… haven’t flushed yet 😛

Well, finally i manager to make it grow till 200, but it wouldn’t decrease… and i have no idea why, because i used the if’s whit trace and they do the tracin correctly, but when i change it to signs… doesn’t work… any new clues?? sure i’m obsesed with a stupid thing that is just in front of my face… :-\

Here is what i have:

onClipEvent (enterFrame){  
var ancho = this.\_xscale  
var alto = this.\_yscale  
if (ancho\>=200) this.\_xscale = ancho–;  
if (ancho\>= 10) this.\_xscale = alto++;  
if (alto\>=200) this.\_yscale = alto–;  
if (alto\>= 10)this.\_yscale = alto++;  
}

Thanks in advance…

I’ve been looking harder after I posted this for the first time…  
I guess I have a problem with the \>= and \<=, because they dont allow each other to work. Am I right?? But still havent found solution.  
:-\ ☹

---

<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: [September 3, 2002, 9:17pm UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/7 "2002-09-03T21:17:29Z")

</div>

Maybe it was an interesting question, too bad i couldn’t be bothered to check it out coz the title “says it all”…refering to that post in random…the guys so right!!

---

<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: [September 4, 2002, 2:17am UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/8 "2002-09-04T02:17:49Z")

</div>

I think I missed something because I dont see anything about the movement of the mouse. Wasn’t that part of what you were trying to do?

---

<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: [September 4, 2002, 11:37am UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/9 "2002-09-04T11:37:23Z")

</div>

Yes, you are right! But I thought i had to be capable to make it grow and decrease before messing with the mouse.  
Now i’m sure why is not decreasing or viceversa. If i say grow if \<=20 it does it but then i say decrease if \>=80 or if \<=80. In both cases this can’t happen because of the first if. Am I right on that point?? (god, explaining this in english can de harder than i thought! did i made myself understood?? :-\ )…  
I’m still struggling to find a way. I’m a bit stubborn 😉 and also must admit I was veeeeery bad at maths in school. So I guess my brains are no fit to that! he, he… I have to get them in good shape =)

Thanks a lot for your patience!!

---

<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: [September 4, 2002, 11:50am UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/10 "2002-09-04T11:50:49Z")

</div>

> \*Originally posted by fadingblack \*

```auto
onClipEvent (enterFrame){
  var ancho = this._xscale
  var alto = this._yscale
  if (ancho>=200) this._xscale = ancho--;
  if (ancho>= 10) this._xscale = alto++;
  if (alto>=200) this._yscale = alto--;
  if (alto>= 10)this._yscale = alto++;
}

```

There is a problem with your if tests, but not the one you mentionned. Let’s debug:  
Let’s say ancho=100.  
The first if returns false, nothing happens.  
The second if returns true, the thing grows.

Now if ancho=300:  
The first if returns true, the thing shrinks.  
The second if returns true, the thing grows.  
Result: Nothing happened.

Now you have to find how to fix that…

pom :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: [September 4, 2002, 11:52am UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/11 "2002-09-04T11:52:52Z")

</div>

Are you still working on this? If so, do you have a fla you can post?

---

<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: [September 4, 2002, 6:57pm UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/12 "2002-09-04T18:57:24Z")

</div>

Hi!  
Well, ilyaslamasse, i see what you mean by that… is more or less the thing i suspected when i said i had a problem with \>= and \<=… But i still cannot find a solution… He, he… this is begining to look like a game… “Follow the clues”, ha, ha…

Oh, and about having a .fla… well, i’m triying with a simple saquare, so i gues there is no need of a .fla, is just a plain movieclip…

Well, anyway, i wonder if I should use functions??? If so, I definately give up, because functions are too much for me for the moment.

I fell pretty silly, but at least I’ll keep on trying. 😉

---

<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: [September 5, 2002, 6:21am UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/13 "2002-09-05T06:21:38Z")

</div>

Nope, you can avoid functions. I think the best thing to do in that case is to take a piece of paper and check everything, a bit like I did.

And next clue: you might want to use a variable that will tell you if you’re growing or shrinking…

pom 😛

---

<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: [September 9, 2002, 11:43am UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/14 "2002-09-09T11:43:53Z")

</div>

Hi!, i’m only writting a few words just to let you know i’m still here! 🙂  
I have had no time to work on this in the last four days due to the job ( the real boring one you get paid for:-\ ) But i’m still thinking on this, ok? tomorrow you’ll heve some news from me again… thanks for the patience again =)

---

<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: [September 9, 2002, 4:55pm UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/15 "2002-09-09T16:55:41Z")

</div>

[http://www.dcs.napier.ac.uk/~bill/design\_tips51.htm](http://www.dcs.napier.ac.uk/~bill/design_tips51.htm)

I am interested in this too. We will figure this out:)

---

<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: [September 10, 2002, 12:24pm UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/16 "2002-09-10T12:24:49Z")

</div>

Ummm, after the post of toadclipper i’m even more puzzled tha before… still working on it. Let’s see if i can have a conclusion.

And I wonder Is this variable correct-possible-useful???

var = this.\_xscale++

:-\

---

<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: [September 13, 2002, 5:29pm UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/17 "2002-09-13T17:29:42Z")

</div>

So, that’s it! I really give up. ilyaslamasse, I guess i’ll have to stick to the copy-paste style ☹

I can only get the thing growing in one direction. I’m not made for coding (DAMM!)…

I’m in your hands peolple… any ideas, clues, solutions… my head is going to explode if i think about that one more time!..

---

<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: [September 14, 2002, 10:56am UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/18 "2002-09-14T10:56:40Z")

</div>

Do you want someone to do it for you? If so, can you explain EXACTLY what you want? (I’m getting old, sorry…)

pom :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: [September 14, 2002, 12:24pm UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/19 "2002-09-14T12:24:56Z")

</div>

Sure i’ll explain… the simple theory is that something grows to a certain point and then decreases to a certain point, etc… kinda loop, i guess.

Umm, now i’m thinking maybe i should hace tried a [COLOR=darkblue]while[/COLOR] action…

Don’t know.

Anyway, once i know how to do that i’ll try to find out a way to make it answer to the mouse movement. But now i fell really uncapable of making the thing grow and shrink myself :-\

---

<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: [September 14, 2002, 12:40pm UTC](https://forum.kirupa.com/t/i-give-up-some-clues/5138/20 "2002-09-14T12:40:53Z")

</div>

jeah, this is really interesting!!

If you find it I would like to know it too!

DidiusTheGreat

[Next page](https://forum.kirupa.com/t/i-give-up-some-clues/5138.md?page=2)
