Skip to content

Conversation

adrian17
Copy link
Collaborator

@adrian17 adrian17 commented Aug 6, 2025

This fixes issues with "Invalid PlaceObject type" in name, but only tested on #14745 .

TODO:

  • instead of context.avm2.stage_domain(), it should (I assume, need to check to be sure) use the domain from library of the swf this tag belongs to,
    • also, currently our SymbolClass registry can return a symbol from a different movie. Our SymbolClass registry being global is probably wrong, but it also sounds possible for a child SWF to register a Sprite subclass to parent's domain. Could check if FP supports this and make sure it works here too. One way would be to replace the "get the id from symbolclass" implementation by just let as3_stage_object = class.construct(activation, &[]);. and then get the DO from the AS3 object. (this can also be left unimplemented with just a stub log for the future :P )
    • PS just realized, it may be possible that this feature doesn't require SymbolClass at all, as in you just write class MySprite extends Sprite {} and the PlaceObject "just works"; if that's confirmed to be the case, the implementation will definitely need to be swapped out for class.construct().
  • check if there are more places than instantiate_child where we should respect the PlaceObject class name, then move the code outside of instantiate_child to some common function? (For example, currently this doesn't support PlaceObjectAction::Replace in fn place_object)
  • write some nicer way to communicate "this is a PlaceObjectAction::Place, but there's no id", my current solution is a hack (the magic number 65530). In fact, IMO it's kinda weird that instantiate_child takes a PlaceObject and the id (which comes from this PlaceObject) as a separate argument - maybe this could be refactored as a whole?

If someone wants to pick this up, just let me know, I'm not sure when I'd be able to continue this myself.

@Lord-McSweeney Lord-McSweeney added A-core Area: Core player, where no other category fits T-fix Type: Bug fix (in something that's supposed to work already) labels Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core player, where no other category fits T-fix Type: Bug fix (in something that's supposed to work already)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants