Skip to content

Commit

Permalink
Only set the name property for display objects that have AS2 reflections
Browse files Browse the repository at this point in the history
Fixes parts of mozilla#471
  • Loading branch information
tschneidereit committed Oct 30, 2013
1 parent 7e7e020 commit 54ccce0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/flash/display/Sprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@ var SpriteDefinition = (function () {
}
}

if (name) {
// Only set the name property for display objects that have AS2
// reflections. Some SWFs contain AS2 names for things like Shapes.
if (name && this._getAS2Object && instance._getAS2Object) {
this._getAS2Object().asSetPublicProperty(name, instance._getAS2Object());
}
},
Expand Down

0 comments on commit 54ccce0

Please sign in to comment.