teotigraphix.blog.show()

Flex2 :: Runtime CSS Project

Hi,

Well, it has been discussed on flexcoders now a couple times. There are some other developers I think I am going to try and help so we can get this out as open source. I think something like this would benefit the whole Flex2 movement. I know I need it in a couple projects I am working on.

David Mendals from Adobe just announced on flexcoders that this is definitly not going to be in v2, maybe 2.5 or 3.0 he said. So in the interum, we will get something together so you can load style sheets at runtime and apply them by finding style names.

I still have a lot more to think about this but, now I really am going to devote some time to it.

I had written a runtime css in AS2 that worked nicely with v2 components, so it won’t be that hard to port. I need to investigate the style framework a bit more.

Look for this in the comming months.

Ben, one of the devs has already been working on an ‘applier’ class.

Check it out Here

Peace, Mike

7 Responses to “Flex2 :: Runtime CSS Project”

  1. JabbyPanda Says:

    What are your plans regarding your classes that do runtime CSS parsing in AS2?

    Will you keep them from the rest of the world as a top-guarded secret?

    ps

    Seems like we had hit with our CSS parser in Flex 1.5 serious performance problems… We continue investigating with AS Profiler..

  2. teoti.graphix Says:

    > Will you keep them from the rest of the world as a top-guarded secret?

    HA, I posted some of them on flexcoders yesterday. Ben Stucki has an applier that is good and I have cache and style sheet ideas.

    Flexcoders, we are talking about putting it on osflash.org. Anyway, check the archives for recent CSS talk.

    Stuff like this I don’t mind sharing, there comes a point where you just can’t give away some work becasue you are planning a return on investment IE time.

    Remember, Flex 1.5 was ASVM1, ASVM2 is very fast. I doubt through using some coding tricks we will run into that problem.

    Peace, Mike

  3. JabbyPanda Says:

    ps

    I promised you to keep updating you on our CSS parser in AS2… It was not me, who had written, I will ask an author about his direct opinion on possible releasing open-source of our code.

    What I can say, that the authour is very keen on AS2 Lib.

    He is using ArrayList data type and RegEx Matcher patterns in CSS AS2 parser… Maybe AS2 Lib implemenatation of RegEx is too slow, can not say abything right now.

  4. JabbyPanda Says:

    You do not have to persuade me, that ASVM2 is blazingy fast, I saw the truth here:
    http://oddhammer.com/actionscriptperformance/set4/

    But because of low penetration figures of Flash Player 9 at the authumn 2006, we stick to Flex 1.5 at 2006.

  5. teoti.graphix Says:

    > Maybe AS2 Lib implemenatation of RegEx is too slow,

    I think as3 regexp will kick it’s ass. I wrote a documenter using big time regexp(I love regexp) and it is tremendoulsy fast. I would say the native will beat it by leaps and bounds.

    Peace, Mike

  6. JabbyPanda Says:

    I took me some time to get used to your proffesional jargon.

    You say - “Applier”, ha-ha,
    I understand - an approach to set CSS styles in run-time in Flash(Flex) applications via setStyle AS2( AS3) operand

    We built applier in your therminology in Flex 1.5, we use at the dead end setStyle operand to set CSS dynamically in the run-time.

    You say “Cache” and “External StyleSheet” ideas
    I understand use TextField.StyleSheet.onLoad from Flash MX 2004 API to load CSS file in run-time, store contents in External StyleSheet…. and then I lost a track :)

    ps1
    com.teotigraphix.utils.TeoUtility.createStyleSheet factory class is not included in your Flexcoders post

    ps2
    yes I am subscribed to Flexcoders, just happened to miss your quite a huge code snippet (ExternalStyle.as 700 lines of code)

  7. teoti.graphix Says:

    > You say “Cache” and “External StyleSheet” ideas

    This is a way to save miltiple style sheets, with said style objects. To lengthy to explain right now but, the ideas worked well.

    > yes I am subscribed to Flexcoders,

    That was called English language sarcasm. :)

    The idea is, you can load seperate style sheets and keep them in memory while updating them. You can also dump an instances styles into a REAL .css file. OR .xml. I found XML to be nicer, this I will have to see about.

    I will get it working. I am going to take a day break on the docuementer and test some of my ideas.

    Peace, Mike

Leave a Reply