Has anyone noticed how creating new instances of MovieClip (and probably other objects) in AIR causes some weird effects? If you use the Senocular method , capturing the object constructor and creating a new MovieClip instance, you will get a new MovieClip with 0 frames. I don’t want to draw the bitmapData of each frame into an array, does anyone have a suggestion to make a real duplicate of MovieClip? (i.e. not just a strong link).
I personally used flash.utils:
getQualifiedClassName(value:*):String
and
getDefinitionByName(name:String):Object
And instantiate using the Class object
, , Senocular , , , , , , - , .
-, getDefinition/getDefinitionByName/object contructor Adobe AIR (3.7, , ).
var movieClipShallow : MovieClip = loader.getMovieClip(url); var constructor: Class = (movieClipShallow as Object).constructor; var anotherInstance: MovieClip = new constructor();
movieClipShallow //numFrames/etc. anotherInstance
: (
Source: https://habr.com/ru/post/1703255/More articles:How to speed up Google AdSense download time and analytics? - performanceRedirect all IPs except these white ones - apacheMeaning of “match” in relation to regular expressions - terminologyA simple algebra question for the program I am writing - mathHelp me implement Blackjack in Python (updated) - pythonIs Objective-C 2.0 exception handling supported on platforms other than Mac OS X? - gccКак сортировать и отображать смешанные списки букв и цифр, как ожидают пользователи? - sqlImplement captcha in a stateless REST web service environment - .netAndroid BaseAdapter: position is not in reality? - androidSending and receiving data via USB port - windowsAll Articles