# \[as\] with dynamic boxes

**URL:** <https://forum.kirupa.com/t/as-with-dynamic-boxes/37781>\
**Category:** flash\
**Created:** [December 14, 2003, 9:24am UTC](https://forum.kirupa.com/t/as-with-dynamic-boxes/37781 "2003-12-14T09:24:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![minimalistik](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@minimalistik](https://forum.kirupa.com/u/minimalistik)\
**Post date:** [December 14, 2003, 9:24am UTC](https://forum.kirupa.com/t/as-with-dynamic-boxes/37781/1 "2003-12-14T09:24:44Z")

</div>

i have a dynamic box

- when you mouseover it, it hovers at your face
- when you click on it, it increases its size (length, width)

the problem is, i dont know how can you load an external mc into that space when you click on the box. (the box’s instance name is **“dbox”**.

here is the as attached to the box:

[AS]  
onClipEvent (enterFrame)  
{  
var speed = 4;  
var viscosity = 1.300000;  
difference = whld3 - this.\_width;  
xvelocity = (xvelocity + difference / speed) / viscosity;  
this.\_width = this.\_width + xvelocity;  
difference = hhld3 - this.\_height;  
yvelocity = (yvelocity + difference / speed) / viscosity;  
this.\_height = this.\_height + yvelocity;  
}

on (rollOver)  
{  
if (oneup == “no”)  
{  
\_global.whld1 = 143.200000;  
\_global.hhld1 = 87.500000;  
\_root.b1.\_x = xhld1;  
\_global.whld2 = 143.200000;  
\_global.hhld2 = 87.500000;  
\_root.b2.\_x = xhld2;  
\_global.whld3 = 143.200000;  
\_global.hhld3 = 87.500000;  
\_root.b3.\_x = xhld3;  
\_global.whld4 = 143.200000;  
\_global.hhld4 = 87.500000;  
\_root.b4.\_x = xhld4;  
\_global.whld5 = 143.200000;  
\_global.hhld5 = 87.500000;  
\_root.b5.\_x = xhld5;  
\_global.xhld = xhldog;  
if (last == “b1”)  
{  
\_root.nav1.gotoAndPlay(16);  
}  
else if (last == “b2”)  
{  
\_root.nav2.gotoAndPlay(16);  
}  
else if (last == “b4”)  
{  
\_root.nav4.gotoAndPlay(16);  
}  
else if (last == “b5”)  
{  
\_root.nav5.gotoAndPlay(16);  
} // end if  
\_global.last = “b3”;  
\_root.nav3.gotoAndPlay(2);  
\_global.whld3 = 163.200000;  
\_global.hhld3 = 107.500000;  
\_global.whld2 = 123.200000;  
\_root.b2.\_x = 239.600000;  
\_global.whld4 = 123.200000;  
\_root.b4.\_x = 528.100000;  
} // end if  
}

on (release)  
{  
if (oneup == “no”)  
{  
\_global.whld3 = 183.200000;  
\_global.hhld3 = 307.500000;  
\_global.whld2 = 103.200000;  
\_global.whld4 = 103.200000;  
\_root.nav3.gotoAndPlay(16);  
**\_root.dbox.loadMovie(“mc1.swf”);**

```
    _global.oneup = "yes3";

} // end if

```

}  
[/AS]

see the bolded as? would that be how you do it?  
I really need help with this because i want to persist myself finishing this.
