Groups | Blog | Home
all groups > flash actionscript > september 2006 >

flash actionscript : attach movie clip


DMennenoh **AdobeCommunityExpert**
9/3/2006 7:20:50 PM
Not sure if this will help but: getNextHighestDepth() is not a standalone
method - it is a method of a MovieClip. You need something like:
this.getNextHighestDepth() instead.

--
Dave -
Adobe Community Expert
www.blurredistinction.com
http://www.adobe.com/communities/experts/

arkhon13
9/3/2006 11:42:52 PM
Hello i asked this in my another topic but that topic was mainly related with
another problem.

my question is;

i have 3x3 square boxes ( "box_mc"s movie clips duplicated from 1
"box" movie clip on stage)

I want to put a small box (that is movie clip "smallmc") in front of
bigger one(that is one of another mc "box_mc" already placed on stage). When i
click big box( i mean "box_mc") i want to attach an instance of "smallmc" in
front of big one.

i have this code in "box" mc ;
on (press) {
if (this.selected == 0) {
trace("box is selected");
selected = 1;

_root.attachMovie("smallmc","smallmc"+count,getNextHighestDepth(),{_x:this._x,
_y:this._y});
_root.count++;
trace(_root.count);
} else {
trace("unselected");
selected = 0;
_root.count--;
trace(_root.count);
}
}

but this code puts "smallmc" under "boxmc" :(( and 1 more problem ;

i have 3x3 big boxes; and when i click a "boxmc" it puts 1 smallmc then i
click another "boxmc" it puts "smallmc" but previous one dissappearing.(but
this is not prior problem i think first i should put small boxes in front of
big ones)

thank you for your all helps advices

arkhon13
9/4/2006 12:08:53 AM
arkhon13
9/4/2006 12:56:02 AM
arkhon13
9/4/2006 1:17:46 AM
oh i just thought that if i cant put small boxes on big ones may i change big
boxes' inside?
i mean that ; a big box is rectangle that has stroke and colored interior.
Could i change the color of this interior part of rectangle(not stroke) by
using code when i click this movie clip("box_mc")?
AddThis Social Bookmark Button