Hello,
Little question about pixlib / pixioc :
- I have a litlle set of "only code" components that I use in my pix
projects
Where is the best place to create them?
I'm actualy creating them in the view class
best in the view swf ? like the other graphical elements...
- I will now work width graphic designers to create several templates
for a pixioc project
How to allow them to use their own components (components with their own
logic and methods) ?
I know that best the way is to modify the view class but that is likely
to be hard for the graphic designer (to have pixlib, import the good
classes, etc)
What do you think about using a setData(o) method in the view swf to
allow all possibilities ?
- how to resize views ?
I'm actualy resizing them in the view class..
What do you think about using a setSize(w,h) function in the view swf ?
That would make it possible to the graphic designer to manage the
redimensioning of the view...
Is there a best way ?
example :
MyView.as
--------------------------------------------------------------------
public function MyView(){
view.dispatch = Delegate.create(this, _onDispatch);
view.setSize(200, 200);
}
public function onChangeData(o){
view.setData(o);
}
private function _onDispatch(name:String, o:Object){
_firePrivateEvent(...
}
myView.fla
--------------------------------------------------------------------
public function setSize(w, h){
myTxt._width = w;
myTxt._height = h;
myTxt.onSetFocus = Delegate.create(this, _onSetFocus);
}
public function setData(o){
myTxt.text = o.data
}
private function _onSetFocus(){
dispatch("onSetFocus", {text:myTxt.text });
}
-----
not too confused ?
thanks.
Hash
_______________________________________________
Pixlib mailing list
Pixlib@...
http://osflash.org/mailman/listinfo/pixlib_osflash.org