avm1: Fix `MovieClipLoader` event arguments
The first argument of all events is the target MovieClip. It was incorrect. Also, `onLoadComplete` accepts an additional `httpStatus` argument. Stub it to 0.
This commit is contained in:
parent
e045a9502b
commit
8c736b9756
|
@ -399,7 +399,7 @@ impl<'gc> Loader<'gc> {
|
||||||
NEWEST_PLAYER_VERSION,
|
NEWEST_PLAYER_VERSION,
|
||||||
uc,
|
uc,
|
||||||
"broadcastMessage".into(),
|
"broadcastMessage".into(),
|
||||||
&["onLoadStart".into(), Value::Object(broadcaster)],
|
&["onLoadStart".into(), clip.object()],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -449,7 +449,7 @@ impl<'gc> Loader<'gc> {
|
||||||
"broadcastMessage".into(),
|
"broadcastMessage".into(),
|
||||||
&[
|
&[
|
||||||
"onLoadProgress".into(),
|
"onLoadProgress".into(),
|
||||||
Value::Object(broadcaster),
|
clip.object(),
|
||||||
length.into(),
|
length.into(),
|
||||||
length.into(),
|
length.into(),
|
||||||
],
|
],
|
||||||
|
@ -484,7 +484,8 @@ impl<'gc> Loader<'gc> {
|
||||||
NEWEST_PLAYER_VERSION,
|
NEWEST_PLAYER_VERSION,
|
||||||
uc,
|
uc,
|
||||||
"broadcastMessage".into(),
|
"broadcastMessage".into(),
|
||||||
&["onLoadComplete".into(), Value::Object(broadcaster)],
|
// TODO: Pass an actual httpStatus argument instead of 0.
|
||||||
|
&["onLoadComplete".into(), clip.object(), 0.into()],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -525,7 +526,7 @@ impl<'gc> Loader<'gc> {
|
||||||
"broadcastMessage".into(),
|
"broadcastMessage".into(),
|
||||||
&[
|
&[
|
||||||
"onLoadError".into(),
|
"onLoadError".into(),
|
||||||
Value::Object(broadcaster),
|
clip.object(),
|
||||||
"LoadNeverCompleted".into(),
|
"LoadNeverCompleted".into(),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue