Hi Doug,
After looking at the Alert.as and AlertForm.as classes, I agree with Daniel. Subclassing this component, just to get html bullets, is probably not worth it. You would first have to extend AlertForm.as and override the createChildren function. Instead of textField.text = Alert(parent).text you would use textField.htmlText = Alert(parent).text. Then you would extend Alert.as and replace AlertForm with your new class. After all of this, you still wouldn't be able to embed the images using html. Because its, well...html. (note: alternately, you could use the <LI> html tag for bullets).
Another way is to create your own custom TitleWindow or Panel popup. Here you can use text and image controls, with a List or Repeater, to achieve the desired effect. This would allow you to use embedded images, but you would have to handle all of the button functions yourself. It doesn't seem to be getting easier, huh?
I guess that the method you choose depends on the use case. If you only need to show a message with an OK button, the second approach sounds easiest. If, however, you will need all of the built-in button functions of the Alert class, the first approach would be preferable. Either way, you are going to have to jump through some hoops. I personally prefer the first approach. It doesn't require you to reinvent the wheel and presents itself as a challenge to extend the framework.
Good Luck,
Tim Hoff
--- In flexcoders@yahoogroups.com, "Doug Arthur" <[EMAIL PROTECTED]> wrote:
>
> Awesome, thanks... Now how would I embed an image in htmlText?
>
> - Doug
>
>
> On 8/7/06, Tim Hoff [EMAIL PROTECTED] wrote:
> >
> > Hi Doug,
> >
> > To do this, you are probably going to have to create your own
> > component that extends the Alert class. Instead of text, use htmlText.
> >
> > -TH
> >
> > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>, "Doug
> > Arthur" dougarthur@
> >
> > wrote:
> > >
> > > Does anyone know how to add an image in the text that I would put in
> > an
> > > Alert.show()???
> > >
> > > Here's why I'm trying to do this, I'm alerting an error, and I want
> > an image
> > > to bullet point some items.
> > >
> > > Thanks!
> > >
> >
> >
> >
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___