A filter is not applied if the resulting image exceeds 2880 pixels in width or height. If, for example, you zoom in on a large movie clip with a filter applied, the filter is turned off if the resulting image exceeds the limit of 2880 pixels.
You can use the MovieClip.scrollRect property. Basically that will “crop” the movie clip to get it under the 2880 size limit. It acts like a window that displays what’s inside a specified rectangle. Then, instead of actually moving the movie clip, you’ll move the x offset of the scrollRect (you’ll have to move it the opposite direction you would want the movie clip to move). sounds trickier than it is… If you keep the same set up you have, you can just use this script to get an idea of what I’m talking about:
[AS]// Motion Blur slider
//
stop();
import flash.filters.BlurFilter;
import flash.geom.Rectangle;
//
// Variables
//
var speed:Number = 1.8;
var numButtons:Number = 12;
var blFilter:BlurFilter = new BlurFilter(0, 0, 2);
var imgDist:Number = 305;
// masking scroll rectangle about the same size as the slider_mc
var mask:Rectangle = new Rectangle(0, 0, 283, 147);
slider_mc.images_mc.scrollRect = mask;
//
// Functions
//
function initButtons():Void {
for (var i = 0; i < numButtons; i++) {
var btn:MovieClip = this[“b” + i];
btn.targetx = (i * imgDist);
btn.onRelease = function() {
blurTo(slider_mc.images_mc, this.targetx);
};
}
}
function blurTo(mc:MovieClip, tx:Number):Void {
// common ease equation
mc.onEnterFrame = function() {
var dx:Number = tx - mask.x;
var blurAmount:Number = Math.abs(dx);
blFilter.blurX = blurAmount;
this.filters = [blFilter];
var movex:Number = dx / speed;
mask.x += movex;
this.scrollRect = mask;
if (Math.abs(tx - mask.x) < 1) {
delete this.onEnterFrame;
this.filters = null;
mask.x = tx;
this.scrollRect = mask;
}
};
}
//
// Begin
//
initButtons();[/AS]
Holy crap! Nice actionscripting there Devonair! Sorry that I’m not too good with AS and just a lonely designer trying to learn … but that was great, what you worked out there did exactly what I need! I think I mostly understand what you described … thanks again! :thumb: