# Dissolve

**URL:** <https://forum.kirupa.com/t/dissolve/25219>\
**Category:** Uncategorized\
**Created:** [July 10, 2003, 4:53pm UTC](https://forum.kirupa.com/t/dissolve/25219 "2003-07-10T16:53:26Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neo\_Geo](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@Neo\_Geo](https://forum.kirupa.com/u/Neo_Geo)\
**Post date:** [July 10, 2003, 4:53pm UTC](https://forum.kirupa.com/t/dissolve/25219/1 "2003-07-10T16:53:26Z")

</div>

does anyone know how to do the dissolve box effect using actionscript?  
random box appear until the big box is full

i made this using frame by frame, but its kind of big in size compare if it can be done using AS.

---

<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 10, 2003, 9:04pm UTC](https://forum.kirupa.com/t/dissolve/25219/2 "2003-07-10T21:04:47Z")

</div>

well, i’m not the greatest with actionscript, but i found something that might do a similar purpose. [http://www.levitated.net/daily/levBoxFitting.html](http://www.levitated.net/daily/levBoxFitting.html) download the fla and play around with the action script till you get what you want

---

<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 11, 2003, 12:12am UTC](https://forum.kirupa.com/t/dissolve/25219/3 "2003-07-11T00:12:11Z")

</div>

umm. yea thers a what to do this  
let me think im kind of new too flash  
but  
you could like Make an MC thats a square then link it for actionscripting  
then like put a code in like this  
(its not tested)  
[AS]  
onEnterFrame=function(){  
num++;  
Mc=attachMovie(“square”,“square”+num,num);  
Mc.\_x=Math.round(Math.random()\*boxwidth/squaresize)\*squaresize;  
Mc.\_y=Math.round(Math.random()\*boxheight/squaresize)\*squaresize;  
/_boxwidth and height are the size of tha area you what to put your MC in and square size  
is like the leangth of your square_/  
};  
[/AS]  
umm you would also what to put some hittest function in there so the MC wont stack up on top of each other

---

<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 11, 2003, 12:17am UTC](https://forum.kirupa.com/t/dissolve/25219/4 "2003-07-11T00:17:44Z")

</div>

is this like sothing you wanted???

---

<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 11, 2003, 1:01am UTC](https://forum.kirupa.com/t/dissolve/25219/5 "2003-07-11T01:01:10Z")

</div>

Maybe this?  
It draws a 10x10 squares board using a 20x20 square.  
:-\

---

<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 11, 2003, 1:17am UTC](https://forum.kirupa.com/t/dissolve/25219/6 "2003-07-11T01:17:53Z")

</div>

thats preety much the same thing as mine but  
you dont want to waste processing power by stacking  
MC on top of each other i would help with that  
,but im still trying to get a grasp of AS 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:** [July 11, 2003, 1:24am UTC](https://forum.kirupa.com/t/dissolve/25219/7 "2003-07-11T01:24:18Z")

</div>

> \*Originally posted by Booyaka \*  
> \*\*thats preety much the same thing as mine but  
> you dont want to waste processing power by stacking  
> MC on top of each other i would help with that  
> ,but im still trying to get a grasp of AS myself \*\*  
> I place **700** boxes on stage while yours uses **2200, and keeps looping.**

:q: :q:

---

<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 11, 2003, 1:29am UTC](https://forum.kirupa.com/t/dissolve/25219/8 "2003-07-11T01:29:00Z")

</div>

hey i said it was preety much the same not exacttly

---

<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 11, 2003, 1:33am UTC](https://forum.kirupa.com/t/dissolve/25219/9 "2003-07-11T01:33:59Z")

</div>

I didnt get your “you dont want to waste processing power by stacking MC on top of each other”, since im using only 700 boxes and yours is a never ending looping. I think mine is less precessor intensive. :-  
Im sure theres a better way to use less boxes, but right now im stucked.

---

<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 11, 2003, 1:36am UTC](https://forum.kirupa.com/t/dissolve/25219/10 "2003-07-11T01:36:42Z")

</div>

yours is less prcessor intensive  
i agreee with that i lose you winn :A+:

---

<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 11, 2003, 7:02am UTC](https://forum.kirupa.com/t/dissolve/25219/11 "2003-07-11T07:02:40Z")

</div>

thanks… both of you really helps me. there’s no win or lose here. we learn from each other. i think the two files answered my question completely.  
Thanks again!

another flashers might want to improve 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 12, 2003, 6:20am UTC](https://forum.kirupa.com/t/dissolve/25219/12 "2003-07-12T06:20:06Z")

</div>

hey i got some help (marshdabeachy helped me  
on the bit-101 forums)  
heres the code  
[AS]slots = [];  
for (var x=0; x\<12; x++) {  
for (var y=0; y\<8; y++) {  
slots.push({x:x, y:y});  
}  
}  
depth = 0;  
onEnterFrame=function(){  
var toUse = Math.floor(Math.random()_slots.length);  
var s = attachMovie(“square”, “square”+depth, depth);  
s.\_alpha = 50;  
s.\_x = slots[toUse].x_50;  
s.\_y = slots[toUse].y\*50;  
slots.splice(toUse, 1);  
depth++;  
}; [/AS]
