Sloping bridge

How can I make a sloping bridge to my platform game?
Like >> http://www.flashkit.com/board/attachment.php?postid=2532410 << this.

Please help!

This is a code in one of the “Bridge-tiles”.

 onClipEvent (load) {
 f = 3;
}
onClipEvent (enterFrame) {
 if (this.hitTest(_root.player)) {
  if (f>0) {
   f -= 0.2;
   _y += f;
   _root.player._y += f;
  }
 } else if (f<3) {
  _y -= f;
  f += 0.2;
 }
}
 

But it don’t works perfectly…