Animating an external compenent into a state


hello! i'm working on pet project of sorts not unlike gallery. gallery i'm building works fine connection wise, problem i'm dealing relating animation.

 

quick summary:

i built external component, <component:largerview> visibility="false" within main application.

i want apply fade in component when visiblity set true.

everything tried didn't work, suggestions?

 

detailed problem bellow:

 

i have external component built included in main application, visibility set off. want larger view component fade in when turn visibility "true" through event. sadly, no matter try, component blinks existance.

 

i've tried few things, such using same click event turns visibility true play s:fade on component, doesn't work. tried creating state component, , using transition, achieved same result (with odd side effect click event, change states, wouldn't work second time). lastly, tried putting states external component itself, making initial component set have nothing. creationcomplete, had program switch initial state state including titlewindow , picture. brilliantly complicated , unnecessary was, blinked in anyway, without fade, mock me.

 

although of these methods succesfully launched titlewindow without problems (excluding oddity of second method used), still had no fade in component. think may have visibility property, or maybe flex out me.

i'm sure solution elegant, seeing how i'm still new this, appreciate anyone's suggestions.

 

 

 

thanks whatever advice provided.

i thought posting code might understanding, here's this:

 

component in main application:

 

    <components:largeview id="lavi"
                          visible="false"
                          x="70" y="25"
                          showlarge="lavi_showlargehandler(event)"
                          top="100"
                          left="450"
                          />

i want fade in after cueing code:

 

            protected function livi_openerhandler(event:clargeview):void
            {
                lavi.visible = true;               
                lavi.imageinfo = event.imageinfo;
            }

 

here's largeview component:

 

<?xml version="1.0" encoding="utf-8"?>
<s:group xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300"
         >

 

    <fx:metadata>
       
        [event(name="showlarge", type="flash.events.event")]
       
    </fx:metadata>
   
    <fx:script>
       
        <![cdata[
            import mx.collections.arraycollection;
            import mx.events.flexevent;
           
            [bindable]
            public var imageinfo:object;
           
           
            protected function closer_clickhandler(event:mouseevent):void
            {
                var eventobject:event = new event("showlarge");
                dispatchevent(eventobject);
            }
        ]]>
    </fx:script>
   
    <fx:declarations>
        <!-- place non-visual elements (e.g., services, value objects) here -->
    </fx:declarations>
   
    <s:titlewindow title="{imageinfo.title}"
                   id="thetitle"
                   x="-181" y="-100"
                   backgroundcolor="#010101" width="723" height="537" >
       
        <mx:image id="closer" source="{imageinfo.loc}"
                  x="10" y="0"
                  width="701" height="425"
                  horizontalalign="center"
                  verticalalign="middle"
                  click="closer_clickhandler(event)"/>   
       
        <s:textarea text="{imageinfo.info}"
                    y="433"
                    height="47"
                    fontsize="12"
                    fontweight="bold"
left="43" right="39"/>
       
    </s:titlewindow>
</s:group>

 

 

 

--------------------------------------------

 

i'd appreciate help, thank you.



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

Hur installera Joomla på One.com - Joomla! Forum - community, help and support

removing index.php from URL address - Joomla! Forum - community, help and support

「イメージマップのアンカー名には、...」のエラーが出ないようにしたい