Okay the mousetrap over the top doesnt work. Find the new example here: http://www.mikecann.co.uk/DumpingGround/AS2_StrippedBare_MouseTrap.zip
Source output here: private function loadAdvert(advertURL:String) { // Make a mask for those naughty ads that dont mask var mask : MovieClip = _mc.createEmptyMovieClip("mask", _mc.getNextHighestDepth()); mask.beginFill(0, 255); mask.moveTo(0,0); mask.lineTo(_sizeWidth,0); mask.lineTo(_sizeWidth,_sizeHeight); mask.lineTo(0,_sizeHeight); mask.lineTo(0,0); mask.endFill(); _mc.setMask(mask); _adContainter = _mc.createEmptyMovieClip("container", _mc.getNextHighestDepth()); _adContainter.loadMovie(advertURL); _adContainter.enabled = false; var mouseTrap : MovieClip = _mc.createEmptyMovieClip("mouseTrap", _mc.getNextHighestDepth()); mouseTrap.beginFill(0xFF0000, 255); mouseTrap.moveTo(0,0); mouseTrap.lineTo(_sizeWidth,0); mouseTrap.lineTo(_sizeWidth,_sizeHeight); mouseTrap.lineTo(0,_sizeHeight); mouseTrap.lineTo(0,0); mouseTrap.endFill(); mouseTrap._alpha = 50; mouseTrap.onMouseUp = Delegate.create(this, advertClickthrough); mouseTrap.onRelease = function() { } mouseTrap.onPress = function() { } mouseTrap.onMouseDown = function() { } mouseTrap.onMouseMove = function() { } } Ill now attempt to do an _enabled on the loaded clip by using MovieClipLoader instead of loadMovie() 2008/12/3 Glen Pike <[EMAIL PROTECTED]> > Hi, > > I think enabled only applies to the clip, not it's children. > > Glen > > > jonathan howe wrote: > >> I forget but doesn't the _mc.enabled property cascade downwards? So once >> loaded you could set the container for the loaded swf as enabled = >> false... >> ? >> >> On Wed, Dec 3, 2008 at 9:07 AM, mike cann <[EMAIL PROTECTED]> wrote: >> >> >> >>> Hello List, >>> >>> I have been forced to go back to AS2 recently for a work project and oh >>> my >>> is it annoying me. >>> >>> Part of the project I am writing a simple advertising loader, its >>> basically >>> just a swf that loads other swfs into it. >>> >>> The problem is that the adverts that are loaded in sometimes contain >>> clicks >>> within them so without access to the source code i need a method of >>> preventing those clicks from happening. >>> >>> To my knowledge this should be doable by implementing a cover over the >>> top >>> of the loaded swf with a onPress, onRelease etc functions defined >>> correct? >>> >>> Well for some reason this isnt happenining. >>> >>> See the source output below. You can download the project here: >>> http://www.mikecann.co.uk/DumpingGround/AS2_StrippedBare.zip >>> >>> >>> import flash.geom.Matrix; >>> import mx.controls.Loader; >>> import mx.utils.Delegate; >>> /** >>> * ... >>> * @author DefaultUser (Tools -> Custom Arguments...) >>> */ >>> class GJAdJacket >>> { >>> // Privates >>> private var _mc : MovieClip; >>> private var _adContainter : MovieClip; >>> private var _sizeWidth:Number; >>> private var _sizeHeight:Number; >>> >>> public function GJAdJacket(attachToMC:MovieClip) >>> { >>> // The MC we are to attach to >>> _mc = attachToMC; >>> >>> // Set the stage scale modes >>> Stage.scaleMode = "noScale"; >>> Stage.align = "TL"; >>> >>> // Init >>> _sizeWidth = 300; >>> _sizeHeight = 250; >>> loadAdvert(" >>> >>> >>> http://gjacket-images.adbureau.net/gjacket/_clientcreative/Eidos/BattleMail021208.swf >>> "); >>> } >>> >>> private function loadAdvert(advertURL:String) >>> { >>> // Make a mask for those naughty ads that dont mask >>> var mask : MovieClip = _mc.createEmptyMovieClip("mask", >>> _mc.getNextHighestDepth()); >>> mask.beginFill(0, 255); >>> mask.moveTo(0,0); >>> mask.lineTo(_sizeWidth,0); >>> mask.lineTo(_sizeWidth,_sizeHeight); >>> mask.lineTo(0,_sizeHeight); >>> mask.lineTo(0,0); >>> mask.endFill(); >>> _mc.setMask(mask); >>> >>> mask.onMouseUp = Delegate.create(this, advertClickthrough); >>> mask.onRelease = function() { } >>> mask.onPress = function() { } >>> mask.onMouseDown = function() { } >>> mask.onMouseMove = function() { } >>> >>> _adContainter = _mc.createEmptyMovieClip("container", >>> _mc.getNextHighestDepth()); >>> _adContainter.loadMovie(advertURL); >>> } >>> >>> public function advertClickthrough() >>> { >>> getURL("http://www.google.com", "_blank") >>> } >>> } >>> >>> >>> Cheers. >>> >>> -- >>> Mike Cann >>> http://www.mikecann.co.uk/ >>> http://www.artificialgames.co.uk/ >>> _______________________________________________ >>> Flashcoders mailing list >>> Flashcoders@chattyfig.figleaf.com >>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >>> >>> >>> >> >> >> >> >> > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > -- Mike Cann http://www.mikecann.co.uk/ http://www.artificialgames.co.uk/ _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders