djcsdy / swfmill

Generate or decompile Adobe Flash SWF files using an XML dialect. Inspect and modify the XML by hand, or by using a built in XSLT processor.
http://www.swfmill.org/
GNU General Public License v2.0
131 stars 28 forks source link

Actions in buttons (still) not working in AS2 (0.3.2) #17

Open etrepum opened 12 years ago

etrepum commented 12 years ago

https://bugs.launchpad.net/swfmill/+bug/728591

This doesn't appear to be fixed, or it's just broken in a different way.

$ swfmill --version
swfmill 0.3.2

Comparing the flasm output.

Original:

  defineButton 40

    on overDownToOverUp
      push 0.0, 'this'
      getVariable
      push 'onClicked'
      callMethod
      pop
    end
  end // of defineButton 40

swfmauled by swfmill:

  defineButton 41

    on
      toggleQuality
      push 0.0, 'this'
      getVariable
      push 'onClicked'
      callMethod
      pop
    end
  end // of defineButton 41
djcsdy commented 12 years ago

It’s broken in a different way.

Can you provide a small example SWF that demonstrates the problem?

etrepum commented 12 years ago

http://dl.dropbox.com/u/13940/swfmill/button-gh17.zip

That SWF file does not round-trip correctly when pumped through swf2xml then xml2swf. The Makefile builds it and the .flm files for comparison. This is what the output looks like for me (note that I cut the middle out of the metadata section of the diff to make it readable here):

--- button-gh17.flm 2011-11-30 18:35:10.000000000 -0800
+++ button-gh17-derp.flm    2011-11-30 18:35:10.000000000 -0800
@@ -1,12 +1,12 @@
-movie 'button-gh17.swf' compressed // flash 11, total frames: 1, frame rate: 24 fps, 550x400 px
+movie 'button-gh17-derp.swf' compressed // flash 11, total frames: 1, frame rate: 24 fps, 550x400 px

   fileAttributes attrHasMetadata

-  metadata '<rdf:RDF […]</rdf:RDF> '
+  metadata '<?xml version="1.0"?>\n<rdf:RDF […]</rdf:RDF>\n'

   defineButton 2

-    on overDownToOverUp
+    on keyPress _END
       push 'retro ActionScript'
       trace
     end
djcsdy commented 12 years ago

OK, thanks, I’ll take a look.

xinwo commented 12 years ago

still does not work...

amiteshawa commented 12 years ago

do we have any patch available for this? buttons and actions dont work for me as well.

indraneel76 commented 11 years ago

It looks like this functionality is very critical for us . When can we expect a patch for this

kliu128 commented 9 years ago

I would really like for this to be fixed - I'd like to use swfmill, but with this bug I can't use it.

strk commented 8 years ago

I have a case of SWF4 button conditions not working: http://strk.keybit.net/tmp/alfy-havoc.swf (from https://savannah.gnu.org/bugs/?46607#comment12)

A round-trip from swf to xml and back to swf results in a broken file that never reacts to button actions