That's where the handlers come in. When the movie clip (I'm assuming you'll use them, they are fantastic) detects a mouse clip on it and runs a function accessible to all components (aka on the frame and not inside a movieclip).
Quick example I whipped up to demo some techniques:
This goes on frame1
Code:
_global.clickstate=0
_global.comp1=null
_global.comp2=null
setvar = function(Comp,Var) {
//not yet, you figure it out xD
}
Click = function(Comp) {
if(_global.clickstate==0){
trace("Click1")
_global.clickstate=1
_global.comp1=Comp
}else if(_global.clickstate==1){
trace("Click2")
_global.clickstate=0
if(Comp!=_global.comp1){
trace("different components, linked!")
//do stuff, like organize a table with the two components
}else{
trace("same component, not linked.")
}
}
} This is for a new movie clip, make two or more if you want.
Code:
on (release) {
_root.Click(this._name)
} EDIT: I'm still evolving this example code to be more of what you want, I.E. having the component table of linked entries etc.
This is just a rough slice of an example.
Bookmarks