avm1: Allow string paths in hitTest (fix #1559)
This commit is contained in:
parent
1674132b36
commit
4c01022a38
|
@ -138,11 +138,8 @@ pub fn hit_test<'gc>(
|
||||||
return Ok(ret.into());
|
return Ok(ret.into());
|
||||||
}
|
}
|
||||||
} else if args.len() == 1 {
|
} else if args.len() == 1 {
|
||||||
let other = args
|
let other = activation
|
||||||
.get(0)
|
.resolve_target_display_object(movie_clip.into(), args.get(0).unwrap().clone())?;
|
||||||
.unwrap()
|
|
||||||
.coerce_to_object(activation)
|
|
||||||
.as_display_object();
|
|
||||||
if let Some(other) = other {
|
if let Some(other) = other {
|
||||||
return Ok(other
|
return Ok(other
|
||||||
.world_bounds()
|
.world_bounds()
|
||||||
|
|
|
@ -66,3 +66,15 @@ true
|
||||||
// circle.hitTest(upper)
|
// circle.hitTest(upper)
|
||||||
true
|
true
|
||||||
|
|
||||||
|
// String path, below and to the right of the circle, overlapping only with BB.
|
||||||
|
// circle.hitTest('_root.lower')
|
||||||
|
true
|
||||||
|
|
||||||
|
// String path, above and to the right of the circle.
|
||||||
|
// circle.hitTest('../upper')
|
||||||
|
true
|
||||||
|
|
||||||
|
// String path, /
|
||||||
|
// circle.hitTest('/')
|
||||||
|
true
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue