Commit Graph

3827 Commits

Author SHA1 Message Date
dependabot[bot] 8d7000cd67 build(deps): bump syn from 1.0.86 to 1.0.87
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.86 to 1.0.87.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.86...1.0.87)

---
updated-dependencies:
- dependency-name: syn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 22:26:58 +02:00
relrelb f8f2764ac7 chore: Stop using traits available in prelude
This commit does the same as 36353df7f7,
cleaning up any leftovers and new code added since.
2022-03-14 01:16:00 +02:00
relrelb 9c9335dbb8 core: Small cleanup in `Font::measure` 2022-03-13 19:11:06 +02:00
relrelb 3d08f31fa7 avm1: Correct `StageObject::get_level_by_path`
Resolving `_levelN` had some inconsistencies with Flash:
1. `_flash` can be a prefix too.
2. The level ID parsing cannot fail; non-digit characters are ignored,
the value wraps around at `i32::MAX`, and negative values are valid.

This logic is relevant also for the `GetUrl` and `GetUrl2` opcodes.
For now only add TODOs for this.
2022-03-12 16:48:55 +02:00
relrelb b59638935f xml: Remove constant `process_entity` parameter 2022-03-12 16:11:39 +02:00
Aaron Hill 3bcb409bd8 Add more AVM2 'flash.' class stubs
This PR adds the following class stubs:

* 'flash.display.Loader'
* 'flash.net.URLRequest'
* 'flash.ui.Keyboard'
* 'flash.utils.Timer'

These are needed for 'This is the Only Level TOO' (though we'll need
actual implementations to get this game past the loading screen).
2022-03-12 15:09:41 +01:00
relrelb b0a73d5638 avm1: Remove `TransformObject::construct`
`constructor` in `core/src/avm1/globals/transform.rs` should do
the same, as in other built-in classes.
2022-03-12 15:59:05 +02:00
relrelb 5a1e417526 avm1: Simplify `TDisplayObject::avm1_root()`
Make it infailable.
2022-03-10 01:22:52 +02:00
dependabot[bot] 71758be08b build(deps): bump png from 0.17.4 to 0.17.5
Bumps [png](https://github.com/image-rs/image-png) from 0.17.4 to 0.17.5.
- [Release notes](https://github.com/image-rs/image-png/releases)
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image-png/compare/v0.17.4...v0.17.5)

---
updated-dependencies:
- dependency-name: png
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 23:59:02 +02:00
Aaron Hill f4bb6fc43c Change property definition from `loaderUrl` to `loaderURL`
The actual property name is `loaderURL` - it looks like
a typo was made when this was originally defined in Ruffle.
2022-03-07 09:24:01 +02:00
relrelb 88f6856723 avm1: Fix `isFinite()` for SWF<7
Previously, `isFinite()` with no arguments on SWF<7 incorrectly
returned `true`, as `undefined` coerced to `f64` is `0.0`, which
is finite. Fix this by not defaulting to `undefined`, similarly to
the `isNaN()` implementation.
2022-03-06 23:15:18 +01:00
Aaron Hill 8d58c6974c Display `Muliname` when trying to lookup a non-public property
This will make these errors easier to debug.
2022-03-06 22:56:23 +01:00
Aaron Hill 4a534086b8 Make `Date` class prototype methods non-enumerable 2022-03-06 22:48:15 +01:00
Aaron Hill 2d1b3a2834 Also declare Date methods on class prototype 2022-03-06 22:48:15 +01:00
Aaron Hill 59ef987210 Declare AVM2 'Date' class methods in the AS3 namespace
We now declare these methods in the 'http://adobe.com/AS3/2006/builtin'
namespace. This corresponds to the 'AS3' namespace modifier shown on the
docs page: https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Date.html

Previously, we would fail to lookup these methods, since the namespace
used by the SWF would not match the namespace defined by Ruffle.
2022-03-06 22:48:15 +01:00
relrelb 26f3d1e321 avm1: Fix typo 2022-03-06 23:10:09 +02:00
relrelb d0edffaed3 avm1: Remove unneeded `pub` 2022-03-06 23:10:09 +02:00
relrelb 6504dc8ffc avm1: Simplify `MovieClip::get_bounds`
The String and Object cases are already handled by `resolve_target_display_object`.
2022-03-06 23:10:09 +02:00
relrelb 2faabfb58e xml: Remove `Error`
Directly use `quick_xml::Error` instead.
2022-03-02 08:56:23 +02:00
relrelb e901999b4c xml: Silently fail in `insert_child`
Instead of returning a `Result` which is anyway always handled with
a `log::warn!()`, simply `log::warn!()` in place of errors. This
removes the last 3 remaining `Error` enum members besides `InvalidXml`.
2022-03-01 19:56:36 +02:00
relrelb 48d0737cd9 xml: Inline `adopt_child` into `insert_child`
There's no point in calling `adopt_child` alone. This makes 2 `Error`
enum members redundant.
2022-03-01 19:56:36 +02:00
Toad06 dcca61073b core: Display the appropriate mouse cursor after interacting with a button 2022-02-28 15:28:18 -07:00
dependabot[bot] b5f65463b6 build(deps): bump png from 0.17.3 to 0.17.4
Bumps [png](https://github.com/image-rs/image-png) from 0.17.3 to 0.17.4.
- [Release notes](https://github.com/image-rs/image-png/releases)
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image-png/commits)

---
updated-dependencies:
- dependency-name: png
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 22:31:11 +02:00
relrelb 7313913127 xml: Turn `remove_child` into `remove_node`
The 2 existing usages of `remove_node` always operated on a child and
its parent: One iterates over all of its children and removes each one,
and the other explicitly grabs the parent of a given node.

As a simplification, `remove_node` operates only on a child node,
without the need for the parent node in addition; it grabs the parent
from the child by itself. As such, it's non-failable.
2022-02-28 08:34:16 +02:00
relrelb 73c1be8dcc xml: Remove `Error::TextNodeCantHaveChildren`
Text nodes are guaranteed to not be parents, as `adopt_child`
refuses to adopt children into them. So instead of returning an
`Err(Error::TextNodeCantHaveChildren)` in case of a text node parent,
mark those code paths as `unreachable!()`. This makes `orphan_child`
non-failable.
2022-02-28 08:34:16 +02:00
Toad06 66c132017f avm1: Allow strings in `new Sound(target)` 2022-02-28 08:30:38 +02:00
relrelb 0401b3c447 avm2: Replace `json` with `serde_json`
The `json` crate seems unmaintained, and recently also causes compile
errors with stable Rust 1.59.0. On the other hand, `serde_json` is
very maintained and more popular.

However, from some reason a cyclic package dependency has introduced
by this change. For now use a workaround from: https://github.com/tkaitchuck/aHash/issues/95#issuecomment-903560879
2022-02-27 23:19:46 +02:00
relrelb fa459f7547 core: Require `serde` feature
Enable it unconditionally as a preparation for depending on `serde_json`,
which will need `serde::Serialize`.
2022-02-27 23:19:46 +02:00
relrelb 841d0f7efd avm1: Remove legacy JSON SharedObject deserialization
This is basically a revert of 61298b2be3.

`SharedObject`s used to be saved as JSON in Ruffle, but since #4238
they're saved in AMF to match Flash's behavior. The legacy JSON
deserialization remained for backwards-compatibility, but from what it
seems, it has never worked; cd1cde1708
changed `LocalStorageBackend` to store base64-encoded strings instead
of plain ones. Therefore, Ruffle attempts to base64-decode old JSON
data, and unsurprisingly fails.

In addition, this removes 1 out of 2 usages of the unmaintained `json`
crate, which recently also causes compile errors with stable Rust 1.59.0.
2022-02-27 23:19:46 +02:00
relrelb b645c01ce7 xml: Silently fail in `disown_parent`
Instead of returning a `Result` which is anyway always handled with
a `log::warn!()`, simply `log::warn!()` in place of error.
2022-02-24 18:02:52 +02:00
relrelb f7117824df xml: Silently fail in `set_{prev,next}_sibling`
Instead of returning a `Result` which is anyway always handled with
a `log::warn!()`, simply `log::warn!()` in place of errors.
2022-02-23 22:45:07 +02:00
relrelb ce6e90c027 avm1: Store `status` in `XmlObject`, instead of `ParseError`
The only use of `last_parse_error` was in the `XML.prototype.status`
property, where it was converted into a number. Avoid storing it by
storing just the number.
2022-02-21 23:21:14 +02:00
dependabot[bot] 40f356a385 build(deps): bump rand from 0.8.4 to 0.8.5
Bumps [rand](https://github.com/rust-random/rand) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/0.8.4...0.8.5)

---
updated-dependencies:
- dependency-name: rand
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 22:34:09 +02:00
Toad06 5e8d8cc4d1 avm1: Add `trace` to globals 2022-02-14 14:50:33 +02:00
relrelb faa1f3d6b4 avm1: Refactor `XmlNodeObject::from_xml_node`
Revert some of e50aea864b for an even
better approach - Remove `XmlNodeObject::empty_node` entirely by
making `XmlNodeObject::from_xml_node` a suitable alternative. That is,
being able to accept a custom `proto` like before.

Also, make it return an `XmlNodeObject` instead of an `Object`, and
add a few `.into()` where needed.
2022-02-14 12:15:39 +02:00
dependabot[bot] db888ad739 build(deps): bump png from 0.17.2 to 0.17.3
Bumps [png](https://github.com/image-rs/image-png) from 0.17.2 to 0.17.3.
- [Release notes](https://github.com/image-rs/image-png/releases)
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image-png/commits)

---
updated-dependencies:
- dependency-name: png
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-13 18:43:46 +02:00
relrelb dbddefb44d xml: Refactor `XmlNode::into_string`
* Don't use `quick_xml::Writer` for formatting the XML, being much
more simple.
* Return `WString` instead of `String`, reducing `to_utf8_lossy()`
calls except when the string needs to be escaped (attribute values
and text contents).
2022-02-13 18:11:50 +02:00
dependabot[bot] a3288fa20c build(deps): bump serde from 1.0.133 to 1.0.136
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.133 to 1.0.136.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.133...v1.0.136)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-13 18:10:43 +02:00
dependabot[bot] cc2df3e23c build(deps): bump syn from 1.0.85 to 1.0.86
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.85 to 1.0.86.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.85...1.0.86)

---
updated-dependencies:
- dependency-name: syn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-13 16:55:17 +01:00
dependabot[bot] 036218ed01 build(deps): bump jpeg-decoder from 0.2.1 to 0.2.2
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder) from 0.2.1 to 0.2.2.
- [Release notes](https://github.com/image-rs/jpeg-decoder/releases)
- [Changelog](https://github.com/image-rs/jpeg-decoder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/image-rs/jpeg-decoder/compare/v0.2.1...v0.2.2)

---
updated-dependencies:
- dependency-name: jpeg-decoder
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-13 16:47:13 +02:00
dependabot[bot] 5f630217c6 build(deps): bump smallvec from 1.7.0 to 1.8.0
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: smallvec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-13 16:46:59 +02:00
dependabot[bot] 281c080295 build(deps): bump symphonia from 0.4.0 to 0.5.0
Bumps [symphonia](https://github.com/pdeljanov/Symphonia) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/pdeljanov/Symphonia/releases)
- [Commits](https://github.com/pdeljanov/Symphonia/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: symphonia
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-13 16:13:44 +02:00
dependabot[bot] 3bef5cadf6 build(deps): bump quote from 1.0.14 to 1.0.15
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.14 to 1.0.15.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.14...1.0.15)

---
updated-dependencies:
- dependency-name: quote
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-13 15:45:11 +02:00
Jean Marchand 9969e0ce5a avm2: Fix invalid option 2022-02-12 23:35:32 +02:00
relrelb ad2b8ea007 avm1: Merge `XmlDocument` into `XmlObject`
As `XmlDocument` and `XmlObject` had 1-to-1 relation, and `XmlDocument`
is already tightly coupled with AVM1, there's no good reason for them
being separate objects.

This brings us one step closer towards an XML implementation hosted
completely in AVM1.

A future PR will merge `XmlNode` into `XmlNodeObject` in a similar
manner.
2022-02-11 19:08:02 +02:00
relrelb aee98d81c8 avm1: Fix nightly build error 2022-02-11 18:45:32 +02:00
relrelb 360ad90a85 avm1: Call sort function with a primitive `this`
This is now possible thanks to #6108.
2022-02-11 18:45:32 +02:00
Toad06 b15806d9c2 avm1: Remove `random` from globals 2022-02-11 00:55:13 +02:00
relrelb 44fd13c654 avm1: Fix builtins' attributes
Fixes #5827.
2022-02-10 19:42:05 +02:00
relrelb b6c7cc1ca3 core: Cleanup `Avm1ConstructorRegistry`
Instead of storing shared pointers to `Avm1ConstructorRegistry` in
`MovieLibrary`, access the `PropertyMap` directly, without an extra
abstraction.

Also, move the constructor registries to `Avm1`, for better
encapsulation.
2022-02-10 07:58:30 +02:00
Toad06 fff9cd1d63 avm1: Change cursor to arrow when the `enabled` property is set to false 2022-02-09 16:26:50 -08:00
TÖRÖK Attila ed0aa3758c core: Extend the embedded fake device font with more characters
By also embedding the "Basic Latin", "Latin I", and "Latin Extended A" sections.
2022-02-09 20:09:52 +01:00
relrelb 6c4a10792d avm1: Remove `XmlIdMapObject`
Use a bare `ScriptObject` instead.
2022-02-07 22:24:42 +02:00
relrelb e50aea864b xml: Simplify `XmlNodeObject::from_xml_node`
Since it's always called with the same prototype (`XMLNode.prototype`),
this can be pulled into the function itself, greatly simplifying it.
2022-02-07 22:24:42 +02:00
relrelb 79d5a0e326 avm1: Avoid some calls to `XmlNode::introduce_script_object`
Instead call `XmlNode::script_object`, which internally calls
`XmlNode::introduce_script_object`. This is a preparation for changing
the signature of `XmlNodeObject::from_xml_node`.
2022-02-07 22:24:42 +02:00
relrelb 7e32f7b85d xml: Remove `tests.rs`
These are already covered by the SWF tests.
2022-02-07 22:24:42 +02:00
Adrian Wielgosik 562a205f3d chore: clippy 2022-02-07 00:49:00 +01:00
Adrian Wielgosik 2c4b260a8c chore: cargo fmt 2022-02-07 00:49:00 +01:00
Adrian Wielgosik c67579e236 avm2: Implement Object() 2022-02-07 00:49:00 +01:00
Adrian Wielgosik 0004b9e58e avm2: Implement RegExp() 2022-02-07 00:49:00 +01:00
Adrian Wielgosik c8fe2fcfb2 avm2: Implement Namespace() stub 2022-02-07 00:49:00 +01:00
Adrian Wielgosik 8402f6637b avm2: Implement Vector.<T>(array_like) 2022-02-07 00:49:00 +01:00
Adrian Wielgosik db8aa42db9 avm2: Support custom Class() implementations 2022-02-07 00:49:00 +01:00
Fernando Karchiloff 0c853082dd core: Fix bullet append with box_count check 2022-02-06 20:52:04 +02:00
Fernando Karchiloff b7273e038c core: fix bullet append from html 2022-02-06 20:52:04 +02:00
relrelb 48c43b731e avm1: Remove unused `is_defined` 2022-02-05 13:43:19 +02:00
Toad06 83cc9dc308 avm1: Fire `onReleaseOutside` event even when the button is invisible 2022-01-30 14:08:47 -08:00
Mike Welsh 601918a998 core: Fix drawing API stroke rendering order (fix #3186) 2022-01-29 20:05:04 -08:00
Mike Welsh 705588a2ec core: Fix incorrect fill and stroke rendering order (fix #6129) 2022-01-29 20:05:04 -08:00
Mike Welsh 55da3cd7d0 chore: Add .cargo/config.toml for workspace-level lint config
Currently it is not directly possible to configure lints for the
entire workspace via TOML, which forced us to repeat `#![allow]`
blocks in each crate.

embark pointed out this workaround to configure lints at the
workspace level via RUSTFLAGS:

https://github.com/EmbarkStudios/rust-ecosystem/issues/22#issuecomment-947011395

Remove the common `#![allow]` blocks and switch to this method for
global lint config.

Temporarily allow `needless_borrow` lint, buggy pending this fix:
https://github.com/rust-lang/rust-clippy/pull/8355
2022-01-29 14:22:44 -08:00
relrelb 99b22b24dd avm1: Remove unused `FunctionObjectData::primitive` 2022-01-29 12:12:39 -08:00
Daniel Jacobs 1e5956c02a core: Fix get_text_format bullet return value 2022-01-27 22:35:18 -08:00
TÖRÖK Attila 43b21e5d4d chore: Bump approx to 0.5.1, remove clippy lint suppressions 2022-01-25 18:34:35 -08:00
Toad06 da50d44460 core: Fix detection of button events 2022-01-24 11:48:37 -08:00
Mike Welsh 354d7f0ce6 avm1: Remove unused `this` from `Scope::resolve` and `set` 2022-01-24 02:04:57 -08:00
Mike Welsh c35edaae82 avm1: Allow `this` to be `undefined`
Change `Activation::this` to be `Value` instead of `Object`.
2022-01-24 02:04:57 -08:00
Mike Welsh 9ccb3ac3e7 avm1: Fix coercion in string-object concatenation
Previously we called `toString` when concatenating a string to an
Object. However, Flash actually has more complex behavior, usually
calling both `valueOf` and `toString`. This is loosely based on
ToPrimitive/DefaultValue with no type hint in the ECMAScript spec.

 * Call `valueOf`.
  * If the result isn't a primitive, call `toString`.
  * If the result still isn't primitive, return `"[type Object]"`.
 * For Date objects in SWFv6 and higher, call `toString`.
  * If the result isn't a primitive, call `toString` (AVM1 bug?)
  * If it still isn't primitive, return `"[type Object]"`.
2022-01-23 17:19:09 -08:00
David Wendt 48f8515c03 core: `mouseEnabled` controls whether or not display objects are mouse-pickable 2022-01-22 19:58:32 -08:00
David Wendt 35cbed01fa docs: Better document the `ClipEvent` dispatch patterns. 2022-01-22 19:58:32 -08:00
David Wendt e5d9379740 core: Implement `mouseMove` event 2022-01-22 19:58:32 -08:00
David Wendt 6271d069d7 core: `Stage` should not include it's own transform in it's local/global matrix. 2022-01-22 19:58:32 -08:00
David Wendt c42984a990 avm2: Implement `MouseEvent.toString`.
This also rearranges some things about how we construct events, because `MouseEvent` has different defaults from `Event`. When we finally support parameter metadata on methods we should remove that code.

We also remove the `value_of` code on `EventObject` as that was a mistake. Events don't do anything special in there and I misinterpreted the test results the first time around.
2022-01-22 19:58:32 -08:00
David Wendt 880211c238 core: Implement the `doubleClick` event on objects that request it. 2022-01-22 19:58:32 -08:00
David Wendt eeea5ffea6 core: Issue `MouseWheel` events for AVM2. 2022-01-22 19:58:32 -08:00
David Wendt 87a9a543ba chore: Fix clippy lint on nightly 2022-01-22 19:58:32 -08:00
David Wendt 84d1d5aa76 core: Issue `mouseOver`, `mouseOut`, etc when dragging. 2022-01-22 19:58:32 -08:00
David Wendt 42b606d058 core: Issue `rollOver`, `rollOut`, `mouseOut`, and `mouseOver` events to AVM2. 2022-01-22 19:58:32 -08:00
David Wendt 353a5a78d6 core: Move `mouse_pick` and `mouse_cursor` to `InteractiveObject` as no non-interactive object implements them.
This also cascades into other places, ultimately resulting in more things being marked as `InteractiveObject`.
2022-01-22 19:58:32 -08:00
David Wendt d0ef15503c avm2: Store the last-hovered or currently-hovered object on the event that notifies the clip that the hover state has changed. 2022-01-22 19:58:32 -08:00
David Wendt f69206aaa2 core: Fire AVM2's `mouseUp` event on the correct object.
This requires adding another notion of mouse-release events to `ClipEvent`. We now have four:

 * `MouseUp` - the mouse was released, any object on the render list can handle this event ("anycast" event)
 * `MouseUpInside` - the mouse was released inside this display object, only the mouse-picked target of the event can handle it
 * `Release` - the mouse was released inside the last clicked display object
 * `ReleaseOutside` - the mouse was released outside the last clicked display object

For those keeping score at home, in AVM2, the valid progression of events is either...

 * On the same object, `mouseDown`, `mouseUp`, and `click`
 * On one object, `mouseDown`, then some mouse movement that takes the cursor out of the first object, then on another object `mouseUp`, and then finally the first object gets `releaseOutside`.
2022-01-22 19:58:32 -08:00
David Wendt 35f020f482 avm2: Allow `Stage` to receive button presses 2022-01-22 19:58:32 -08:00
David Wendt 9d4b222b29 core: AVM2 wants the same semantics as `Press`/`Release`, not `MouseDown`/`MouseUp`.
`MouseDown`/`MouseUp` are effectively broadcasts; they hit every movie clip that can accept them until one of them has a handler for it. AVM2 instead wants events that only apply to specific mouse-picked display objects, which means we need to use the Player-tracked events `Press`, `Release`, and `ReleaseOutside`. The only problem is that we also need to emit a `mouseUp` event on both `Release` and `ReleaseOutside`.
2022-01-22 19:58:32 -08:00
David Wendt f0ab17c979 core: AVM2 `MovieClip`s can accept mouse events without being in button mode.
This technically changes the meaning of `require_button_mode` slightly to something more like "accepts input".
2022-01-22 19:58:32 -08:00
David Wendt f56782c5c7 core: Movie clips do not have a hand cursor unless they are also in button mode. 2022-01-22 19:58:32 -08:00
David Wendt cbeb24f3f8 core: Implement forced button mode flag for AVM2. 2022-01-22 19:58:32 -08:00
David Wendt 7b6f8aef06 avm2: Implement `flash.events.EventPhase`. 2022-01-22 19:58:32 -08:00
David Wendt 6d02248ea5 core: Add a method to fire common `InteractiveObject` events into AVM2. 2022-01-22 19:58:32 -08:00
David Wendt 18b8b227a1 avm2: Add utility method for pulling mouse event data from current context 2022-01-22 19:58:32 -08:00
David Wendt c53130e940 avm2: Automatically select a given event's class based on it's data. 2022-01-22 19:58:32 -08:00
David Wendt ada093938e avm2: Expose `MouseEvent` as a system class. 2022-01-22 19:58:32 -08:00