Херувим
26.01.2012, 14:49
Был декомпилирован swf. Получен следующий класс
class localWidget
{
var initVars, _editorMode, _preloadCount, _loadThumbs, _loadPhotos, _loadVideos, _centerMedia, _maxSideLength, _mediaSameWidth, _mediaPressEvent, _mediaCallback, _thumbCallback, _totalLoaded, _mediaPointer, _totalUniqueMedia, _widgetStarted, _loadingMedia, _loadingThumb, _mediaArrayBuilt, _widgetPath, _wMedia, _dispWidth, _dispHeight, __get__preloadCount, __set__loadThumbs, __get__loadPhotos, __get__loadThumbs, __get__loadVideos, __get__centerMedia, __get__maxSideLength, __get__mediaSameWidth, __get__mediaCallback, __get__thumbCallback, __get__widgetStarted, __get__loadingMedia, __get__loadingThumb, __get__mediaPressEvent, _wType, _wTimestamp, _wVersion, _wTitle, _wWidth, _wHeight, parsePbwXml, _loc7, __set__centerMedia, __get__dispHeight, __get__dispWidth, __set__loadPhotos, __set__loadVideos, __set__loadingMedia, __set__loadingThumb, __set__maxSideLength, __set__mediaCallback, __set__mediaPressEvent, __set__mediaSameWidth, __set__preloadCount, __set__thumbCallback, __get__totalLoaded, __get__totalUniqueMedia, __get__wHeight, __get__wMedia, __get__wTimestamp, __get__wTitle, __get__wType, __get__wVersion, __get__wWidth, __set__widgetStarted;
function localWidget(thisWidth, thisHeight)
{
XML.prototype.ignoreWhite = true;
this.initVars(thisWidth, thisHeight);
} // End of the function
null[] = (Error)(_root.intervalArray) == null ? (null, throw _root.intervalArray, function (thisWidth, thisHeight)
{
try
{
_editorMode = _root.editorMode;
_preloadCount = 0;
_loadThumbs = false;
_loadPhotos = true;
_loadVideos = false;
_centerMedia = false;
_maxSideLength = 0;
_mediaSameWidth = false;
_mediaPressEvent = true;
_mediaCallback = null;
_thumbCallback = null;
_totalLoaded = 0;
_mediaPointer = -1;
_totalUniqueMedia = 0;
_widgetStarted = false;
_loadingMedia = false;
_loadingThumb = false;
_mediaArrayBuilt = false;
for (var _loc3 in _root.intervalArray)
{
if (_root.intervalArray[_loc3] != 0)
{
clearInterval(_root.intervalArray[_loc3]);
_root.intervalArray[_loc3] = 0;
} // end if
} // end of for...in
_widgetPath = _root._url.indexOf("file://") > -1 ? ("../widget_swfs/") : (_root.topDomain + "/pbwidgets/");
_wMedia = new Array();
if (_root.widget != undefined)
{
_root.widget.removeMovieClip();
} // end if
if (_root.maskMC != undefined)
{
_root.maskMC.removeMovieClip();
} // end if
if (_root.__OnEnterFrameBeacon != undefined)
{
_root.__OnEnterFrameBeacon.removeMovieClip();
} // end if
if (_root.descMC != undefined)
{
_root.descMC.removeMovieClip();
} // end if
if (!_root.pbwurl)
{
_root.pbwurl = "mywidget.pbw";
}
else
{
var _loc4 = "?nocache=" + Math.floor(Math.random() * 1000);
_root.pbwurl = _root.pbwurl + _loc4;
} // end else if
if (_root.pbwurl.indexOf(".photobucket.com") < 0)
{
_root.pbwurl = "mywidget.pbw";
} // end if
_dispWidth = thisWidth;
_dispHeight = thisHeight;
} // End of try
catch (error:Error)
{
} // End of catch
}) : (var error = (Error)(_root.intervalArray), "initVars");
function set preloadCount(thisValue)
{
_preloadCount = thisValue;
//return (this.preloadCount());
null;
} // End of the function
}
При попытке сборки с AS2.0 ругаеться на строку
null[] = (Error)(_root.intervalArray) == null ? (null, throw _root.intervalArray, function (thisWidth, thisHeight)
При попытке сборки с AS1.0 ошибок нету но класс не создаеться. Подскажите пожалуйста как можно заставить работать данный код или как его можно переписать.
class localWidget
{
var initVars, _editorMode, _preloadCount, _loadThumbs, _loadPhotos, _loadVideos, _centerMedia, _maxSideLength, _mediaSameWidth, _mediaPressEvent, _mediaCallback, _thumbCallback, _totalLoaded, _mediaPointer, _totalUniqueMedia, _widgetStarted, _loadingMedia, _loadingThumb, _mediaArrayBuilt, _widgetPath, _wMedia, _dispWidth, _dispHeight, __get__preloadCount, __set__loadThumbs, __get__loadPhotos, __get__loadThumbs, __get__loadVideos, __get__centerMedia, __get__maxSideLength, __get__mediaSameWidth, __get__mediaCallback, __get__thumbCallback, __get__widgetStarted, __get__loadingMedia, __get__loadingThumb, __get__mediaPressEvent, _wType, _wTimestamp, _wVersion, _wTitle, _wWidth, _wHeight, parsePbwXml, _loc7, __set__centerMedia, __get__dispHeight, __get__dispWidth, __set__loadPhotos, __set__loadVideos, __set__loadingMedia, __set__loadingThumb, __set__maxSideLength, __set__mediaCallback, __set__mediaPressEvent, __set__mediaSameWidth, __set__preloadCount, __set__thumbCallback, __get__totalLoaded, __get__totalUniqueMedia, __get__wHeight, __get__wMedia, __get__wTimestamp, __get__wTitle, __get__wType, __get__wVersion, __get__wWidth, __set__widgetStarted;
function localWidget(thisWidth, thisHeight)
{
XML.prototype.ignoreWhite = true;
this.initVars(thisWidth, thisHeight);
} // End of the function
null[] = (Error)(_root.intervalArray) == null ? (null, throw _root.intervalArray, function (thisWidth, thisHeight)
{
try
{
_editorMode = _root.editorMode;
_preloadCount = 0;
_loadThumbs = false;
_loadPhotos = true;
_loadVideos = false;
_centerMedia = false;
_maxSideLength = 0;
_mediaSameWidth = false;
_mediaPressEvent = true;
_mediaCallback = null;
_thumbCallback = null;
_totalLoaded = 0;
_mediaPointer = -1;
_totalUniqueMedia = 0;
_widgetStarted = false;
_loadingMedia = false;
_loadingThumb = false;
_mediaArrayBuilt = false;
for (var _loc3 in _root.intervalArray)
{
if (_root.intervalArray[_loc3] != 0)
{
clearInterval(_root.intervalArray[_loc3]);
_root.intervalArray[_loc3] = 0;
} // end if
} // end of for...in
_widgetPath = _root._url.indexOf("file://") > -1 ? ("../widget_swfs/") : (_root.topDomain + "/pbwidgets/");
_wMedia = new Array();
if (_root.widget != undefined)
{
_root.widget.removeMovieClip();
} // end if
if (_root.maskMC != undefined)
{
_root.maskMC.removeMovieClip();
} // end if
if (_root.__OnEnterFrameBeacon != undefined)
{
_root.__OnEnterFrameBeacon.removeMovieClip();
} // end if
if (_root.descMC != undefined)
{
_root.descMC.removeMovieClip();
} // end if
if (!_root.pbwurl)
{
_root.pbwurl = "mywidget.pbw";
}
else
{
var _loc4 = "?nocache=" + Math.floor(Math.random() * 1000);
_root.pbwurl = _root.pbwurl + _loc4;
} // end else if
if (_root.pbwurl.indexOf(".photobucket.com") < 0)
{
_root.pbwurl = "mywidget.pbw";
} // end if
_dispWidth = thisWidth;
_dispHeight = thisHeight;
} // End of try
catch (error:Error)
{
} // End of catch
}) : (var error = (Error)(_root.intervalArray), "initVars");
function set preloadCount(thisValue)
{
_preloadCount = thisValue;
//return (this.preloadCount());
null;
} // End of the function
}
При попытке сборки с AS2.0 ругаеться на строку
null[] = (Error)(_root.intervalArray) == null ? (null, throw _root.intervalArray, function (thisWidth, thisHeight)
При попытке сборки с AS1.0 ошибок нету но класс не создаеться. Подскажите пожалуйста как можно заставить работать данный код или как его можно переписать.