Hi Guys.
My first post here at the AS.org. -> been following along for some time.
I working on a WYSIWYG TextEditor i Flash, and it's more as an religiues state of mind that it has to be done in Flash. It's for our Danish Flash User Group, so "must be Flash"
Well I have worked out the TextEditor class okay, and it works as it should, with the basci functionalities, but I'm now trying to add "image upload" on the fly, so that one should be able to upload an image in the "blog editor" and the image will load right away. Kind of like the
www.flashtexteditor.com thing.
BUT I have NO control of the images what so ever. What I would like is when an image loads up into the editor, the "I" -courser is set under the image. I have tried all kinds of things and ends up with text alon the side of the image, text under the image and alle kind of crazy things.
I have sat the hspace to 0 and the image width to the same as the input field to make sure that text should not be able to "get along"

with the image
Right now i'm trying to work aroud text being able to get placed alon the side of the image, and to create a loader, by loader in a swf file, who using MovieClipLoader loads the image in.
But still i have to calculate "how big is this image" and then add like "<br />" tags according to the calculatet hight to get the "I" courser under the image, and ready for typing.
Is this just an imposible task, and should I surrender and get hold of html Editor to our blog system?
I know there isn't much "code" to take a look at, and that i might be very confusing as my english isn't to good, but I hope some one has an idea or suggestion of what could og should be tryied.
Code:
//---------------------------------------------------------------------------------------------------------------
// UPLOAD IMAGE FUNCTIONS: GIF PNG JPG
//---------------------------------------------------------------------------------------------------------------
private function uploadImage():Void
{
_editorText.htmlText += '<p><img width="'+Math.ceil(_editorText._width)+'" hspace="0" vspace="0" height="100" src="textImageLoader.swf"></p>';
_editorText.htmlText +='<p>This is a new line</p>';
setTextFocus(_editorText)
}
This is what happens right now when you push the "UPLOAD IMAGE" button.
As you can see the image is set to the width of the textField, and therefor the "This is a new line" should appear UNDER the image... but dosn't
you can see the editor her
http://www.dfug.dk/blog/opretBlog.html
Best Regards
Asger
From Denmark