[mtasc] View Source and License
Ray Chuan
rctay89 at gmail.com
Thu Apr 21 14:11:13 CEST 2005
Hi,
recently saw article on adding entries to context menu. See:
http://www.markme.com/mesh/archives/007432.cfm
mtasc doesn't support include, so here's a hack:
==
class ViewFlashSrc {
static function init () {
var flashSource = _root.flashSource;
var contentLicense = _root.contentLicense;
var my_cm:ContextMenu
var fSourceIsDefined = (flashSource != undefined && flashSource != "");
var fLicenseIsDefined = (contentLicense != undefined && contentLicense != "");
_root.itemHandler = function(obj, item)
{
getURL(item.url);
}
if(fSourceIsDefined || fLicenseIsDefined)
{
my_cm = new ContextMenu(_root.menuHandler);
}
if(fSourceIsDefined)
{
var sourceMenuItem = new ContextMenuItem("View Source",
_root.itemHandler);
sourceMenuItem.url = flashSource;
my_cm.customItems.push(sourceMenuItem);
_root.menu = my_cm;
}
if(fLicenseIsDefined)
{
var licenseMenuItem = new ContextMenuItem("View License",
_root.itemHandler);
licenseMenuItem.url = contentLicense;
my_cm.customItems.push(licenseMenuItem);
_root.menu = my_cm;
}
}
}
==
The thing is, it doesn't work in swf runtime player. Any help?
More information about the mtasc
mailing list