Dynamic Movie Variable

Hello guys,

I am very much new to this forum.
This forum has helped me a lot in learning Flash AS 3.0.


AS 2.0 Code

subitem.id = 2; //dynamic movie clip variable
subitem.onRelease = function (){ // throw away function
trace(this.id); // 2
}

I want to do this using AS 3.0. Facing problems.

Please help.

Thanks in advance.