[flexcoders] another event, instead move?

2005-11-10 Thread keishichi2001
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







 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/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/
 




RE: [flexcoders] another event, instead move?

2005-11-10 Thread Matt Chotin










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 youre using. Set the yFrom and yTo properties right then.



Havent tried this, but its a
thought



Good luck!



Matt











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] 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
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.