The code below fades three mc instances into each other. The movieclip instances are called, picture1_mc, picture2_mc,
picture3_mc. They are based on three bitmap images that also sit in the library. I manually converted the original
bitmaps into movieclips on the stage area. The fade code works fine, but what I would like to do is allow the user to
mouse click and cause a blur effect whilst the images are cycling along. My problem is that Im not sure how to apply
this within my mousedown function. The applyFilter method seems to call for bitmaps but I'm dealing with movieclips.
Thanks for any guidance
import flash.display.BitmapData;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.filters.BlurFilter;
var filter2:BlurFilter = new BlurFilter(Math.ceil(Math.random()*5), Math.ceil(Math.random()*5), 3);
init = function () {
currentIndex = 1;
currentLayer = 1;
howLongToWait = 0;
_root.attachMovie("picture1_mc", "pic1", 0);
addNewPic();
};
addNewPic = function () {
clearInterval(myInterval);
if (currentIndex%3 != 0) {
currentIndex++;
} else {
currentIndex = 1;
}
newlyAdded_mc = _root.attachMovie("picture"+currentIndex+"_mc", "pic"+currentIndex, currentLayer++);
newlyAdded_mc._alpha = 0;
newlyAdded_mc.onEnterFrame = function() {
this._alpha += 2;
if (this._alpha>=100) {
this.onEnterFrame = null;
myInterval = setInterval(addNewPic, howLongToWait*100);
}
};
};
// run init()
init();
onMouseDown = function ()
{
//problems here!!!!!!!!!
var pointoint = new Point(_root._xmouse, _root._ymouse);
var rec:Rectange = new Rectangle(100,100,6,6);
//problem applying filter
//????.applyFilter(?????,rect,point,filter2)
};
myListener = new Object();
Mouse.addListener(myListener);
picture3_mc. They are based on three bitmap images that also sit in the library. I manually converted the original
bitmaps into movieclips on the stage area. The fade code works fine, but what I would like to do is allow the user to
mouse click and cause a blur effect whilst the images are cycling along. My problem is that Im not sure how to apply
this within my mousedown function. The applyFilter method seems to call for bitmaps but I'm dealing with movieclips.
Thanks for any guidance
import flash.display.BitmapData;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.filters.BlurFilter;
var filter2:BlurFilter = new BlurFilter(Math.ceil(Math.random()*5), Math.ceil(Math.random()*5), 3);
init = function () {
currentIndex = 1;
currentLayer = 1;
howLongToWait = 0;
_root.attachMovie("picture1_mc", "pic1", 0);
addNewPic();
};
addNewPic = function () {
clearInterval(myInterval);
if (currentIndex%3 != 0) {
currentIndex++;
} else {
currentIndex = 1;
}
newlyAdded_mc = _root.attachMovie("picture"+currentIndex+"_mc", "pic"+currentIndex, currentLayer++);
newlyAdded_mc._alpha = 0;
newlyAdded_mc.onEnterFrame = function() {
this._alpha += 2;
if (this._alpha>=100) {
this.onEnterFrame = null;
myInterval = setInterval(addNewPic, howLongToWait*100);
}
};
};
// run init()
init();
onMouseDown = function ()
{
//problems here!!!!!!!!!
var pointoint = new Point(_root._xmouse, _root._ymouse);
var rec:Rectange = new Rectangle(100,100,6,6);
//problem applying filter
//????.applyFilter(?????,rect,point,filter2)
};
myListener = new Object();
Mouse.addListener(myListener);