Interactive Bubble Pipeline: Another Hybrid (HTML/Flex) Example

A customer recently pointed out to me that many of our examples feature full-page Flex applications, and wanted to me to demonstrate how a Flex application can integrate with an HTML/Ajax application. Hybrid applications are definitely part of our vision for Flex, and there are many real-life examples of mixing Flash and HTML content out there (see http://finance.google.com/finance?q=adbe). This customer wanted to look at the integration at the code level. Instead of the usual “Hello from Flex”/”Hello from JavaScript” message exchange example, I wanted to show something more meaningful that would also show “why” you would actually want to do this…

Click here to start the sample application.

I extracted this example from my Salesbuilder sample. The application is a simple sales pipeline. The X axis is a time axis, the Y axis represents the probability of closing deals (in percent), and the bubbles represent deals: the bigger the bubble, the bigger the deal.

The bubble chart features many “direct manipulation” options:

  1. Grab the background of the chart with your mouse and scroll it left and write to navigate along the time axis.
  2. Grab a vertical grid line, and move it left and right to zoom-out/zoom-in.
  3. To modify your pipeline, grab a bubble with your mouse and move it up and down or left and right to adjust the probability and the expected closing date respectively

Flex to JavaScript:
When you move bubbles, the Flex application invokes a JavaScript method to update the Projected Revenue which is displayed in plain HTML on the page.

JavaScript to Flex:
You can also add opportunities (deals) using the HTML form at the bottom of the page.
For example, specify “Adobe” as the account, “Big Deal” as the project name, 500000 as the expected revenue, “50” as the days to close, and “70” as the probability.
When you click “Add Opportunity”, we use JavaScript to invoke the addOpportunity() method in the Flex application.

In this example, I use ExternalInterface to communicate between Flex and JavaScript. You can also use the Flex Ajax bridge which provides a higher level API and which is now integrated in FlexBuilder (version 3).

Click here to download the source code.

No rocket science here… just another example of a hybrid application.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • LinkedIn
  • StumbleUpon
  • Twitter
This entry was posted in Flex and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

29 Comments

  1. Sipho
    Posted November 18, 2007 at 2:19 pm | Permalink

    Christophe, I’m trying to get to a link on your old site: http://coenraets.com/apps/iframe/index.htm – I want to read your post on using iframes to embed html in flex apps. Could you please let me know if this post (source code included) is still accessible. Thanks

  2. wind star
    Posted November 26, 2007 at 6:46 am | Permalink

    I can not run this example,it may be have some problem,please help me!!

    2 Errors found.

    Error /PanAndZoom.as:45
    访问可能未定义的属性 horizontalAxisRenderers (通过 static 类型 mx.charts.chartClasses:CartesianChart 引用)。

    44: {
    45: var ticks:Array = CartesianChart(chart).horizontalAxisRenderers[0].ticks;
    46: var bHorizontal:Boolean = false;

    Error /PanAndZoom.as:55
    访问可能未定义的属性 verticalAxisRenderers (通过 static 类型 mx.charts.chartClasses:CartesianChart 引用)。

    54: }
    55: ticks = CartesianChart(chart).verticalAxisRenderers[0].ticks;
    56: var bVertical:Boolean = false;

  3. Posted November 27, 2007 at 1:31 am | Permalink

    Really good and really interesting post. I expect (and other readers maybe :)) new useful posts from you!
    Good luck and successes in blogging!

  4. Posted December 5, 2007 at 1:42 am | Permalink

    Really good! 谢谢你 share the source code for us! :-)

  5. dazvenginzks
    Posted August 3, 2008 at 5:02 pm | Permalink

    I’ve recently joined and wanted to introduce myself :)

  6. Posted August 22, 2008 at 5:42 am | Permalink

    Really good!

  7. Posted August 22, 2008 at 5:42 am | Permalink

    Good thanks ;)

  8. Posted August 22, 2008 at 5:43 am | Permalink

    güzeldi teşekkürler :)

  9. Posted August 22, 2008 at 5:44 am | Permalink

    thanks a lot ;)

  10. werutzb
    Posted October 7, 2008 at 9:44 pm | Permalink

    Hi!

    I would like extend my SQL capabilities.
    I red that many SQL books and want to
    get more about SQL for my work as mysql database manager.

    What would you recommend?

    Thanks,
    Werutz

  11. Posted October 15, 2008 at 11:10 pm | Permalink

    Реально занимательное место, мне тут понравилось, правда…
    Столько всего суперского и позновательного, я тут задержусь на долго.

  12. HSCharles
    Posted November 14, 2008 at 11:49 am | Permalink

    I have a flash website
    i’m looking for the script who makes google ads on flash.
    how can i get it?

  13. Posted November 20, 2008 at 9:22 pm | Permalink

    Somehow, it gets to be his wedding day.
    While he is walking down the isle, his father tugs his sleeve and says,

    “Son, when you get to the hotel room…Call me”

    Hours later he gets to the hotel room with his beautiful blushing bride and he calls his father,

    “Dad, we are the hotel, what do I do?”

    “O.K. Son, listen up, take off your clothes and get in the bed, then she should take off her clothes and get in the bed, if not help her. Then either way, ah, call me”

    A few moments later…

  14. Posted November 27, 2008 at 10:58 am | Permalink

    Keep a good work man!,

  15. Posted November 27, 2008 at 4:01 pm | Permalink

    Keep a good work man!,

  16. Posted March 5, 2009 at 12:06 am | Permalink

    x
    x
    madafakerimpresarionte

  17. DaveCahonne
    Posted March 10, 2009 at 10:11 am | Permalink

    Never underestimate the power of the internet. An increasing number of people use the internet
    to search for a business or service so having a web presence is an important media for promoting
    your company. Web design is a real skill and if your website is to not only look good but work well,
    it should be constructed by a professional web designer.

    If you are interested, you can contact me: hqwebdesign (AT) gmail (DOT) com

  18. Posted March 17, 2009 at 4:59 pm | Permalink

    Keep a good work man!,

  19. Posted April 2, 2009 at 9:21 am | Permalink

    Keep a good work man!

  20. Posted April 4, 2009 at 1:21 am | Permalink

    Mega Millions, Powerball, Lotto 6/49, Super 7, Euro million, New York Lotto – Be the Next Jackpot Winner With The Only Online Service That Enables You To Purchase Official Lottery Tickets From Around The World.

  21. Huilo
    Posted April 5, 2009 at 6:04 am | Permalink

    Если вы хотите узнать, как я взломали ваш сайт, послать $20 WMZ: Z385450145510 и электронной почте c3m3t3ry@gmail.com Спасибо.

  22. GlidsJeds
    Posted June 11, 2009 at 9:24 am | Permalink

    Hello,

    What is the best web hosting company?

    I’m trying to build a web site for my boss.

    thank you in advance,

    -Michelle

  23. Posted November 4, 2009 at 3:42 am | Permalink

    thanx for example

  24. Posted November 24, 2009 at 6:11 am | Permalink

    how are you babyy aq

  25. Posted December 3, 2009 at 12:01 pm | Permalink

    very very good

  26. Posted January 19, 2010 at 6:59 pm | Permalink

    thanks for admin :)

  27. Posted January 30, 2010 at 1:27 pm | Permalink

    How about making a contact form plugin with Hash-Cash? I want a contact form plugin, but I don’t want spam or captchas :)

  28. Posted February 13, 2010 at 1:31 pm | Permalink

    how are you baby

  29. Posted February 27, 2010 at 4:18 am | Permalink

    thanks site

7 Trackbacks

  1. [...] Christophe Coenraets » Interactive Bubble Pipeline: Another Hybrid (HTML/Flex) Example – When you move bubbles, the Flex application invokes a JavaScript method to update the Projected Revenue which is displayed in plain HTML on the page. [...]

  2. By spela texas holdem poker online on February 17, 2008 at 1:55 pm

    spela texas holdem poker online…

    Lawrence skullduggery queerness …

  3. By free on line slots on February 21, 2008 at 7:43 am

    free on line slots…

    sofa reusing Kowalewski …

  4. By florida renters insurance on July 17, 2008 at 1:30 pm

    florida renters insurance…

    broaden cooped Agway condensed:switching!heathen,…

  5. By caribbean poker on line on July 19, 2008 at 12:23 am

    caribbean poker on line…

    Riordan Californians precious?lavish …

  6. By tricare supplement insurance on August 3, 2008 at 11:36 am

    tricare supplement insurance…

    exhale.stifle salve expose undiminished locates …

  7. By internet poker black jack epassport on September 18, 2008 at 6:42 pm

    internet poker black jack epassport…

    kilobyte,freshwater viable sawtooth evidencing Sudanic …

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>