One quick observation,
mouseOverData="{ setDispatchingOptions( event ) }"
The curly braces are not necessary here. It should be:
mouseOverData="setDispatchingOptions( event )"
You are not trying to declare a binding there, just telling the flex
compiler to create something like the following statement:
ccChartOneColumn.mouseOverData = function(event){
setDispatchingOptions( event ); };
And regarding the context menu... have you searched the list for a
click and hold context menu?
Last year I created one that works just like the one you trigger by
holding the pen on a pocket PC. It gives you more control on the
result, as you can draw anything you like. I believe others have done
the same and made it public.
Good Luck,
Aldo
On 8/2/05, david_gal-reyniez <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I try to implement a ContextMenu for different charts I generate thanks to a
> Repeater.
> For this I face with 2 problems :
> - Generate the right menu
> - Get the relative data on which I click into the chart
> Thanks for your ideas about this problem.
>
> I have also 1 question:
> - Is there any method allowing me to open the ContextMenu but not only with
> a right-click?
>
> _______________________________________________________________________________________________________
> MXML File
>
> <mx:ColumnChart id="ccChartOneColumn"
> styleName="chart"
> height="160"
> width="100%"
> minWidth="500"
> dataProvider="{ arrCharts[rpCharts.currentIndex].chartData }"
> mouseOverData="{ setDispatchingOptions( event ) }"
> // Method which must create the right Menu, but only with a
> left-click on the chart before a right_click
> showDataTips="true">
>
> ___________________________________________________________________________________
> METHOD
>
> public function setDispatchingOptions( event )
> {
>
> // Alert.show("typeof(event.target) : " + typeof(event.target),
> "______Message__", Alert.OK);
> // typeof(event.target) = movieclip so event.target.menu should run,
> shouldn't?
>
> var index:Number = event.target.instanceIndex;
> var itemArray:Array = new Array();
> var boolArray:Array = new Array();
>
> switch (index)
> {
> according to the case I define both arraies' values : itemArray and
> boolArray
> }
>
> var chartMenu = new ContextMenu();
> chartMenu.hideBuiltInItems();
> chartMenu.builtInItems.forward_back = false; // and so on
> chartMenu.builtInItems.loop = false;
> chartMenu.builtInItems.print = false;
> chartMenu.builtInItems.quality = false;
> chartMenu.builtInItems.rewind = false;
> chartMenu.builtInItems.save = false;
> chartMenu.builtInItems.zoom = false;
>
> Alert.show("chartMenu.builtInItems.loop : " + chartMenu.builtInItems.loop,
> "______Message__", Alert.OK);
>
> for (var i:Number=0; i<itemArray.length; i++)
> {
> var item:ContextMenuItem = new ContextMenuItem(itemArray[i],
> openTheDetailsPanel, boolArray[i]);
> chartMenu.customItems.push(item);
> }
>
> mx.core.Application.application.menu = chartMenu; // I
> get a Menu but I logically need to click on the graph to update the items.
> // event.target.menu = chartMenu; // It doesn't work
> }
>
> Thank you so much for all replies on my mails!
> David
>
> **********************************************************************
>
> Coface facilite les echanges entre les entreprises partout dans le monde.
> Pour cela, elle offre a toutes les entreprises des solutions pour gerer,
> financer et proteger leur poste client, en leur permettant d'externaliser
> tout ou partie de la gestion et des risques lies a leurs relations
> commerciales. Coface est notee AA par Fitch Ratings et Aa3 par Moody's.
>
> Pour en savoir plus, http://www.coface.fr
>
>
>
> Coface facilitates business-to-business commerce worldwide. It offers all
> size companies an array of solutions to manage, finance, and protect their
> accounts receivables affording them the option of fully or partly
> outsourcing trade relationship management and attendant risks. Coface is
> rated AA by Fitch ratings and Aa3 by Moody's.
>
> More about Coface, http://www.coface.com
>
>
>
> WARNING :
>
> - Soyez conscient que notre systeme Anti-Spam peut parfois rejeter des
> messages, soit parce que certains mots et types de fichiers ne sont pas
> acceptes, ou bien parce que le mail n'a pas ete identifie correctement.
>
> - Be aware that from time to time our Anti-Spam system may reject mails
> either because some words and types of files are not allowed or because
> mails are misidentified.
>
> **********************************************************************
>
> --
> 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
>
>
> 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.
>
> ________________________________
>
--
::::: Aldo Bucchi :::::
mobile (56) 8 429 8300
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12h1lfqoc/M=362131.6882499.7825260.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1123011430/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~->
--
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/