ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Resizing element in Flash dynamically with XML

July 27, 2009 6:00pm

Subscribe [2]
  • #1 / Jul 27, 2009 6:00pm

    tomazbojc

    32 posts

    I have a map which will be divided into several clusters. Each cluster will be marked with a red dot. That dot needs to be resized dynamically (bigger or smaller) according to it’s value. I have attached image for reference. Now, the way I would approach this problem…

    - Create weblog with categories for each cluster
    - Custom weblog field: Drop-down List with options from 1-10 (1 for Min and 10 for Max size)

    I assume that I need to put this data to XML file and link it to Flash file. Here I come to a dead end as I have never done something similar and I would need some help from you guys.

    I would be grateful for any advice, link, tutorial or other kind of assistance.

    Also, if any one could do this for me, they can send me PM.

  • #2 / Jul 27, 2009 7:05pm

    ChiefAlchemist

    913 posts

    I’m not sure of the details but I would think you could create a series of red dots. e.g.,  red_dot_1.prg, red_dot_2.png… red_dot_10.png and then use z-index to lay the appropriate .png over top of each grid location.

    The fact that it’s static (or sounds like it is) then the overlay shouldn’t be so hard to algorithm-ize. Or one would hope 😊

  • #3 / Jul 28, 2009 4:51am

    tomazbojc

    32 posts

    That would be one way of doing it. However, size of those dots would change according to the entered value.
    That map will represent the spread of H1N1 flu (pig flu). So as the numbers will grow so will the size of those dots. That makes it dynamic, I think.

    It would be much easier to put this thing in Flash. Any other ideas, tips or links?

  • #4 / Jul 28, 2009 8:53am

    ChiefAlchemist

    913 posts

    Good morning

    - I think I’m missing something here. When / where are these numbers being entered? On the live public facing side of the site? Or via the EE backend? It sounds like it’s via the EE backend, correct?

    - Why Flash? What do you think Flash is going to accomplish that CSS (+ Javascript or JQuery?) can not? IMHO Flash is going to add an unnecessary layer of development and complexity to what looks to be a fairly simple display issue.

    - If you’re going to use Flash then why use EE? I’m not sure, but it sounds like a simple table of Long, Lat and value is all you need. That can be done without EE, no?

  • #5 / Jul 28, 2009 9:21am

    tomazbojc

    32 posts

    Hi ChiefAlchemist, I was doing some thinking on this subject and you’re right. This could be achived through css&html;for positioning and EE {if} conditionals for size of dots (or could this be achived with JS?).

  • #6 / Jul 28, 2009 12:16pm

    ChiefAlchemist

    913 posts

    Howdy Tomas!

    I’m not even sure you need nested Ifs. For example, the category of the size might be 1, 2, 3… 10. When you build the page in EE all you’d need to do is dot-image{category}.png. And have a dot-image1.png, dot-image2.png, etc. pre made and sitting in an image folder. You might even be able to just use the category image.

    The issue to me seems to be positioning. Which I would think you could do with CSS margin:. It all depends on if each dot-image{category}.png is the same dimension or if you - for some reason - make the small dots smaller and the larger, well, um… larger 😊 Since margin is off the edge - not the center - you’d have to come up with some sort of offset to adjust the location is the sizes weren’t fixed. Ya dig?

    I’m not sure if you’re building a grid or having to position the dots over the map at some longitude / latitude.

    One addition thought… you might want to consider how you could build a history into the map. In other words, not only does size matter but so does trend/delta (i.e., is it increasing or decreasing and by how much). I realize you might be trying to keep it simple, but given the nature of the application some additional trending info seem to increase the value of your graph.

    Hope this helps. Let me know.

    MFS

  • #7 / Jul 29, 2009 2:19am

    tomazbojc

    32 posts

    Hi ChiefAlchemist ! I rely appreciate your input on this 😊 The project will hopefully come in the next few days and I also managed to put this map in second phase and giving myself more time to think about this in depth.
    Yes, I was also thinking about trend and I came up with this simple jQuery graph solution:
    http://omnipotent.net/jquery.sparkline . It would be directly connected with this map though.

  • #8 / Jul 29, 2009 9:33am

    ChiefAlchemist

    913 posts

    ‘Mornin’ sir

    No worries. You’re like me… Always trying to think ahead - and trying not get killed making a bad estimate 😉

    The graph looks good. I’ve been getting into JQuery plugin by pluginn. Loads of cool stuff without the “overhead” of Flash.

    See… I was thinking you could colour code the dots to indicate increasing and decreasing, at least from one posting to the next. Something simple that adds an additional (and necessary?) dimension of information / intelligence to the data the map is depicting.

    Maybe you can use a nice tool tip to convey more info on an as needed basis.

    Good luck. Hope you get the gig.

    MFS

  • #9 / Jul 30, 2009 3:33am

    tomazbojc

    32 posts

    I will try this thing either way 😊

  • #10 / Jul 31, 2009 9:12am

    ChiefAlchemist

    913 posts

    Thataboy 😊

    Z-index, hover and JQuery are soon to be your best friend.

    Go get’em!!!

  • #11 / Aug 06, 2009 11:21pm

    ChiefAlchemist

    913 posts

    Tomas

    I just bumped into this. Thought it might suit you as well…

    http://www.jankoatwarpspeed.com/post/2009/04/19/Create-CSS-pin-balloons-with-ease.aspx

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases