PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
gallery with 3 button states
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: gallery with 3 button states

  1. #1
    Junior Member
    Join Date
    Mar 2008
    Posts
    20

    gallery with 3 button states

    hi again, i'm still stuck with my slide gallery.

    What i need is a series of pictures on a row that is mouse sensitive, if you move the mouse the gallery move in a loop, (no stop!)

    All theese pictures need thees effects:

    Normal state: blur
    rollOver: unblur
    rollOut: blur
    click: unblur and desaturate
    clicked: all picture pressed remains desaturate until you reload gallery.

    what i have done is this:

    Code:
    import gs.*;
    
    this.buttonMode = true;
    
    TweenMax.to(this, 0.5, {blurFilter:{blurX:5, blurY:5}});
    
    this.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
    this.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
    this.addEventListener(MouseEvent.CLICK, click);
     
    end setup of first part
    
    
    function click(event:MouseEvent):void
    {
    	 MovieClip(root).foto_galleria.bianchialti.gotoAndPlay(2);
    	
    	 MovieClip(root).images.infinite.btrighealte.mouseEnabled = true; 
    	 MovieClip(root).images.infinite.btrighealte1.mouseEnabled = true; 
    	 MovieClip(root).images.infinite.btrighebasse.mouseEnabled = true;
    	 MovieClip(root).images.infinite.btrighebasse1.mouseEnabled = true;
    	 MovieClip(root).images.infinite.btgrigiealte.mouseEnabled = true;
    	 MovieClip(root).images.infinite.btgrigiealte1.mouseEnabled = true;
    	 MovieClip(root).images.infinite.btgrigiebasse.mouseEnabled = true; 
    	 MovieClip(root).images.infinite.btgrigiebasse1.mouseEnabled = true; 
    	 MovieClip(root).images.infinite.btbianchebasse.mouseEnabled = true; 
    	 MovieClip(root).images.infinite.btbianchebasse1.mouseEnabled = true; 
    	 //MovieClip(root).images.infinite.btbianchealte.mouseEnabled = true;
    	 //MovieClip(root).images.infinite.btbianchealte1.mouseEnabled = true; 
         MovieClip(root).images.infinite.btrosabasse.mouseEnabled = true; 
    	 MovieClip(root).images.infinite.btrosabasse1.mouseEnabled = true;
         MovieClip(root).images.infinite.btrosaalte.mouseEnabled = true; 
    	 MovieClip(root).images.infinite.btrosaalte1.mouseEnabled = true; 
         MovieClip(root).images.infinite.btverdibasse.mouseEnabled = true; 
    	 MovieClip(root).images.infinite.btverdibasse1.mouseEnabled = true;
         MovieClip(root).images.infinite.btverdialte.mouseEnabled = true; 
         MovieClip(root).images.infinite.btverdialte1.mouseEnabled = true; 
    	 MovieClip(root).images.infinite.btrombibasse.mouseEnabled = true; 
    	 MovieClip(root).images.infinite.btrombibasse1.mouseEnabled = true; 
    	 MovieClip(root).images.infinite.btrombialte.mouseEnabled = true; 
    	 MovieClip(root).images.infinite.btrombialte1.mouseEnabled = true; 
    	
    here i enable all button exept this that i disable under here 	
    	MovieClip(root).images.infinite.btbianchealte1.mouseEnabled = false;
    	 MovieClip(root).images.infinite.btbianchealte.mouseEnabled = false;
    	 TweenMax.to( MovieClip(root).images.infinite.btbianchealte, 0.5, {colorMatrixFilter:{saturation:0}});
    	 TweenMax.to( MovieClip(root).images.infinite.btbianchealte1, 0.5, {colorMatrixFilter:{saturation:0}});
    	 TweenMax.to( MovieClip(root).images.infinite.btbianchealte, 0.5, {blurFilter:{blurX:0,blurY:0}});
    	 TweenMax.to( MovieClip(root).images.infinite.btbianchealte1, 0.5, {blurFilter:{blurX:0,blurY:0}});
    	
    	 TweenMax.to( MovieClip(root).images.infinite.btgrigiebasse, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btgrigiebasse1, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btgrigiealte, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btgrigiealte1, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btbianchebasse, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btbianchebasse1, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 //TweenMax.to( MovieClip(root).images.infinite.btbianchealte, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 //TweenMax.to( MovieClip(root).images.infinite.btbianchealte1, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btrosabasse, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btrosabasse1, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btrosaalte, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btrosaalte1, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btverdibasse, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btverdibasse1, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btverdialte, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btverdialte1, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btrombibasse, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btrombibasse1, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btrombialte, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btrombialte1, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btrighealte, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btrighealte1, 0.5, {blurFilter:{blurX:5, blurY:5}}); 
    	 TweenMax.to( MovieClip(root).images.infinite.btrighebasse, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 TweenMax.to( MovieClip(root).images.infinite.btrighebasse1, 0.5, {blurFilter:{blurX:5, blurY:5}});
    	 
        here i set all other buttons to blur execpt this one
    
    }
    
    
    function mouseOverHandler(e:Event):void {
    	
    	TweenMax.to( MovieClip(root).images.infinite.btbianchealte,0.5,{blurFilter:{blurX:0,blurY:0}});
    	TweenMax.to( MovieClip(root).images.infinite.btbianchealte1,0.5,{blurFilter:{blurX:0,blurY:0}});
    	
    }
    
    function mouseOutHandler(e:Event):void {
    	TweenMax.to( MovieClip(root).images.infinite.btbianchealte,0.5,{blurFilter:{blurX:5, blurY:5}});
    	TweenMax.to( MovieClip(root).images.infinite.btbianchealte1,0.5,{blurFilter:{blurX:5, blurY:5}});
    	
    }
    This works but i would like to have unblur the last button pressed...

    I did some tries but i'm not a good programmer...

    Look here for my work : http://lnx.havana7.it/madama/ (click catalogo)
    and here is the fla (cs3) : http://lnx.havana7.it/madama/test3.fla
    Last edited by havana7; 07-21-2010 at 08:13 PM.

  2. #2
    Junior Member
    Join Date
    Mar 2008
    Posts
    20
    edited.. up!

  3. #3
    Junior Member
    Join Date
    Jul 2010
    Posts
    12
    First off, store those MovieClips in some kind of collection to make this alot easier to look at, and alot less error prone:

    Actionscript Code:
    var clips:Array = new Array();
    clips.push(MovieClip(root).images.infinite.btrighealte);
    clips.push(MovieClip(root).images.infinite.btrighealte1);
    // and so on

    for (var i:uint = 0; i < clips.length; i++) {
        clip:MovieClip = clips[i] as MovieClip;
        clip.mouseEnabled = true;
        TweenMax.to(clip, 0.5, {blurFilter:{blurX:5, blurY:5}});
    }

    Or for FP10 (with type safety)

    Actionscript Code:
    var clips:Vector.<MovieClip> = new Vector.<MovieClip>();
    clips.push(MovieClip(root).images.infinite.btrighealte);
    clips.push(MovieClip(root).images.infinite.btrighealte1);
    // and so on

    for (var i:uint = 0; i < clips.length; i++) {
        clips[i].mouseEnabled = true;
        TweenMax.to(clips[i], 0.5, {blurFilter:{blurX:5, blurY:5}});
    }

    Second, I don't really understand your question. Can you explain better what you are trying to achieve?
    Last edited by savagelook; 07-23-2010 at 08:49 AM.
    http://www.savagelook.com/blog - My Flash, AS3, & Away3d blog

  4. #4
    Junior Member
    Join Date
    Mar 2008
    Posts
    20
    Thnx savagelook but how can i store those MovieClips in some kind of collection? i'm quite novice...
    Just set an array like yoy did? but where shuld i put that code? in all buttons?

    what i want to achive is that:

    when you load gallery pressing catalogo all small images are on blur ok?
    now i would like that each of theese have:

    onRollover = unblur
    onRollout = blur
    onPress = desaturate and unblur

    when you click another one the previously clicked should became blur again but remain desaturate as a kind of visited effect.

    I hope to been more clear.
    Last edited by havana7; 07-23-2010 at 09:26 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center