Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

insert image

0 views
Skip to first unread message

Patrick wagenaar

unread,
Apr 15, 2002, 11:12:47 AM4/15/02
to
Hi Guys,

Is it possible to insert an image into a scrollable text area? And if its
possible, can you please tell me how!!!!

Thanks

--
Patrick Wagenaar

Peter Elst

unread,
Apr 15, 2002, 11:23:19 AM4/15/02
to
Well, it isn't possible in a simple scrollable textarea ... you could
possibly write a function to create an empty movieclip, load an image in it
detect width and height, detect width and height of your textfield and
position it above or under some text.

It isn't possible to have text wrap around the image or anything (well it's
not entirely impossible in Flash MX but it would require some serious work
splitting of strings, creating new textfields, repositioning ...)

Straightforward answer would be not possible, although if you've got a week
to experiment with it you might get pretty damn close to achieving something
like that. But then ofcourse I'm talking about doing it in Flash MX, in
Flash 5 I wouldn't even dream of trying something like that.

Regards,

Peter

"Patrick wagenaar" <wage...@aride.nl> schreef in bericht
news:a9eqac$5vq$1...@forums.macromedia.com...

Jennifer

unread,
Apr 15, 2002, 11:40:43 AM4/15/02
to
Try the ScrollPane component in Flash MX. You need to make a movie clip of
your scrollable items, and in your library, go to linkage for this mc
[right-click on it]. Choose 'Export for Actionscript' and 'Export in 1st
Frame'. Give it a name here too.

Now put your ScrollPane on stage, and click on scroll content, in the
properties dialog. Put the name that you put in the linkage dialog, here.

Extra note: while creating the movie clip to be scrolled, if you are using
dynamic text, and want to insert an image, you may be able to do this, using
the new text features they added. Try this:

_root.createTextField("mytext", 1,50,50,120,50);
mytext.autoSize="right";
mytext.multiline = true;
mytext.wordWrap = true;
mytext.border = true;
mytext.html = true;
mytext.htmlText = "<p>zero</p><p>one</p><p>three</p><p>seven</p>ten";
mytextHeight = getProperty (mytext, _height);

Now, knowing the height of your dynamic text field, you can dynamically set
the position of your image, based on the height of the text box.

Do not forget to embed font outlines, or your dynamic text inside the mc,
inside the scrollpane will do strange things.

Good luck,
Jenn

0 new messages