avm1: Actually unload movies when we get an empty URL in `GetURL2` and the target is a sprite.
This commit is contained in:
parent
8c53c9116f
commit
e73cdd7987
|
@ -1261,6 +1261,13 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> {
|
||||||
Cow::Borrowed(&url),
|
Cow::Borrowed(&url),
|
||||||
NavigationMethod::from_send_vars_method(swf_method),
|
NavigationMethod::from_send_vars_method(swf_method),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if url == "" {
|
||||||
|
//Blank URL on movie loads = unload!
|
||||||
|
if let Some(mut mc) = clip_target.as_movie_clip() {
|
||||||
|
mc.replace_with_movie(self.context.gc_context, None)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
let fetch = self.context.navigator.fetch(&url, opts);
|
let fetch = self.context.navigator.fetch(&url, opts);
|
||||||
let process = self.context.load_manager.load_movie_into_clip(
|
let process = self.context.load_manager.load_movie_into_clip(
|
||||||
self.context.player.clone().unwrap(),
|
self.context.player.clone().unwrap(),
|
||||||
|
@ -1271,6 +1278,7 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> {
|
||||||
);
|
);
|
||||||
self.context.navigator.spawn_future(process);
|
self.context.navigator.spawn_future(process);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return Ok(FrameControl::Continue);
|
return Ok(FrameControl::Continue);
|
||||||
} else if window_target.starts_with("_level") && url.len() > 6 {
|
} else if window_target.starts_with("_level") && url.len() > 6 {
|
||||||
|
|
Loading…
Reference in New Issue