ruffle icon indicating copy to clipboard operation
ruffle copied to clipboard

Instructions not showing up in game

Open Computerdude77 opened this issue 5 years ago • 3 comments

In the game Xtreme Super Modified Spoon Jumping, there is an issue with the instructions. When the game asks the player to start over, it also has an option to view the instructions. However, the button does nothing when clicked, instead of showing the instructions, which is showcased in the screenshots below. This was tested on the archive.org Ruffle and the web demo on Windows 10 Chrome 87, the web demo is on version 2021-01-13 at the time of writing this.

Original: flashplayer_32_sa_dveOeBTp1T

Ruffle: image

Computerdude77 avatar Jan 13 '21 05:01 Computerdude77

This is quite a strange issue. The Instructions button has the following code attached:

on(press){
   instructMC.transform("easeOutCubic",15,"_y",130);
}

This does not actually call MovieClip.transform because the game overrides this method with its own implementation:

MovieClip.prototype.transform = function(myTween, myDuration, myProperty, myValue)
{
   var _loc4_ = ++this.nextHighestDepth;
   var myController = this.createEmptyMovieClip("controller" + _loc4_,_loc4_);
   ...

Adding trace statements to the code above, we can see what happens after clicking the Instructions button in the debug Flash Player:

Calling instructMC.transform
Running MovieClip.prototype.transform

Yet in Ruffle, the game's MovieClip.prototype.transform code never runs:

Calling instructMC.transform

Here is the SWF with trace statements added: [trace]xtremeSpoonJumping.zip

n0samu avatar Oct 04 '22 05:10 n0samu

transform is a property that was added in SWFv8. This game is a SWFv6 file. The following code gives different results in Flash Player depending on the SWF version.

MovieClip.prototype.transform = function() {
   return "overriden transform";
};
_root.attachMovie("mc", "mc", _root.getNextHighestDepth());
trace(mc.transform());

In SWFv8+: undefined

In previous SWF versions: overriden transform


Property version checking was implemented in #6856, so maybe it would just require a few adjustments to fix this issue? It would be great to have @Herschel's thoughts on that. ;)

Toad06 avatar Mar 30 '23 23:03 Toad06

This also applies to other version-gated properties like scrollRect. Another way to reproduce this (with compiler targeting SWFv7):

MovieClip.prototype.scrollRect = "hello";
_root.createEmptyMovieClip("mc", _root.getNextHighestDepth());
trace(mc.scrollRect);

n0samu avatar Jan 21 '24 08:01 n0samu