A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] AS3 and TweenMax

Threaded View

  1. #1
    Member
    Join Date
    Mar 2007
    Posts
    79

    resolved [RESOLVED] AS3 and TweenMax

    Hi,

    Decided this week to bite the bullet and learn AS3 from AS2.

    Basically what I have is 6 movieclips nested in a single mc.

    -- main_holder --
    -- panel_01 --
    -- panel_02 --
    -- panel_03 --
    -- panel_04 --
    ........

    Each of the panels loads an external movie. All this works fine.

    All panels are visible on screen at once.
    I have a separate menu. I have tried to write a script that will blur the panels that are not in use. So if a user clicks a button to view panel_01, all the other panels should blur.

    Here is my code so far but it isn't working.

    PHP Code:
    //Blur others
    var panelMcs:Array = new Array("main_holder.panel_01""main_holder.panel_02""main_holder.panel_03""main_holder.panel_04""main_holder.panel_05""main_holder.panel_06");

    function 
    blurOthers(target) {
        for (var 
    i:Number=0;i<6;i++){
            if (
    panelMcs[i] != target) {
                var 
    bMC:String = new String(panelMcs[i]);
                
    TweenMax.to(bMC0.5, {blurFilter:{blurX:5blurY:5}});
                } else {
                
    TweenMax.to(target,0.5, {blurFilter:{blurX:0blurY:0}});
                }
        }

    I am calling the function like so

    PHP Code:
    blurOthers(main_holder.panel_01); 
    I'm not sure if the bMC:String part is correct - the code is just my last attempt at getting it to work.

    Not sure if this helps but this is the error message I'm getting when I click on a button

    Code:
    ReferenceError: Error #1069: Property filters not found on String and there is no default value.
    	at gs.plugins::FilterPlugin/initFilter()
    	at gs.plugins::BlurFilterPlugin/onInitTween()
    	at gs::TweenLite/initTweenVals()
    	at gs::TweenMax/initTweenVals()
    	at gs::TweenLite/activate()
    	at gs::TweenLite$/updateAll()
    Hope all makes sense!

    Thanks for the help

    James

Tags for this Thread

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