I’m working on the next version of our component set and implementing all of it’s styles. I was trying to figure out how components knew to redraw themselves when one of their styles change since they don’t seem to subscribe to any style events.
After digging for a while I found mx.styles.CSSSetStyle and notifyStyleChangeInChildren(). Seems a little odd, it loops through every movie clip in the entire application and calls invalidate style based on some criteria. Regardless of criteria, it recursively loops through every movie clip in the entire application.
This is all based on a single setStyle call. So, I did a little testing. I put a trace statement in notifyStyleChangeInChildren, added a bunch of components to the stage, and a few frames later I made some setStyle calls. With one setStyle call, notifyStyleChangeInChildren was called 316 times and with four calls 1260 times.
That’s a lot of calls, and a few seconds of frozen movie. So seems like we need a new setStyle method that invalidates the call to notifyStyleChangeInChildren, which itself just invalidates styles. Or better yet, how about adding in an event interface so we don’t loop through every movie clip but instead only those that use the style we changed.
Oh, and btw, it only loops through clips from _level0 onward. I guess if you load things into _level1 or higher, they don’t update based on style changes.
Our employer, B-Line Express, will have a booth at MAX to showcase our B-Line Charting Components. We’ll be demonstrating both the currently available 2.5 set and the in-development 3.0 version. This latter version is a complete re-architecture around the v2 framework and supports both Macromedia Flash MX 2004 and Macromedia Flex. If you’re at MAX, come by our booth to check out how our components can be easily integrated into a Macromedia Flex application with code such as follows.
Macromedia today announced their newest product, Macromedia Flex. This is the final name for what was previously coded as Royale. This is a great product that Chafic and I have had the privilege to be involved with over the past several months. With Flex it is so easy to snap together all your components with a very straightforward XML grammar. Then you can attach your AS2 classes to control the whole application. It lets you concentrate on the specifics of your application and greatly improves the entire development process.
The hope here is that Macromedia Flex will bring RIA development beyond Macromedia’s current aficionados. Flex is a server-side product meant to be easy for Java and .NET programmers to pick up and integrate into their applications. By using declarative XML syntax and familiar application and form based concepts as well as the OOP friendly AS2 language, Flex is far better for traditional programmers developing RIA’s as compared to Macromedia Flash. With Flex you never need to worry about animation-related concepts found in Flash such as the stage or timeline. This will make component based development even more important in the future.
This expanded market also will be a boon for component developers, which can now be sold to both Macromedia Flash and Macromedia Flex developers.
Macromedia Flex is in beta now and due out early next year. To read more about Flex from Macromedia click here. To apply for the beta program click here.
The internet is a wonderful thing. It lets everyone from all over the world communicate with one another. At least, it does if they have a common language.
MAX looks like it’s getting great turnout including international turnout, as is evidenced by the international pings to MAX Bloggers.
Unfortunately, I’m not able to read all of the posts since I’m not educated in German and Dutch and my Portuguese is way too rusty. I guess this aggregator is a good example of why people should build language filters into the aggregator.
Ideally, it would be best to support all languages and let visitors specify which languages they can read and filter out all others. However, if an aggregator is written on short notice, totally filtering for just one language would work too.
RSS has a language identifier for this purpose, so aggregator should take advatnage of that. I’m not sure how many aggregators do filter on language, but I don’t remember seeing non-English posts in the MXNA, Full as a Goog, or FLOG.
If you’re going to MAX, you should have received an e-mail with resources including links to presentations, the MAX Cetral App (very kewl), and Intro. Macromedia will not be distributing handbooks this year that have all the slides printed up. Therefore, everyone that’s attending should print up all the slides for the sessions they”ve signed up for and bring them to Salt Lake City.
And while you’re at it, be sure to install the very nice Central app that can show you where all the rooms are and give you reminders for sessions.
It’s Sunday night and my flight is in the morning.. getting excited now!