# 10x10=97,65625

**URL:** <https://forum.kirupa.com/t/10x10-97-65625/102159>\
**Category:** Uncategorized\
**Created:** [February 20, 2004, 10:22am UTC](https://forum.kirupa.com/t/10x10-97-65625/102159 "2004-02-20T10:22:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_4\_Cologne](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@Alex\_4\_Cologne](https://forum.kirupa.com/u/Alex_4_Cologne)\
**Post date:** [February 20, 2004, 10:22am UTC](https://forum.kirupa.com/t/10x10-97-65625/102159/1 "2004-02-20T10:22:36Z")

</div>

No joke, this is what my PC tells me for an \_alpha value. It starts with 0 and is increased by 10 10 times (10x10=100), but the \_alpha is not 100% after that, that’s for sure. So can somebody tell me why a calculator ist calculating wrong? Would really interest me! 😏

“alf” just gives me the \_alpha value in a dynamic textfield.  
“att” ist for control if the step var causes the problem =\> it does not.

```auto

// customize
fps = 20;
fadeLength = 0.5; // seconds

// init
i = 0;
length = fps * fadeLength;
step = 100 / length;
att = 0;
_root.pic1.loadMovie("pic1.jpg", "pic0", 1);

// load
function loadPic(newPic) {
	_root.pic2._alpha = 0;
	_root.pic2.loadMovie("pic"+newPic+".jpg", "pic2", 2);
	_root.onEnterFrame = function() {
		_root.pic2._alpha += step;
		alf = _root.pic2._alpha;
		att += step;
		i++;
		if(i >= length) {
			_root.onEnterFrame = function() {
				oldPic = newPic;
				_root.pic1.loadMovie("pic"+oldPic+".jpg", "pic1", 1);
				_root.onEnterFrame = function() {};
				i = 0;
			}
		}
	}
}
_root.nav.btn1.onPress = function() {
	loadPic(1);
}
_root.nav.btn2.onPress = function() {
	loadPic(2);
}
_root.nav.btn3.onPress = function() {
	loadPic(3);
}

```

---

<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:** [February 20, 2004, 5:34pm UTC](https://forum.kirupa.com/t/10x10-97-65625/102159/2 "2004-02-20T17:34:41Z")

</div>

If someone wants the \*.fla just ask me…

---

<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:** [February 20, 2004, 7:38pm UTC](https://forum.kirupa.com/t/10x10-97-65625/102159/3 "2004-02-20T19:38:36Z")

</div>

The value you got for the alpha property is correct.

```auto
pic._alpha = 0;
onEnterFrame = function () {
	pic._alpha += 10;
	alf = pic._alpha;//alf will not return 10 -> 20 -> 30.. as you expect
};

```

I cant explain why it happens though.  
What you could do is use a variable to help here:

```auto
pic.alpha = 0;
onEnterFrame = function () {
	pic.alpha += 10;
	pic._alpha = pic.alpha;
	alf = pic.alpha;//the alpha value will have the same value as the previous example, but alf will return 10 -> 20 -> 30 -> .... -> 100 
};

```

---

<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:** [February 20, 2004, 7:45pm UTC](https://forum.kirupa.com/t/10x10-97-65625/102159/4 "2004-02-20T19:45:55Z")

</div>

this is really wierd by flash, I’ve encountered the same problem many times…

and is it the same on Macs as on PCs ?  
same for all flash versions?  
if so, doesn’t someone know why it’s like this??? (I’d call it a bug, since it’s not acting like it should)

---

<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:** [February 24, 2004, 9:38am UTC](https://forum.kirupa.com/t/10x10-97-65625/102159/5 "2004-02-24T09:38:02Z")

</div>

thx claudio, this workaround should fix the problem

nonetheless - if anyone knows what this issue is about, plz tell us!
