Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 04-15-2011, 03:09 AM   #1
ruz8118
Registered User
 
Join Date: Apr 2011
Posts: 1
Question Movie disappears when using filters

Hi,

I am creating an interactive canvas where a user can click on items (movie clips) in the canvas and the movie zooms in and displays the item.

The problem is when I add filters to these items some of them disappear in a minute or so.

here is the code:

public function setEffects(){
var BackValue = MovieClip(root).BackZ;
var halfChange = BackValue / 2;
var newBlur = 0
var ch = halfChange / 7;
var glowAlpha = 0;

if(MovieClip(root).singleton && !focusMe){
newBlur = 7;
glowAlpha = 0.8;
} else if(halfChange < this.z){
newBlur = Math.round((this.z - halfChange) / ch);
glowAlpha = 0.6;
} else {
newBlur = 0
}

autoUpdateEffects++;

if(autoUpdateEffects >= 50){
autoUpdateEffects = 0;

if(effectsMovement){
this.z++;
} else {
this.z--;
}
//trace("Updated effects: " + itemLocation.number + " " + itemLocation.array);

effectsMovement = !effectsMovement;
}

if(newBlur != blurEffect){
blurEffect = newBlur;

autoUpdateEffects = 0;

if(blurEffect != 0){
blur = new BlurFilter();
blur.blurX = newBlur;
blur.blurY = newBlur;
blur.quality = BitmapFilterQuality.LOW;

myGlowFilter = new GlowFilter;
myGlowFilter.color = 0xBA0A00;
myGlowFilter.alpha = glowAlpha;
myGlowFilter.blurX = 255;
myGlowFilter.blurY = 255;
myGlowFilter.inner = true;
myGlowFilter.quality = BitmapFilterQuality.LOW;

this.filters = [blur, myGlowFilter];

} else {
this.filters = [];
}
}
}

this is called on enter frame.

Does anyone have any ideas?
ruz8118 is offline   Reply With Quote
Old 04-15-2011, 06:24 AM   #2
xshanky
Registered User
 
Join Date: Jan 2009
Posts: 7
Default

Friend can you attach your fla (if not too confidential). It will make things much clearer.
xshanky is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:29 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.