Re: Effects when changing visible ViewStack Panes?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Effects when changing visible ViewStack Panes?

wayne_badu_johnson

Hi Steve

Depending on how you have setup the viewstacks, say they are being
controlled by a linkbar, you assign the effects to the canvas's not
the viewstack.

Example:

// MXML version
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:WipeDown duration="2000" id="wipe"/>
       
<mx:LinkBar dataProvider="myViewStack"/>
       
<mx:ViewStack id="myViewStack" width="100%" height="100%">
        <mx:Canvas label="Canvas 1" showEffect="{wipe}">
                       
        <mx:TextArea width="200" y="40">
                <mx:text>
                        111111111111111111111111111111111111111
                        111111111111111111111111111111111111111
                        111111111111111111111111111111111111111
                </mx:text>
        </mx:TextArea>
        </mx:Canvas>
        <mx:Canvas label="Canvas 2" showEffect="{wipe}">
        <mx:TextArea width="200" y="40" >
                <mx:text>
                        2222222222222222222222222222222222222222
                        2222222222222222222222222222222222222222
                        2222222222222222222222222222222222222222
                </mx:text>
        </mx:TextArea>
        </mx:Canvas>
</mx:ViewStack>
</mx:Application>


If you are doing it through Actionscript then you would just use the
setStyle method and pass through as per the example below:


// Actionscript verion (Note: You will need to define your own
effects)
// add view stack
var myViewStack:ViewStack = new ViewStack();

// Canvas content
var myCanvas1:VBox = new VBox();
myCanvas1.label = "Canvas 1";
myCanvas.setStyle('showEffect',getUIEffects().getWipeDown());
                               
//
var myCanvas2:VBox = new VBox();
myCanvas2.label = "Canvas 2";
myCanvas2.setStyle('showEffect',getUIEffects().getWipeDown());
                                                 
// add content to viewstack
myViewStack:ViewStack .addChild(myCanvas1);
myViewStack:ViewStack .addChild(myCanvas2);

Cheers
Wayne





--- In [hidden email], "Steve Kellogg @ Project SOC"
<stevek@...> wrote:

>
> Hello,
>
>  
>
> I'm having a small problem that I hope someone here can help with.
>
>  
>
> I have a ViewStack, whose children are all Canvass (with other
controls and
> views within the canvases).
>
>  
>
> I want to 'soften' the transitions between the panes, so I
assigned a FADE
> effect to the "hideEffect" and "showEffect" effects (as per the
> instructions).
>
>  
>
> The PROBLEM is that this doesn't seem to work at all.  Is there
some special

> trick to get this to work?
>
>  
>
> Thanks in advance for any assistance,
>
>  
>
> Steve
>
>  
>
>  
>
>  
>
> Steve Kellogg
>
> Peak8 Solutions
>
> 1401 14th Street
>
> Boulder, Colorado
>
> 80302, USA
>
> Fax: 303.415.2597
>
> E-Mail: stevek@...
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[hidden email]
    mailto:[hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/