dcsimg
A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Flash MX 2004 -- Image/Text Wrap

  1. #1
    Senior Member
    Join Date
    Aug 2003
    Location
    Gainesville, VA
    Posts
    102

    Flash MX 2004 -- Image/Text Wrap

    From what I read before I got MX 2004, it had the ability to add an image into a text field so that words would wrap around it (and very easily at that)..

    The help portion of MX 2004 is nearly useless currently and the macromedia site has no information that I could find..

    Anyone know how this is accomplished?

    Currently all text on the site loads into text boxes from external text files. However, this page has "Executive Profiles" which will include a portrait.. can I still do this externally or do I have to have it directly in the SWF for it to wrap around the image?

    Thank you in advance.

  2. #2
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food
    Posts
    3,789
    try this;
    Code:
    this.createTextField("_txt", 1, 0, 0, 300, 300).html = true;
    _txt.htmlText = "<img src=\"http://macromedia.com/images/homepage/promos/passion.jpg\">";
    for (var i = 0; i < 5; i++) {
    	_txt.htmlText += "wrap around<br>";
    }
    i don't have MX4 installed here at work so i cant test it...

  3. #3
    Danny Gomez Creations cosmiceye's Avatar
    Join Date
    Mar 2002
    Location
    under a palmtree in Jamaica waiting for psytopia 2005 to begin
    Posts
    982
    But u work @ macromedia, right??

    BTW, have you chased the broadcaster thingy? Ive read something about it, but as I understod it they reffered to a "mybroadcastingobject" as a native object only or component. Looked at the component classes, but I dont know if I got smarter or dumber of the whole trip....
    ..:: P S Y T O P I A 2 0 0 5 :::..
    . . . view the psytopia reels _____RIVEND REEL | GOMEZ REEL_____ . . . . . . . . . . .

  4. #4
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food
    Posts
    3,789
    Originally posted by cosmiceye
    But u work @ macromedia, right??
    Nope... I am a Team Macromedia Volunteer For Central as well as an enthusiast / aficionado / worshiper.

    Heres a quick test
    Code:
    for (var i = 0; i < 10; i++) {
    	_txt.htmlText += "wrap around<br>";
    }
    _txt.htmlText += "<img src='image.jpg'>";
    for (var i = 0; i < 10; i++) {
    	_txt.htmlText += "wrap around<br>";
    }
    Works fine...

  5. #5
    Senior Member
    Join Date
    Aug 2003
    Location
    Gainesville, VA
    Posts
    102
    Ok.. now I have this:

    PHP Code:
        huyakorn.htmlText += "<img src='huyakorn.jpg'>";
        for (var 
    01i++) {
            
    huyakorn.htmlText += myData.huyakorn;
        } 
    I removed the first one since I want the image top left.. my text loads fine. The image however still doesn't load. I've even tried putting in the full address to the image. I get no errors, but I get no image.

    Is this not possible with external data?
    Last edited by 1337designs; 09-12-2003 at 11:25 AM.

  6. #6
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food
    Posts
    3,789
    is the jpg non-progressive (can you load it into a movieclip)?

  7. #7
    Senior Member
    Join Date
    Aug 2002
    Location
    Dublin, Ireland
    Posts
    1,749
    Works for me, very useful indeed.

  8. #8

    IMG tag breaks scrolling

    I like the img tag support too. I wanted to use it in a scrolling text field when I noticed there was no longer a scroll bar component. This is because text fileds now have a "scrollable" setting when you right click on them. However, if there is an img tag in the text, the scrolling does not work properly. Anyone else get this problem?

    -s

  9. #9
    Japanese l337 TRJNET's Avatar
    Join Date
    Mar 2001
    Location
    Toronto, Canada
    Posts
    399
    I just use the allowed html-attributes, here's what I use:
    PHP Code:
    <img src='http://blahblahblah.com/images/image.jpg'></a
    consultant / contractor / designer

  10. #10
    Junior Member
    Join Date
    May 2002
    Posts
    9

    Having same problem as designs1337

    I also tried the code for just putting the image in and it doesn't work. Does it work only on MX 04 or am I doing something wrong?
    The image dot.jpg is in the same folder with the .swf file. There are no errors, but the image doesn't show. Any ideas?

    createTextField("_txt", 1, 0, 0, 300, 300);
    _txt.html = true;
    _txt.htmlText = "<img src='dot.jpg'>";

    }

  11. #11
    Japanese l337 TRJNET's Avatar
    Join Date
    Mar 2001
    Location
    Toronto, Canada
    Posts
    399
    Isnt text-wrapping a Flash MX 2004 feature anyways ? ;p Thats probably why it might not be working. Grab the trial version to test it out.
    consultant / contractor / designer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center