my calendar component has 8 rows. the first 2 lay out at the top of the bounding box but my remaining 6, well…the first one lays out on the very last row of the bounding box and the next 5 outside and below the bounding box. any ideas why this might be happening?
every other component i’ve seen has all the artwork and data encapsulated in the bounding box when you drag an instant of it onstage. i’ve been looking thru some of the .as filesthat come with mx2004 to see how they set it up but i can’t figure out where i’m going wrong.
regardless of the size of the component?
i dont know much about bounding boxes/calendars etc… but i do know that you need some relation to the bounding box in order to display all of them at all times/circumstances…
the component is set to a default size of 200 x 200. so when i drag an instance of it from the component panel onto the stage it starts off at 200 x 200. theoretically, everything should be laid out within this 200 x 200 dimension (however, part of mine lays out fine and other parts get laid out outside of this box).
the strange thing is that although it appears all messed up when i drag an instance of it onstage, when i compile everything is laid out correctly. so what’s happening there??? that’s where the problem lies. compiling will lay it out fine, but something about the authoring time dimensions that screws it up…hmmm…
the bounding box sets the renderable area of the component. apart from that it’s only used for live preview during authoring time. my positioning shouldn’t be based upon it.
thanks for helping me think this through. - fumeng.
is there code that defines the sizes/positions? coz as u no doubt know, [a) this can be done… and b)] AS isnt rendered in authoring enviros
but whats the problem then or is it just one of those niggling problems like the small stain in the corner of the ceiling that noone will notice apart from u so u just HAVE to repaint the ceiling?? lol
i found the source of the problem but still don’t know the solution.
in the authoring environment, it’s as if the days of the month are being drawn out but they’re invisible – hence all the white space.
then the days are finally drawn out on 2nd pass. this makes sense. the last day of august is on a tuesday and my august days are finally appearing but starting on the wednesday. why aren’t the days being drawn out on the 1st pass??
hmmm…no idea.
i have a draw() function which draws out all the dates. it runs once and then it’s run again once the xml is parsed.
could that be the cause? these dates are waiting for the xml to be parsed before they’re completely drawn???
yeah, it’s the xml. i took it out and everything is laying out fine in the authoring environment. i’m working on a way to take out the highlighting with the xml and put it in its own function. hopefully this will solve the problem.
i’ve been working on it all day and it’s coming along nicely save for some scope issues. i’m just having some issues with creating references to class members. anyhow, after that i should be done. – thanks.