gashish85
14.02.2011, 12:41
Ребята! Профи! Помогите разобраться в чем ошибка?
Красным это ошибка - оранжев. - пояснение.
class SWFAddress
{
var _value;
static var _initInterval, onInit, onChange, onExternalChange, _queueInterval;
function SWFAddress()
{
} // End of the function
static function _initialize()
{
if (SWFAddress._availability)
{
try
{
_availability = Boolean(flash.external.ExternalInterface.call("function() { return (typeof SWFAddress != \"undefined\"); }"));
flash.external.ExternalInterface.addCallback("getSWFAddressValue", SWFAddress, function ()
{
return (_value);
});
flash.external.ExternalInterface.addCallback("setSWFAddressValue", SWFAddress, SWFAddress._setValue);
} // End of try
catch ()
{ \\Ошибка пишет - "Unexpected ')' encountered"\\
} // End of catch
} // end if
if (typeof(_level0.$swfaddress) != "undefined")
{
_value = _level0.$swfaddress;
_availability = true;
} // end if
_initInterval = setInterval(SWFAddress._check, 10);
return (true);
} // End of the function
static function _check()
{
if ((typeof(SWFAddress.onInit) == "function" || typeof(SWFAddress._dispatcher.__q_init) != "undefined") && !SWFAddress._init)
{
SWFAddress._setValueInit(SWFAddress._getValue());
_init = true;
} // end if
if (typeof(SWFAddress.onChange) == "function" || typeof(SWFAddress._dispatcher.__q_change) != "undefined" || typeof(SWFAddress.onExternalChange) == "function" || typeof(SWFAddress._dispatcher.__q_externalChange) != "undefined")
{
clearInterval(SWFAddress._initInterval);
_init = true;
SWFAddress._setValueInit(SWFAddress._getValue());
} // end if
} // End of the function
static function _strictCheck(value, force)
{
if (SWFAddress.getStrict())
{
if (force)
{
if (value.substr(0, 1) != "/")
{
value = "/" + value;
} // end if
}
else if (value == "")
{
value = "/";
} // end if
} // end else if
return (value);
} // End of the function
static function _getValue()
{
var _loc1;
var _loc2 = "null";
if (SWFAddress._availability)
{
_loc1 = String(flash.external.ExternalInterface.call("SWFAddress.getValue"));
_loc2 = String(flash.external.ExternalInterface.call("SWFAddress.getIds"));
} // end if
if (_loc2 == "undefined" || _loc2 == "null" || !SWFAddress._availability || SWFAddress._initChanged)
{
_loc1 = SWFAddress._value;
}
else if (_loc1 == "undefined" || _loc1 == "null")
{
_loc1 = "";
} // end else if
return (SWFAddress._strictCheck(_loc1 || "", false));
} // End of the function
static function _setValueInit(value)
{
_value = value;
if (!SWFAddress._init)
{
SWFAddress._dispatchEvent(SWFAddressEvent.INIT);
}
else
{
SWFAddress._dispatchEvent(SWFAddressEvent.CHANGE);
SWFAddress._dispatchEvent(SWFAddressEvent.EXTERNAL_CHANGE);
} // end else if
_initChange = true;
} // End of the function
static function _setValue(value)
{
if (value == "undefined" || value == "null")
{
value = "";
} // end if
if (SWFAddress._value == value && SWFAddress._init)
\\ОШИБКА ТАКОВА как и предъидущая последущие кроме последней - "The property being referenced does not have the static attribute."\\
{
return;
} // end if
if (!SWFAddress._initChange)
{
return;
} // end if
_value = value;
if (!SWFAddress._init)
{
_init = true;
if (typeof(SWFAddress.onInit) == "function" || typeof(SWFAddress._dispatcher.__q_init) != "undefined")
{
SWFAddress._dispatchEvent(SWFAddressEvent.INIT);
} // end if
} // end if
Красным это ошибка - оранжев. - пояснение.
class SWFAddress
{
var _value;
static var _initInterval, onInit, onChange, onExternalChange, _queueInterval;
function SWFAddress()
{
} // End of the function
static function _initialize()
{
if (SWFAddress._availability)
{
try
{
_availability = Boolean(flash.external.ExternalInterface.call("function() { return (typeof SWFAddress != \"undefined\"); }"));
flash.external.ExternalInterface.addCallback("getSWFAddressValue", SWFAddress, function ()
{
return (_value);
});
flash.external.ExternalInterface.addCallback("setSWFAddressValue", SWFAddress, SWFAddress._setValue);
} // End of try
catch ()
{ \\Ошибка пишет - "Unexpected ')' encountered"\\
} // End of catch
} // end if
if (typeof(_level0.$swfaddress) != "undefined")
{
_value = _level0.$swfaddress;
_availability = true;
} // end if
_initInterval = setInterval(SWFAddress._check, 10);
return (true);
} // End of the function
static function _check()
{
if ((typeof(SWFAddress.onInit) == "function" || typeof(SWFAddress._dispatcher.__q_init) != "undefined") && !SWFAddress._init)
{
SWFAddress._setValueInit(SWFAddress._getValue());
_init = true;
} // end if
if (typeof(SWFAddress.onChange) == "function" || typeof(SWFAddress._dispatcher.__q_change) != "undefined" || typeof(SWFAddress.onExternalChange) == "function" || typeof(SWFAddress._dispatcher.__q_externalChange) != "undefined")
{
clearInterval(SWFAddress._initInterval);
_init = true;
SWFAddress._setValueInit(SWFAddress._getValue());
} // end if
} // End of the function
static function _strictCheck(value, force)
{
if (SWFAddress.getStrict())
{
if (force)
{
if (value.substr(0, 1) != "/")
{
value = "/" + value;
} // end if
}
else if (value == "")
{
value = "/";
} // end if
} // end else if
return (value);
} // End of the function
static function _getValue()
{
var _loc1;
var _loc2 = "null";
if (SWFAddress._availability)
{
_loc1 = String(flash.external.ExternalInterface.call("SWFAddress.getValue"));
_loc2 = String(flash.external.ExternalInterface.call("SWFAddress.getIds"));
} // end if
if (_loc2 == "undefined" || _loc2 == "null" || !SWFAddress._availability || SWFAddress._initChanged)
{
_loc1 = SWFAddress._value;
}
else if (_loc1 == "undefined" || _loc1 == "null")
{
_loc1 = "";
} // end else if
return (SWFAddress._strictCheck(_loc1 || "", false));
} // End of the function
static function _setValueInit(value)
{
_value = value;
if (!SWFAddress._init)
{
SWFAddress._dispatchEvent(SWFAddressEvent.INIT);
}
else
{
SWFAddress._dispatchEvent(SWFAddressEvent.CHANGE);
SWFAddress._dispatchEvent(SWFAddressEvent.EXTERNAL_CHANGE);
} // end else if
_initChange = true;
} // End of the function
static function _setValue(value)
{
if (value == "undefined" || value == "null")
{
value = "";
} // end if
if (SWFAddress._value == value && SWFAddress._init)
\\ОШИБКА ТАКОВА как и предъидущая последущие кроме последней - "The property being referenced does not have the static attribute."\\
{
return;
} // end if
if (!SWFAddress._initChange)
{
return;
} // end if
_value = value;
if (!SWFAddress._init)
{
_init = true;
if (typeof(SWFAddress.onInit) == "function" || typeof(SWFAddress._dispatcher.__q_init) != "undefined")
{
SWFAddress._dispatchEvent(SWFAddressEvent.INIT);
} // end if
} // end if