Thanks Matt.

I wrote following code. Is it what you wanted to say?
Following code actually doesn't work...
Am i wrong at any place?

=====
function onEffectStart(event:Object) : Void
{
        var initObj:Object = new Object();
        initObj.yFrom = "";
        initObj.yTo = "";
        initObj.duration = "300";

        switch (ModelLocator.catEffect) {
                case "movePageU2M":
                        initObj.yFrom = "0";
                        initObj.yTo = "-365";
                        break;
                case "movePageM2B":
                        initObj.yFrom = "-365";
                        initObj.yTo = "-730";
                        break;
                case "movePageB2M":
                        initObj.yFrom = "-730";
                        initObj.yTo = "-365";
                        break;
                case "movePageM2U":
                        initObj.yFrom = "-365";
                        initObj.yTo = "0";
        }

        this.createClassObject(mx.effects.Move, "imgeffect",
getNextHighestDepth(), initObj);

        event.effect = imgeffect;

}

...


        <mx:Image x="0" y="0" source="page-0001.jpg"
effectStart="onEffectStart(event);" moveEffect="imgeffect" />
=====


Best Regards,
Keishichi


--- In flexcoders@yahoogroups.com, "Matt Chotin" <[EMAIL PROTECTED]> wrote:
>
> Assign the moveEffect before you do any moving.  Add an effectStart
> handler to the Image, the event property will contain an "effect"
> property which is the instance of the effect that you're using.  Set the
> yFrom and yTo properties right then.
> 
>  
> 
> Haven't tried this, but it's a thought...
> 
>  
> 
> Good luck!
> 
>  
> 
> Matt
> 
>  
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of keishichi2001
> Sent: Thursday, November 10, 2005 1:05 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] another event, instead move?
> 
>  
> 
> env : Flex1.5 + Cairngorm
> 
> little bit difficult to explain my situation....
> 
> ===========
> 
> i've trying to develop a catalog-viewer application with Flex.
> Multiple components i have...
> 
> Main.mxml : this is the main application that user access.
> cat1.mxml : catalog application 1.
> cat2.mxml : catalog application 2.
> ...
> catn.mxml : catalog application n.
> 
> Single catalog application may contain about 10 pages, so i used
> ViewStack and 10 pages are all child(mx:Image) of the ViewStack.
> The size of a page is vertical-rectangle(ie, 300x900).
> However size of the ViewStack - that i mentioned above - is 300x300.
> Which means, each page should have vertical scrollbar that user could
> browse top, middle, bottom of the page.
> 
> Now, Main.mxml has 'catalog chooser' so that user could choose a
> catalog they want to browse.
> Main.mxml also has the catalog-controller so that user can move pages
> either 'previous' or 'next'.
> Also they could browse any part of the current page - top, middle,
> bottom.
> 
> All of catalog applications are defined within Main.mxml as follows.
> 
> <mx:Loader contentPath="catalog/cat1.mxml.swf" ... />
> 
> which means, the catalog user specified should be loaded dynamically.
> In this case, AS code inside of Main.mxml doesn't work against
> cat1.mxml.
> Therefore i use ModelLocator of Cairngorm, so that both main
> application and catalog application should be able to share
> information, like Y-axis of the image.(yes, sharing Y-axis does work
> correctly.)
> 
> =====
> 
> Now, my issue....
> 
> Remember, single page of a catalog application has 300x900 size.
> So user can move top to middle, middle to bottom, whatever....
> I'd like to give the page(mx:Image) with Effect(moveEffect), for
> natural page moving...
> I reallized i should at least have four Effects as following.
> 
> <mx:Effect>
>   <mx:Move name="movePageU2M" yFrom="0" yTo="-300" duration="300" />
>   <mx:Move name="movePageM2B" yFrom="-300" yTo="-600" duration="300" />
>   <mx:Move name="movePageB2M" yFrom="-600" yTo="-300" duration="300" />
>   <mx:Move name="movePageM2U" yFrom="-300" yTo="0" duration="300" />
> </mx:Effect>
> 
> And either of them should be set against moveEffect of mx:Image, when
> user act on catalog-controller of Main.mxml.
> 
> For this, i've already tryied move event of mx:Image.
> The event object has y, and oldY. I thought i could compare them and
> tried to setStyle("moveEffect", ModelLocator.catEffect) within move
> event.
> * ModelLocator.catEffect was set when user contolls catalog-controller
> of Main.mxml.
> However move event is broadcast *just after* object moved.
> So above my code doesn't work well.
> 
> 
> ======
> 
> I hope some of you understand my explantion,,,
> and could you please give me any clue?
> 
> 
> Thanks in advance,
> Keishichi
> 
> 
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> 
> 
> 
> 
> SPONSORED LINKS 
> 
> Web site design development
> <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+
> site+design+development&w2=Computer+software+development&w3=Software+des
> ign+and+development&w4=Macromedia+flex&w5=Software+development+best+prac
> tice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ>  
> 
> Computer software development
> <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=We
> b+site+design+development&w2=Computer+software+development&w3=Software+d
> esign+and+development&w4=Macromedia+flex&w5=Software+development+best+pr
> actice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw>  
> 
> Software design and development
> <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=
> Web+site+design+development&w2=Computer+software+development&w3=Software
> +design+and+development&w4=Macromedia+flex&w5=Software+development+best+
> practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ>  
> 
> Macromedia flex
> <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+
> development&w2=Computer+software+development&w3=Software+design+and+deve
> lopment&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=1
> 66&.sig=OO6nPIrz7_EpZI36cYzBjw>  
> 
> Software development best practice
> <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&;
> w1=Web+site+design+development&w2=Computer+software+development&w3=Softw
> are+design+and+development&w4=Macromedia+flex&w5=Software+development+be
> st+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw>  
> 
>  
> 
>  
> 
> ________________________________
> 
> YAHOO! GROUPS LINKS 
> 
>  
> 
> *      Visit your group "flexcoders
> <http://groups.yahoo.com/group/flexcoders> " on the web.
>         
> *      To unsubscribe from this group, send an email to:
>        [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> 
>         
> *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/> . 
> 
>  
> 
> ________________________________
>





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
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/

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

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


Reply via email to