List Info

Thread: Re: asfunction




Re: asfunction
country flaguser name
France
2007-09-13 05:15:38
Thanks to all !!

I started using (an understanding) the _htmlrequesthandler
way from Stefan
that work perfecty, but I finaly used cosmin way that also
works perfecty

Thanks to all for resolving this issue.

Niko (not feeling occasional asfunction dysfunction any more
 )
> -----Message d'origine-----
> De : pixlib-bouncesosflash.org
[mailto:pixlib-bouncesosflash.org] De la
> part de devbinarycrafts.com
> Envoyé : mardi 11 septembre 2007 20:19
> À : pixlibosflash.org
> Objet : Re: [Pixlib] asfunction
> 
> _tfTitle['_onLabelClick'] = ...
> should be
> view['_onLabelClick'] = ...
> 
> My example was using a Label component instance but if
you are using a
> textfield then the view property must hold the
callback. I tried to
> explain more here:
> http://cosmincimpoi.blogspot.com/2007/0
9/buy-cheap-asfunction-treatments-
> online.html
> 
> cosmin
> 
> > Thanks all for your replys !
> >
> > I tried to use the delegate solution, but with out
any results...
> > I must miss something.....
> >
> > Here is my View Class if anyone as a idea :
> >
> > [code]
> > import com.bourre.commands.Delegate;
> > import com.bourre.events.BasicEvent;
> > import com.bourre.events.EventBroadcaster;
> > import com.bourre.events.ValueObjectEvent;
> > import com.bourre.visual.MovieClipHelper;
> > import com.galeries.event.EventList;
> > import com.galeries.model.XmlListener;
> > import com.galeries.view.ViewList;
> > import com.bourre.log.PixlibDebug;
> >
> > class com.galeries.view.UI
> > 	extends MovieClipHelper
> > 	implements XmlListener
> > {
> > 	private var _pbXml : MovieClip;
> > 	private var _tfMenu : Object;
> > 	private var _tfTitle : TextField;
> >
> > 	public function UI()
> > 	{
> > 		super( ViewList.UI );
> >
> > 		_tfTitle = resolveUI("title_txt");
> > 		_tfTitle.html = true;
> > 		_tfTitle.selectable = false;
> >
> > 		_tfMenu = resolveUI("menu_txt");
> > 		_tfMenu.html = true;
> > 		_tfMenu.selectable = false;
> >
> > 		_pbXml = resolveUI("load_btn");
> > 		_pbXml.onPress = Delegate.create( this, _getXml
);
> > 	}
> >
> > 	private function _getXml() : Void
> > 	{
> > 		EventBroadcaster.getInstance().broadcastEvent(
new
> > ValueObjectEvent(EventList.getXmlEVENT,
"") );
> > 	}
> >
> > 	function _onLabelClick(){
> > 		trace('label was clicked');
> > 		_tfTitle.text = 'label was clicked';
> > 	}
> >
> > 	public function onXmlChange(e : ValueObjectEvent)
: Void {
> >
> >
> > 		_tfTitle['_onLabelClick'] = Delegate.create(
this,
> > _onLabelClick);
> > 		_tfTitle.htmlText = '<a
href="asfunction:_onLabelClick">'+
> > e.getValueObject().title+'</a>';
> >
> >
> > 	}
> >
> > }
> > [/code]
> >
> >> -----Message d'origine-----
> >> De : pixlib-bouncesosflash.org
[mailto:pixlib-bouncesosflash.org] De
> >> la
> >> part de devbinarycrafts.com
> >> Envoyé : mardi 11 septembre 2007 12:00
> >> À : pixlibosflash.org
> >> Objet : Re: [Pixlib] asfunction
> >>
> >> The whole idea with asfunction is that the
method is called on the
> >> MovieClip that holds the html text. True also
for the Label Component.
> >> So
> >> I use it like this in my views:
> >>
> >> var _myLabel : Label;
> >> ...
> >> _myLabel['_onLabelClick'] = Delegate.create(
this, this._onLabelClick);
> >> ...
> >> function _onLabelClick(){
> >>   trace('label was clicked');
> >> }
> >>
> >> cosmin
> >>
> >> > Hello >
> >> > if you want, you can adapt my
AsfunctionProxy class with the Pixlib
> >> > implementation (Command etc...)
> >> >
> >> > http://www.ekameleon.net/blog/index.php?200
5/09/16/9-asfunctionproxy-
> >> asfunction-plus-de-probleme-de-scope
> >> >
> >> > The tutorial is old and in french ;)
> >> >
> >> > EKA+ 
> >> >
> >> > 2007/9/10, Nicolas RAUBER
<n.raubere-mazarine.com>:
> >> >>
> >> >> Hi list !
> >> >>
> >> >> I am having trouble using asfunction
in conjuction with
> pixlib/mtasc.
> >> >> In a view I am trying to fire a event
from a textfield using the
> >> >> asfunction
> >> >> protocol. I can't find the way to do
it.. having hard time to get
> the
> >> >> path
> >> >> to my Application (main class)
> >> >>
> >> >> Any idea ?
> >> >>
> >> >>
> >> >>
> >> >>
_______________________________________________
> >> >> Pixlib mailing list
> >> >> Pixlibosflash.org
> >> >> http://osflash.org/mailman/listinfo/pixlib_osflash.org

> >> >>
> >> >
_______________________________________________
> >> > Pixlib mailing list
> >> > Pixlibosflash.org
> >> > http://osflash.org/mailman/listinfo/pixlib_osflash.org

> >> >
> >>
> >>
> >>
_______________________________________________
> >> Pixlib mailing list
> >> Pixlibosflash.org
> >> http://osflash.org/mailman/listinfo/pixlib_osflash.org

> >
> >
> >
> > _______________________________________________
> > Pixlib mailing list
> > Pixlibosflash.org
> > http://osflash.org/mailman/listinfo/pixlib_osflash.org

> >
> 
> 
> _______________________________________________
> Pixlib mailing list
> Pixlibosflash.org
> http://osflash.org/mailman/listinfo/pixlib_osflash.org

> 




_______________________________________________
Pixlib mailing list
Pixlibosflash.org
http://osflash.org/mailman/listinfo/pixlib_osflash.org


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )