I’ve made a minor update that brings us to Soma 1.6.4 and SomaUI 1.0.6, you can get the new versions from the SomaUI page.
In the XML Site Definition, the attribute urlfriendly in a page node builds the URL for the deep-linking and in previous version this attribute had to be unique through the XML. It is no longer the case, you can now have identical parts in the URL.
This wasn’t possible before:
/#/page1/common-urlfriendly/
/#/page2/common-urlfriendly/
/#/page3/common-urlfriendly/
Only the PageManager changed, you can update your sources from the previous version without problem.
And by the way, from now, I’ll be release only minor update for Soma and SomaUI as I’m working on the v2 for both of them.
3 Comments »
I made a small update in the SomaText class (also Soma and SomaUI) because of a bad behavior with the TextField class. The TextField instance is losing the HTML formatting in case you set the htmlText and then set the multiline property to true (the other way keeps the formatting).
To reproduce the behavior:
1. create a next TextField instance
2. set some htmlText with formatting (like P and BR)
3. set the multiline property to true
Not a big deal but SomaText solves this behavior (working either way). I’ve also updated Soma and SomaUI as the framework can process TextField properties in the XML you might have found formatting problems with some SomaUI Templates (or when using the TemplateParser). The Soma Protest sources are using styles from a CSS, not TextField property in the XML, so no problem).
Anyway, everything should work as expected now.
No Comments »
Another tutorial but for the Flash Develop users this time. I explain how to create a Flash Develop project and compile the site after exporting a project from SomaUI.
The tutorial is available in the SomaUI page or here.
Thanks to Keita for this one
2 Comments »
A new tutorial is available for Soma (Flash AS3 MVC Framework), I explain how to create a FDT project in eclipse and compile the site after exporting a project from SomaUI.
It also shows you how I use a SWC file as a Flash Library for a pure actionscript project.
Hope it is useful for all the FDT user (thanks Powerflasher!).
The tutorial is available in the SomaUI page or here.
No Comments »
Posted by: Romuald in SomaUI, tags: as3, class, css, flash
I recently built for my framework Soma a subclass of the TextField Flash built-in class to be able to easily use styles with a textfield: SomaText.
I've extracted SomaText from the framework to be able to use it without Soma. It has powerful features such as default values, default stylesheet and styles. SomaText is able to parse the stylesheet to apply TextField and TextFormat properties straight from the stylesheet. You can also get a full description of the properties and styles applied by tracing the SomaText instance.
SomaText can be used as a label or as a more complicated TextField with HTML tags.
You will be fine with SomaText as it is extending the TextField class and SomaText also shorten the syntax when you create instances.
You can download the SomaText sources and documentation in the SomaText page.
The SomaText standalone is slightly different than the one in the framework (the global stylesheet registration is different), but you can find some explanation in the SomaProtest stylesheet page.
See a full list of CSS properties you can use with SomaText.
As a quick example, here are some SomaText syntax:
Actionscript:
-
SomaText.globalStyleSheet = _globalStylesheetLoaded;
-
// text
-
var s1:SomaText = new SomaText("simple text");
-
addChild(s1);
-
// text with style from the global stylesheet
-
var s2:SomaText = new SomaText("text with style from the global stylesheet", "simpleStyle");
-
addChild(s2);
-
// text with style from another stylesheet
-
var s3:SomaText = new SomaText("text with style from another stylesheet", "simpleStyle", _customStylesheet);
-
addChild(s3);
-
// multiline text with properties set in actionscript
-
var s4:SomaText = new SomaText("multiline text with textfield properties modified in the actionscript: width, multiline, wordWrap, selectable, and so on.", "defaultText");
-
s4.width = 220;
-
s4.multiline = true;
-
s4.wordWrap = true;
-
s4.selectable = true;
-
// can be set in the constructor or using the setProperties method:
-
//s4.setProperties({width: 220, multiline: true, wordWrap: true, selectable: true});
-
addChild(s4);
-
// multiline text with properties set in the stylesheet
-
var s5:SomaText = new SomaText("multiline text with textfield properties set in the stylesheet: width, multiline, word-wrap, selectable, and so on.", "defaultTextMultiline");
-
addChild(s5);
And the global stylesheet used:
CSS:
-
.defaultTextMultiline {
-
font-family: "Arial";
-
font-size: 11;
-
color: #2C384E;
-
width: 220;
-
multiline: true;
-
word-wrap: true;
-
selectable: true;
-
}
-
a {
-
color: #002F7D;
-
}
-
a:hover {
-
color: #5C2E2E;
-
text-decoration: underline;
-
}
-
.simpleStyle {
-
font-family: "Arial";
-
font-size: 16;
-
color: #8DA0C0;
-
}
-
.defaultText {
-
font-family: "Arial";
-
font-size: 11;
-
color: #2C384E;
-
}
-
.para {
-
font-family: "Arial";
-
font-size: 18;
-
color: #004040;
-
}
-
.color1 {
-
color: #C1540B;
-
}
No Comments »