Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Apply Website Transition Filter?



Hey I'm new to AS , so I was wondering how would I go at attempting this?On the website I'm building , I currently have it so when you click a link, it removes the current page and animates a new one, really simple, but how would I apply a filter transition? I downloaded a blur filter and installed it to flash cs3, so instead of just removing a page and motion tweening the new one, i would like to just do a motion blur tween between the current page, and the page clicked, how would I do that? This is my current code.Should I upload the .fla file?(EDIT) why wont it let me upload my code in CODE brackets? it gives me this error: You have included 5 images in your message. You are limited to using 4 images so please go back and correct the problem and then continue again.



ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 01-11-2009, 12:12 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Bitmapdata, Apply Filter To One Channel? Realease A Filter
Hi there, I have two question:

Is it possible to apply a filter only to one channel or to access only one channel?
I've found somewhere:
Display.BitmapData.Channel.ALPHA
Is it something we can access at runtime?


When I appply a filter to a Bitmapdata, the Bitmapdata isn't really modified but just filtered, so if for example I copy one of its channel to another bitmapdata, I copy the source bitmap without the filter...
What I'd like to do is "release" the filter so it definetely modify the image. Is it a function to do so or can I only perform this by doing a screenshot of my MovieClip?


Thank you inadvance for your help.

[F8] Apply Filter To Mc Drawn With Api
Obvioulsy I'm blind.... WHY is't this code working...??!!!!!


Code:
import flash.filters.GlowFilter;
this.createEmptyMovieClip("mc_line",1);
with ("mc_line"){
lineStyle(20, 0xd1bca3,100);
_root.moveTo(0, 160);
_root.lineTo(Stage.width, 160);

// glow on the line
var glow:GlowFilter = new GlowFilter(0x003a68, 0.5, 0, 10, 5, 10,true);
var myTempFilters:Array = mc_line.filters;
myTempFilters.push(glow);
mc_line.filters = myTempFilters;
}



I've tried the glow-on-the-line part inside and outside the with statement.
The glow-on-the-line part works fine if I put an instance of a movie clip on the stage but not as above...

Why?!

I'd be greatful for a hint in the right direction...

How To Apply More Than One Filter Via Script...
Hi all...
Like the topic says...

How can I apply two filters (ie. Glow and Blur) via script on the same MC?

Thanks...

Apply Filter @ Runtime
hi everybody.


I've got 4 dynamic TextFields inside a MovieClip.
on onRollOver I want to apply a DropShadowFilter to this MovieClip, and on onRollOut I want to remove the DropShadowFilter.

pretty simple task, I hope
..how do I do it?


here's my onRollOver and onRollOut-code:

ActionScript Code:
allContainer_mc.textHolder10.onRollOver = function(){
    trace("onRollOver");
}
//
allContainer_mc.textHolder10.onRollOut = function(){
    trace("onRollOut");
}



thanks

Change Color Then Apply Filter?
I have a simple circle movie clip in my library. The circle is green. I would like, at runtime, to change its color to blue, red, whatever. Then I want to apply a bevel filter to it.

The problem is that after I apply the color, the filter is ignored.

//First change color
var changeColor = new Color(mcCircle);
changeColor.setRGB(bitOnColor);

//Then apply filter
var innerBevel:BevelFilter = new flash.filters.BevelFilter();
var myFilters:Array = mcCircle.filters;
myFilters.push(innerBevel);
mcCircle.filters = myFilters;

Clearly I'm missing the point here. Anyone know the right way to do this? Thanks very much.

-jheske

Apply Text Filter Dynamically
How can I add a glow filter to a textfield via actionscript? I know the procedure for doing the same thing with a movieclip, but the TextField class (and TextFormat) don't seem to accept filters as a property?

What I have so far:


ActionScript Code:
import flash.filters.*;var text_glow:GlowFilter = new GlowFilter(0xFF0000, 80, 10, 10, 100, 3, false, false);var some_txt:TextField;//Want to apply filter to text field  

Unable To Apply Blur Filter
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);

[AS3.0] Apply Filter To TextField Programmatically
Hi there!

I tried this using

Code:
textField.filters = [new GlowFilter()]
or just like in Flash8 passing the .filters array ref to another array and pushing filter to that array [was it?], but none of these steps worked.

Applying filter to Sprite, within which the TextField (_title) is contained:
Code:
var tit:Sprite = new Sprite();
tit.addChild(_title);
tit.filters = [new GlowFilter(0xFFFFFF,1,5,5,2,2)]
addChild(tit);
worked, however this method (using extra sprite for a textfield) is just too dirty, let alone we want to apply filters to multiple textfields..

Anyone knows how to apply filter directly to TextField instance in AS3.0?

Thanks!

Apply Filter To Just One Bitmap Data, No The Others?
Greetings,

I was following lee's tutorial on how to create advanced effects on bitmap data (like using the blur filter). I am not used to working with bitmap data and don't find it's creation and structure intuitive. Something I am not understanding is how to just blur a single clip and build the draw loop so that only that clips bitmap data gets drawn and blurred while other clips stay untouched. Any object I put onto the main timeline ends up bluring. I tried creative a sprite that contained the clip and then targeted that sprite, but still, any clip, or any object on the stage was blured and redrawn. Any help would be appreciated. Thanks!
Code:

import caurina.transitions.*;

var bmd:BitmapData = new BitmapData(550, 400, true, 0x000000);
var bm:Bitmap = new Bitmap(bmd);

var s:Sprite = new Sprite();
addChild(s);
s.addChild(bm);

var bf:BlurFilter = new BlurFilter(8, 8, 3);
var cmf: ColorMatrixFilter = new ColorMatrixFilter([1,0,0,0,0,
                                       0,1,0,0,0,
                                       0,0,1,0,0,
                                       0,0,0,1,0]);

var logo:Logo = new Logo();
s.addChild(logo);
logo.scaleX = logo.scaleY = .14;

function mover(){
   var myY:Number = Math.random()*stage.stageHeight;
   var myTrans:String
   myY <= logo.y ? myTrans = "easeOutExpo" : myTrans = "easeOutBounce";
   Tweener.addTween(logo,{x:Math.random()*stage.stageWidth,
                        y:myY, time: 1,
                        rotation:Math.random()*300, onComplete:mover,
                      transition:myTrans});
}


mover();

addEventListener(Event.ENTER_FRAME, loop);

function loop(e:Event):void{
   bmd.draw(s);
   bmd.applyFilter(bmd, bmd.rect, new Point(0,0), bf);
   bmd.applyFilter(bmd, bmd.rect, new Point(0,0), cmf);
   bmd.scroll(0, -5);
}

Apply Animated Filter To An Image
I'm at war with this code for a week now .. I managed to get ripple effect, but it doesn't apply to image positioned behind. So I need some directions on how to achieve that.
Right now the image is steel and doesn't move with the ripples. Any help is appritieted

The code itself is in 2 classes, first is Ripples.as
Code:

package
{
   import flash.display.Sprite;
   import flash.events.*;
   import RippleCanvas;
   public class Ripples extends Sprite {
      private var subobj:RippleCanvas;
      public function Ripples() {   
      trace("Ripples Initialized");
      var subobj = new RippleCanvas();
      this.addChild(subobj);

      }
   }
}


And second is RippleCanvas.as
Code:

package
{
  import flash.display.Bitmap;
  import flash.display.BitmapData;
  import flash.display.Sprite;      
  import flash.events.*;
  import flash.events.*;   
  import flash.geom.*;   
  import flash.filters.*;
  import flash.display.BlendMode;
   public class RippleCanvas extends Sprite
   {
      internal var sourceBmp:BitmapData;      
      internal var paintBmpData:BitmapData;
      internal var paintBmpData2:BitmapData;      
      private var buffer:BitmapData;      
      private var paintBmp:Bitmap;
      private var output:Bitmap;
      private var brush:Sprite;
      private var logo:Sprite;
      private var filter:BitmapFilter;
      private var filter2:BitmapFilter;
      private var disp:BitmapFilter;
      private var outputBmpData:BitmapData;
      private var surface:BitmapData;
      internal var pt = new Point(0,0);
      internal var matrix1 = new Matrix();
      public function RippleCanvas()
      {
         paintBmpData = new BitmapData(128, 98, false, 0x40);
         //new image(166,240);
         paintBmpData2 = new image(166,240);
         //new BitmapData(128, 98, false, 0x40);
         logo = new Sprite();
         brush = new Sprite();
         brush.graphics.beginFill(0xFFFFFF,1);
         brush.graphics.drawCircle(0,0,4);
         trace ("RIppleCanvas started..");
//         surface = new BitmapData(128, 98, true, 0x000000);         
         surface=new image(166,240);
         surface.blendMode = BlendMode.ADD;
         surface.draw(logo);
         sourceBmp=new image(166,240);
         sourceBmp.blendMode = BlendMode.ADD;
//             sourceBmp = new BitmapData(128, 98, false, 0x40);                              
         buffer = paintBmpData.clone();         
         outputBmpData = new BitmapData(128, 98, false, 0x40);
         //new image(166,240);
         scaleX = 8.0;
         scaleY = 8.0;
         this.addEventListener(MouseEvent.MOUSE_DOWN, this.downEvent, false, 0, true);                                             
         this.addEventListener(MouseEvent.MOUSE_UP, this.upEvent, false, 0, true);   
         this.addEventListener(Event.ENTER_FRAME, this.update, false, 0, true);         
         paintBmp = new Bitmap(paintBmpData);
         var cmat:Array = [ 1, 1, 1,1, 1, 1, 1, 1, 1 ] ;
         filter = new ConvolutionFilter(3, 3, cmat, 9, 0);
         filter2 = new BlurFilter(4,4);
         output = new Bitmap(outputBmpData);
//         output.blendMode = BlendMode.ADD;               
//         paintBmp.blendMode = BlendMode.ADD;
         addChild(output);         
         addChild(paintBmp);
         //var tf = new TextField();
         //tf.text = "testing123";
         //addChild(tf);
      disp = new DisplacementMapFilter(paintBmpData2, new Point(), 4, 4, 48, 48, DisplacementMapFilterMode.IGNORE );
      this.filters = new Array(new BlurFilter(16, 16));
         this.blendMode = BlendMode.ADD;
      }
      function update(e:Event)
      {
         if(parent!=null){
               var localPt:Point = parent.globalToLocal(new Point(parent.mouseX*0.125, parent.mouseY*0.125));                              
               var m:Matrix = new Matrix();
               m.translate(localPt.x, localPt.y);
               sourceBmp.draw(brush, m, null, 'invert');
            }
         trace (localPt);
         paintBmpData.applyFilter(sourceBmp, paintBmpData.rect, pt, filter);
         paintBmpData.draw(paintBmpData, matrix1, null, 'add');
         paintBmpData.draw(buffer, matrix1, null, 'difference');         
         paintBmpData.draw(paintBmpData, matrix1, new ColorTransform(0, 0, 0.98609374, 1, 0, 0, 2, 0));         
         paintBmpData2.draw(paintBmpData, matrix1);
         outputBmpData.applyFilter(surface, outputBmpData.rect, pt, disp);
         buffer = sourceBmp;
         sourceBmp = paintBmpData.clone();
      }
      public function downEvent(e:Event)
      {      
         if(e.stageX == 0 && e.stageY == 0)
            return;
         var curPt:Point = parent.globalToLocal(new Point(e.stageX, e.stageY));
         e.stopPropagation();
      }
      public function upEvent(e:Event)
      {
         e.stopPropagation();            
      }
   }
}


Code itself is in a mess right now as I tryed every single combination, without any success.. so plz help

How To Apply Blur Filter On Image In Different Layer?
I have one load which loads image randomly from external folder.

and another layer which has 5 columns. I wish to do a mouse over thing and one of the column will become blur.


I tried to use the blur filter, but can't seem to get it work on image that loads randomly from external folder.

this is the action script code I used for loading external images:

Quote: pic_arr = ["images/1", "images/2", "images/3", "images/4", "images/5"];
onLoad = function() {
ranNum = Math.floor(Math.random()*pic_arr.length);
holder_mc.loadMovie(pic_arr[ranNum]+".jpg");
};



any help?

Unable To Apply Blur Filter On Mouse Down Event
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 point:Point = 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);

Turn Off An Animated Filter Transition
Hi,
I have found that this bit of code perfectly fades a glow filter on and off continuously.


ActionScript Code:
import flash.filters.GlowFilter;
import mx.transitions.Tween;
import mx.transitions.easing.Regular;
this._parent.imagesMC.networkDiagram.Network.glow = 0;
var tween_glow:Tween = new Tween(this._parent.imagesMC.networkDiagram.Network, "glow", Regular.easeInOut, 1, 7.5, 1, true);
tween_glow.onMotionChanged = function() {
    var gf:GlowFilter = new GlowFilter(0x5CA4DE, .75, this.obj.glow, this.obj.glow, 4, 3, false, false);
    var filter:Array = new Array(gf);
    this.obj.filters = filter;
};
tween_glow.onMotionFinished = function() {
    this.yoyo();
};
however, on the next frame I need to stop the pulsing effect and turn the glow off. I've tried 'delete' as below which stops the function operating but leaves the glow filter in whatever state it was in when the function was deleted, whereas I'd like to fade the glow to off.

ActionScript Code:
delete tween_glow.onMotionChanged;

How could it be done?

Apply Glow Filter On Target MC While Dragging An Object And Rolling Over The Target
I can get my filter to apply to a movie clip if i simply rollover or roll out of it. When the mouse rolls out, the filter is set to undefined. The problem I am having is that I want the object that is in effect the hit area to glow (have a filter applied) when the draggable object is being dragged over it.

This would make is easier for the user to visually identify that where they are currently hovering over, whilst dragging, is the area that they should drop the object.

Part of my code looks like this


Code:
this.onRollOver = function () {
if(_global.isDragging == 1){
this.filters = glowFilterArray;
}
}



this.onRollOut = function () {
_global.isDragging = 0;
this.filters = undefined;
}
_global.isDragging is set to 1 at the onPress stage, when startDrag occurs.
_global.isDraggin is set to 0 onRelease of the draggable object.

Are there any ideas for a solution?

Need Website Help Transition Between Swf's
Hi I have created a website at http://www.freshlemon.co.uk/cavalier/intro.html, the probblem i have is my transisitons are too slow and u have to wait a few seconds before page loads after clicking on button, how can i get them to slide in and out like many flash sites do without any effort on a click of a button, to make it look more professional, can someone please help, really desperate thanx!

Need Website Help Transition Between Swf's
Hi I have created a website at http://www.freshlemon.co.uk/cavalier/intro.html, the probblem i have is my transisitons are too slow and u have to wait a few seconds before page loads after clicking on button, how can i get them to slide in and out like many flash sites do without any effort on a click of a button, to make it look more professional, can someone please help, really desperate thanx!

The Transition On Top Of The Flash Website
I saw this website that has all kinds of flash website and I love how they did it. You click on this link URL=http://www.a4flash.com/tlib/index.php?tcat=PR]http://www.a4flash.com/tlib/index.php?tcat=PR[/url] then click on the picture that says trav_w_5 on top. What I like was how there was a transition to the next picture with a lot of these white fades. How do you do that?

Thanks an advance

Help With My Website's Navigation/transition
hi everyone, i'm doing this flash website for my school project, and i'm having a lot of trouble in putting my website together. i am new to flash/actionscript, so bear with me

basically, i made five different movie clips as my pages. each one has 60 frames in it. the first 30 frames are the opening of the page (animated mask), then stops, then the next 30 frames are the closing of the page. i put the movie clips in the main timeline in their own frames.

I have a movie clip as the animated menu with hidden buttons. and each of the buttons i added the code "_root.gotoAndPlay("Page1")", this works fine.

now my question is how can i tell it to play the individual page/movie clip's last 30 frames (closing of the page) before the page I click on opens? cause right now it just cuts to the page i chose, its not playing the transition i made. i tried using variables like my instructor said, but i still don't get it

anyway, thanks for any help in advance

Website - Sound And Transition Issues
Edited: 08/27/2007 at 12:01:57 PM by curvsilence

Flash Website - Transition Problem - Help
I'm doing a website for a band (www.theaviators.co.uk) but the menu system isn't working properly. Basically the main animation (download .fla here) has a blank space into which it calls the other .swf's. I used Claudio's preloader and transition tutorial

Now heres the strange bit. If I publish the main.fla as a .swf and play it in the standalone player - everything works (You can test this by downloading the bios.swf here and clicking on the bios button)

However if I publish the main.fla as a .swf and display it in a html page the menu system stops working.

I have no idea why this is happening and its immensly frustrating so if anyone can help it would be great.

Website - Transition And Sound Issues
Whats up everyone....

I have this site im working on, and I am trying to fix 2 problems. I am decent with flash but not too good. If anyone can help me I would be very appreciative.

URL: www.blc1.com

1. I can't figure out how to have transitions between pages. I have each section of my flash site as an individual frame with the section's content as movie clips on that single frame. Each navigational button uses a "gotoandstop" action. Here is the code im using for my buttons:

Code:


PHP Code:



stop(); this.onEnterFrame = function()
{ if(rewind == true){ prevFrame(); } } 
this.onRollOver = function(){ rewind = false; play(); } 
this.onRollOut = function(){ rewind = true; } 
this.onRelease = function(){ _root.gotoAndStop("creative"); } 





I am looking to have it fade out before it does the gotoframe, this could be as simple as having a black rectangle movie clip fade in, then the gotoandstop runs. I just cant figure out how to do this AS.


2. My second problem is adding sound to my rollovers, for some reason I CANNOT figure this out. I've tried adding sound via dragging onto the rollover movie clip, and Ive also tried using a few actionscript methods. For some reason it will not work, if you take a look at my FLA you will agree this is a WEIRD issue. I have a introductory sound on my site and it plays fine.

I dont want to publish my FLA but if you PM me I can send you it.

Thank you guys in advance.

Flash Website - Transition Problem - Help
I'm doing a website for a band (www.theaviators.co.uk) but the menu system isn't working properly. Basically the main animation (download .fla here) has a blank space into which it calls the other .swf's. I used Claudio's preloader and transition tutorial

Now heres the strange bit. If I publish the main.fla as a .swf and play it in the standalone player - everything works (You can test this by downloading the bios.swf here and clicking on the bios button)

However if I publish the main.fla as a .swf and display it in a html page the menu system stops working.

I have no idea why this is happening and its immensly frustrating so if anyone can help it would be great.

How To Add Transition Animations On Flash Based Website
***(home and about us button references are used for example purposes only)***
I know how to make an animation come in when the home button is clicked, but when I click on the about us button, how would I add action to the home page as a transition to about us?

Flash Website - Transition + Sound Problems
Whats up everyone....

I have this site im working on, and I am trying to fix 2 problems. I am decent with flash but not too good. If anyone can help me I would be very appreciative.

URL: www.blc1.com

1. I can't figure out how to have transitions between pages. I have each section of my flash site as an individual frame with the section's content as movie clips on that single frame. Each navigational button uses a "gotoandstop" action. Here is the code im using for my buttons:


Code:
stop();

this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}

this.onRollOver = function(){
rewind = false;
play();
}

this.onRollOut = function(){
rewind = true;
}

this.onRelease = function(){
_root.gotoAndStop("creative");
}
I am looking to have it fade out before it does the gotoframe, this could be as simple as having a black rectangle movie clip fade in, then the gotoandstop runs. I just cant figure out how to do this AS.


2. My second problem is adding sound to my rollovers, for some reason I CANNOT figure this out. I've tried adding sound via dragging onto the rollover movie clip, and Ive also tried using a few actionscript methods. For some reason it will not work, if you take a look at my FLA you will agree this is a WEIRD issue. I have a introductory sound on my site and it plays fine.

I dont want to publish my FLA but if you PM me I can send you it.

Thank you guys in advance.

Help To Achieve Scrolling And Transition Effect Like This Website
Hi guys,

Does anyone know what i should look into in order to achieve an effect like this website or if someone is even kind enough to provide me with the scripting of the scrolling and transition of the enlargement of the image when clicked on. I would greatly appreciate it.

This is the link to the website:
http://lambiance-design.com/ck/production/ck.html

Click on photos then scroll down and click on the daily life of the uyghur people. That will bring u to the page which i wanna learn how to get that effect.

Colormatrix Filter And Blur Filter Tween
Last edited by sks447 : 2006-10-17 at 15:11.
























I want to have a picture fade from blurry and grayscale to sharp and colorized. I have the blur to sharp part working ok. I have the grayscale to color to working ok. The only thing is the filters dont work together. Ive tried to push one into another with no luck yet. You can see the comments in the code below. Thanks.

ActionScript Code:
function blurFunction(myVar) {
    // init what movieclip to blur
    if (myVar == undefined) {
        myVar = promoContainer.p1;
    }
    // BLUR FILTER     
    import flash.filters.BlurFilter;
    import flash.filters.BitmapFilter;
    import flash.filters.ColorMatrixFilter;
    var blurFilter:BlurFilter = new BlurFilter(0, 0, 3);
    desaturation = 1;
    var filterArray:Array = new Array();
    filterArray.push(blurFilter);
    var blurX:Number = 100;
    var blurY:Number = 100;
    onEnterFrame = function () {
        prevPromo._visible = false;
        nextPromo._visible = true;
        if (desaturation>=1) {
            des = -0.03;
        } else if (desaturation<=0) {
            des = 0;
            delete (onEnterFrame);
        }
        desaturation += des;
        // color matrix 
        //myVar.filters = new Array(getDesaturationFilter(desaturation)); <---- I can have this....
        blurX -= 10;
        blurY -= 10;
        blurFilter.blurX = blurX;
        blurFilter.blurY = blurY;
        // blur filter 
        //myVar.filters = filterArray; <---- Or I can have this but not both.......
        if (blurY<=0) {
            blurY=0;
            blurX=0;
            //delete (onEnterFrame);
        }
    };
}
function getDesaturationFilter(t:Number):BitmapFilter {
    t = t != undefined ? t : 1;
    var r = 0.212671;
    var g = 0.715160;
    var b = 0.072169;
    trace("colormatrixfilter called");
    return new ColorMatrixFilter([t*r+1-t, t*g, t*b, 0, 0, t*r, t*g+1-t, t*b, 0, 0, t*r, t*g, t*b+1-t, 0, 0, 0, 0, 0, 1, 0]);
}

Transition Causing Colors To Be Off In Transition
I'm trying to recreate a transition/fade of an image from a flash file that I only have the swf to. It looks great on my box, but once live a viewed through Firefox, the colors get almost pschycodelic during the transition. I am using a tween between 0% alpha setting to 100% alpha, and selecting the blend to 'Hard Light'.

Has anyone else seen this and know of a work around?

Thanks.

jean

In/out Transition From Voetsjoeba : Problem With The Out Transition
hello,
I have some problem with a in and out transition Voetsjoeba explain here
My problem is that my 'out' transition is in a movieclip in the clip loaded so i tried to target it like this
ActionScript Code:
on (release) {    if (this.currMovie == undefined) {        this.currMovie = "print";        container.loadMovie("print.swf");    } else if (this.currMovie != "print") {        if (container._currentframe == container.midframe) {            this.currMovie = "print";            container.content.play(14);            trace("???");        }    }}
It is the code i have for my buttons that load the page, the trace command is read succesfully but it won't play my animation out.
On my loaded movie i have
ActionScript Code:
midframe=content("out")
on frame 1 because my transition is in the movieclip content.
The button that load the file is 'print' and 'web' in the soumen movieclip. I've posted my file here :
FILES
If someone can help me, it would be a great help !!

Thanks
Ubik

In/out Transition From Voetsjoeba : Problem With The Out Transition
hello,
I have some problem with a in and out transition Voetsjoeba explain here
My problem is that my 'out' transition is in a movieclip in the clip loaded so i tried to target it like this
ActionScript Code:
on (release) {    if (this.currMovie == undefined) {        this.currMovie = "print";        container.loadMovie("print.swf");    } else if (this.currMovie != "print") {        if (container._currentframe == container.midframe) {            this.currMovie = "print";            container.content.play(14);            trace("???");        }    }}
It is the code i have for my buttons that load the page, the trace command is read succesfully but it won't play my animation out.
On my loaded movie i have
ActionScript Code:
midframe=content("out")
on frame 1 because my transition is in the movieclip content.
The button that load the file is 'print' and 'web' in the soumen movieclip. I've posted my file here :
FILES
If someone can help me, it would be a great help !!

Thanks
Ubik

Changes Won't Apply...
When ever I use a tool, I do stuff with it... but when I release the mouse button, the changes undo themselves. For example, I'd erase something, then release the button, and the thing would just pop back up. How do I fix this?

Apply
Hi, the main movie of my website loads the following movies:
loadMovieNum("main_menu.swf", 10);
loadMovieNum("news.swf", 2);
loadMovieNum("grid.swf", 1);

I have a button on mc "main_menu.swf". When this button is pressed I want mc "grid.swf" to:
gotoAndPlay('play');

I have been trying "_root.grid.gotoAndPlay('play');" amongst others but no joy.

Is this possible?

many thanks

When To Apply To TM Or When To Apply To MC?
How do you know when you applie code, that you want it for a movieclip or the timeline?

Searchable Website Vs Slick Website...when To Draw The Line
Just curious what everyone thinks here:

So, we all know how search engines have a hard time reading flash sites. Well, I have come to a road block in my designing...I have clients that want their sites in the search engines but also want a certain amount of 'tech' to them! I can design pages with 'some' flash, enough to make it interesting, BUT if they want a 'fully searchable' page, what do we do?
I can type html all day long but it will never compare to the slickness of flash. I just finished my first 'full html' site in over a year(stuck on flash) and I am blown away by the clarity! It makes flash sharpness look dull! (sorry)

**My Question:
If you had a client that wanted a high tech site and also wanted to be 'searchable', what would you do??

***I'd like to hear all opinions, reasons and answers***

Mike

How To Apply A Preloader
I have a flash movie which is big in size. I want a preloader to run it. So now I made twoflash files. One heavy main file and one small flash file. Now how to make to small flash file run till the larger main file loads. I think I have to use an Applet, but which one and how I do not know? Please help
siddharth

Please Help- I Have A Concept And I Don't Know How To Apply It
Hello

I have this concept for my portfolio site which is a mix of flash and html graphics-

I want my flash movie to be semi faded when the mouse it not over it but when the mouse goes over it, it is fully shown-

I know this can be done trhough telltarget/with with a movie clip- and a invisible buttom-

but that means I have to put a big invis. buttom on my movie and that will make the whole area clickable which i don't want-

is there a way to do it with clipevent or something- please help me out or direct me to a tutorial that shows this
thnx

I Have This Concept And Don't Know To Apply It
Hi, I have this idea for my site and don't know how to apply it

My web site is half html images and half flash- I want to make the flash parts semi tranparent but when the mouse goes over it they would be fully shown- what i have done is i made put a M/C on the top of my movie timeline and used tell target to control the look of it- this part i have no problem with-
but the part i have problems with is how to control the m/c
i tried the invis. buttons but that would make the whole flash part clickable which is not what i want- i tried onclip event but it doesn't work as good as I wanted it to work-


any suggestion-
I also thought of having a timer if the mouse is not active in X- sec tell target/with my white MC. but i don't know how to do that either.

please help me thnx shane

Please Tell Me How Apply THIS Technique
I saw this website
http://www.craigdavid.co.uk/site/home.php
and I really like the technique used for the sliding banner. Could anyone give me a clue how they did that please? I think it seems like a popular technique now

Thank you very much

Peddie

Apply Stroking
Is there a way to apply a stroke to an object in Flash?

How To Apply Javascript
Great thanks to Nordberg for supplying the following javascript to open a file in a new seperate window sized 500 x 250.

on (release) {
screenX = System.capabilities.screenResolutionX
screenY = System.capabilities.screenResolutionY
getURL("java script:NewWindow=window.open('yourpage.asp','windo wname','width=500,height=250,top="+((screenY -250)/2)+",left="+((screenX -500)/2)+" ,toolbar=No,location=No,scrollbars=No,status=No,re
sizable=No,fullscreen=No'); NewWindow.focus(); void(0);");

Only problem is,I don't know what to do with it. I tried inserting into the getURL action field and it woudn't take it. I tried using expert mode and it said there's errors in the code when trying to get back to normal mode.

Also do I need to replace my file name with 'yourpage.asp' or 'windowname'?

Anyone know how or where to insert this code?

Thanks!!!!!!!!!!!!!!!!

Apply Function
Hi


I've built a tree menu.

when u click on a button it changes its font color and it's being underlined.
I've done that by using the button text as html and then on(release) set the different variables to the html code needed. This works very fine, only if i add another buttton to the tree menu i have to change the script of all the 30 other buttons too.


Now i had an idea, maybe i could define a function with resets all html codes to the starting position

if i click on a button flash should
run the function
and then set the code of the clicked button

to do that i've added a script in the first frame

function reset() {
a = "hallo";
b = "you";
}

if i click on button A
on (release){
run reset ( dont know how to do that)
a = "<font color = "#FFFFFF"><u>hallo</u></font>"
}

but what script do i need to run reset????

seems complicated but it isn't

mainly i ask u what script do i need that a button executes a function??


thanx a lot


Gilo

Batch Apply?
I´m in the making of a site, and i´ve got many pictures, that should fade in from alpha 50% to 100%. I´ve used the motion-tween and put it in a Movie Clip a million times. Is it possible to make some kind of batch apply on these pictures???? (imported jpegs, converted to bitmap, finally converted to grapich)

NEED HELP PLEASE.

MightyDane

How Do You Apply AS From A Variable?
how do you apply AS from a variable?

Apply #include On The Fly
Hi

I have a menu that I'm trying to automize. In its present state, there are thumbnails already on the stage and I'm using #include to reference a separate *.as file that gives the thumbs behaviours.

Now instead I'm using attachMovie to create the thumbs. How can I apply a #include to the created thumbs using script?

Is there a simple way to do it using a class?

thanks
mark
flash8

Apply Some Pressure
Hi people,

Does anyone know how liquid crystal sheets work at all?

if not i will try and explain it. This sheet could be as big as A4 sized paper, visually, it looks black, nothing else. but if you where to place your hand on this sheet, the heat from your hand will effect the black ink, by fading to clear ( possibly to reveal the original colour underneath ) in this process of revealing of depending upon how long the hand is placed, a heat pattern, colours fading from red to green to slightly orange/brown.

now my question is i would like to replace the hand for the mouse cursor. so if i leave the mouse cursor in the same place it will cause a reaction and if you move the mouse cursor slowly left to right it leaves a trail behind.oh and the effect will always return to its original stat, which is black.

any indeas and if this is possible??

heres a link to what an lcr sheet is http://www.teachersource.com/catalog...aca7e1138bcde2

cheers

[F8] Why The FK Doesn't This CSS Apply?
I don't have much experience dealing the styles in flash but for some dumbfk reason, there are no underlines on <a> tags by default so I have to style them in. Pain in the arse.

Anyway, this seems simple enough but doesn't do sh*t.


Code:
import TextField.StyleSheet;
var mySS = new StyleSheet();
mySS.setStyle("hyper", {color:'#00FF00',fontWeight:'bold'});

myText = createTextField("myText",0,0,0,0,0);
myText.autoSize = true;
myText.styleSheet = mySS;
myText.html = true;
myText.htmlText = "<p class='hyper'>some text</p>";

How Do I Apply Gravity?
So i finaly figured out how to create opposing force! The problem is when i try to apply gravity my ball completely ignores the opposing force!

Paste this code into the first frame.


Code:
var magnet_radius:Number = 220;
var coefficient:Number = .05;

function distance( dx:Number, dy:Number ) : Number {
return Math.sqrt( dx * dx + dy * dy );
}

function offset( dist:Number ) : Number {
return ( magnet_radius - dist ) * coefficient;
}

function project( dist:Number, dx:Number, dy:Number ) : Object {
var theta:Number = Math.atan2( dy, dx );
var magnitude:Number = offset( dist );
return { x:Math.cos( theta ) * magnitude, y:Math.sin( theta ) * magnitude };
}

function run() : Void {
var dx:Number = _root.magnet._x - ball._x;
var dy:Number = _root.magnet._y - ball._y;
var dist:Number = distance( dx, dy );
if( dist < magnet_radius ) {
var projection:Object = project( dist, dx, dy );
ball._x -= projection.x;
ball._y -= projection.y;
}
}

this.onEnterFrame = run;
I have a Ball object and a Magnet object. I just put them close together and watch the reation.

Id like the ball object to act as though gravity were pushing it down.

Can't Apply Script To MC?
Hey everyone,

I am just starting my first AS 3.0 project and am very frustrated. Many of my techniques include assigning code to individual MCs but, to my understanding, this is not available in 3.0.

For an exaple, I wanted to do a simple blur in and out on a button when I rollOver or rollOut. In the past I would have coded it this way.

button script...

Code:
btnPlay.onRollOver = function(){
imgPlay.playingBackwards = false;
imgPlay.play();
}
btnPlay.onRollOut = function(){
imgPlay.playingBackwards = true;
}
and had this code on my movieclip...

Code:
onClipEvent(enterFrame){
if (playingBackwards) prevFrame();
}
My movieclip just contained a simple tween.

How is this set up in 3.0? I was receiving all sorts of errors that related to on(EnterFrame) events, and as I mentioned earlier, I cannot assign code to a MC.

Ugh. Why change the language!

Apply Css To Different Node
hello..

how do I apply the css to different nodes in the xml data? I have attached the file for you to take a look at. thank you.

How Do I Apply The Same Set Of Commands?
I am sorry if I am overlooking this, but this is hard to search for in the manual. If i want to go to an object, or keyframe, and transform it ...scale it, etc. and change color, or apply a transition... in other words, change more than one thing at a time, and I need to do this to a number of objects, can I record this (like in photoshop) and do the same changes again and again just by using a shortcut?

Copyright © 2005-08 www.BigResource.com, All rights reserved