dejo el codigo aqui por si all jente que le pueda servir:
[b]codigo del MC persona:
creamos 2 text llamados dadesy y dadesx que nos detectaran los datos de la persona.
creamos las paredes que ceramos.
creamos un MC llamado persona[/b]
a la persona ponemos:
onClipEvent (enterFrame) {
var velositatterra:Number = 15
var velositat:Number = 10
if(Key.isDown(Key.DOWN)){
this._y += velositatterra
this._parent.terra._y -= velositatterra
this.gotoAndStop("abaix")
}
if(Key.isDown(Key.UP)){
this._y -= velositat
this._parent.terra._y += velositatterra
this.gotoAndStop("adalt")
}
if(Key.isDown(Key.LEFT)){
this._parent.terra._x += velositatterra
this._x -= velositat
this.gotoAndStop("escerra")
}
if(Key.isDown(Key.RIGHT)){
this._parent.terra._x -= velositatterra
this._x += velositat
this.gotoAndStop("dreta")
}
if(Key.isDown(Key.ENTER)){
this._x += 30
this.gotoAndStop("dreta")
}
}
codigo de MC paredes:
onClipEvent (enterFrame) {
if(this._parent.persona.hitTest(this)){
this._parent.persona._y = this._parent.dadesy.text
this._parent.persona._x = this._parent.dadesx.text
}
}
CODIGO DEL TESORO:
onClipEvent (enterFrame) {
if(this._parent.persona.hitTest(this)){
this._parent.area._visible = true
this._y = this._parent.dadesy.text
this._x = this._parent.dadesx.text
}
}
onClipEvent (enterFrame) {
if(this._parent.area.hitTest(this)){
this._parent.fet._visible = true
}
}
codigo del mensaje:
onClipEvent (enterFrame) {
this._y -= 4
this._x -= 1
this._parent.dadesx.text = this._parent.persona._x
this._parent.dadesy.text = this._parent.persona._y
if(this.hitTest(this._parent.limitparla)){
this._y = this._parent.dadesy.text
this._x = this._parent.dadesx.text
this._visible = false
}
}
i por ultimo creamos el limitparla que quando mensaje topa con el desaparece i luego deja enviar mad.
espero que les alla servido

i les pediria que no copiaran que estudiaran...