[transform-swf-updates] BUG, PATCH: DefineButton2 does not execute actions.
Brought to you by:
smackay
From: News on r. b. a. p. f. T. S. f. J. <tra...@li...> - 2010-10-15 14:34:29
|
### Eclipse Workspace Patch 1.0 #P transform-java-3-0 Index: src/main/java/com/flagstone/transform/button/DefineButton2.java =================================================================== --- src/main/java/com/flagstone/transform/button/DefineButton2.java (revision 351) +++ src/main/java/com/flagstone/transform/button/DefineButton2.java (working copy) @@ -214,12 +214,14 @@ } /** {@inheritDoc} */ - public int getIdentifier() { + @Override + public int getIdentifier() { return identifier; } /** {@inheritDoc} */ - public void setIdentifier(final int uid) { + @Override + public void setIdentifier(final int uid) { if ((uid < 1) || (uid > Coder.USHORT_MAX)) { throw new IllegalArgumentRangeException( 1, Coder.USHORT_MAX, uid); @@ -332,7 +334,8 @@ } /** {@inheritDoc} */ - public DefineButton2 copy() { + @Override + public DefineButton2 copy() { return new DefineButton2(this); } @@ -343,7 +346,8 @@ } /** {@inheritDoc} */ - public int prepareToEncode(final Context context) { + @Override + public int prepareToEncode(final Context context) { // CHECKSTYLE:OFF - Fixed length when encoded. context.put(Context.TYPE, MovieTypes.DEFINE_BUTTON_2); context.put(Context.TRANSPARENT, 1); @@ -357,7 +361,7 @@ if (events.isEmpty()) { offset = 0; } else { - offset = length - 7; + offset = length - 3; } EventHandler handler; @@ -386,7 +390,8 @@ } /** {@inheritDoc} */ - public void encode(final SWFEncoder coder, final Context context) + @Override + public void encode(final SWFEncoder coder, final Context context) throws IOException { context.put(Context.TYPE, MovieTypes.DEFINE_BUTTON_2); |