Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / June 2006



Tip: Looking for answers? Try searching our database.

urgent help - getting images in text area from databse

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Noor_nadaf - 26 Jun 2006 11:31 GMT
hi can some one help me to get solution for this problem

i am making one small cms system which is updating flash content ,  everything
is done and working properly but image tag is not getting display in text area
( image is not comming in text ara ) following is the coding

[b]for flash ( in first frame )[/b]
---------------------
loadVarsText = new LoadVars();
loadVarsText.load("admin/display.php?pagename=aboutus");
loadVarsText.onLoad = function(success) {
    if (success) {
        trace("done loading");
        _root.az.scroller.htmlText = this.content1;
    } else {
        trace("not loaded");
    }
};

////////////////////////////////////////////////////////////////////////////////
/////////////

[b]coding in display.php[/b]

<?php
    include"connect.php";
    $qry="select * from content where pagename ='$pagename'";
    $res = mysql_query($qry) or die($qry.mysql_error());
    $res_arr = mysql_fetch_array($res);
    $content = $res_arr["contents"];   
    //print "content1=$content";   
    echo "content1=$content";
?>

////////////////////////////////////////////////////////////////////////////////
///////

now its working perfect its showing perfect html content in flash even its
going well in databse but in text area of falsh its not showing i do have one
solution  or you can say hint

if we give value in flash itself then its shoing but its not showing when
variable coming from db

following is code for this

myTextField.htmlText = '<img src="http://designerden.net/images/logo.jpg"
width="168" height="42" border="0">';

 this works but its not work if variable coming from db
*********************************************
HELP ME OUT PLEASE
Motion Maker - 29 Jun 2006 02:19 GMT
This might be how the PHP program is forming the html.

Did you trace the this.content1 in the onLoad method.

trace("this.content1:"+this.content1);

Or use Control->Test Movie and then Debug->List Variables
In there you will look for the _root.az.scroller htmlText property and see
just what is in it.

Change the _root.az.scroller to not render html and then you also can view
the raw html.

Malformed html is often the problem with items such a incorrect delimiters,
unsupport html tags, and such.

Signature

Lon Hosford
www.lonhosford.com
Flash, Actionscript and Flash Media Server examples:
http://flashexamples.hosfordusa.com
May many happy bits flow your way!

> hi can some one help me to get solution for this problem
>
[quoted text clipped - 51 lines]
> *********************************************
> HELP ME OUT PLEASE
Noor_nadaf - 29 Jun 2006 07:11 GMT
html code is perfect without any error , here is one funny profblem i rectified
now problem is  if image is at the start of paragraph its shoiwng in flash if
we put any text before image tag then its not showing ,

image is getting display only if we put </p> or </br> before image <img tag ,
else its not showing

now this is the problem do anybody know how to  overcome this problem
Motion Maker - 29 Jun 2006 16:14 GMT
Flash "adds" html tags to the ones you are putting in and so you need to get
the html inside the TextField after it is rendered via the techniques I
posted and see if it is valid before you start experimenting with malformed
html.

Also valid html is not necessarily valid html for a Flash TextField as all
tags and all their attributes are not supported. Get the actual html inside
the TextField once rendered and see if that is formed properly and meets the
html specifications for Flash player version you publish to.

For Flash 8 :http://livedocs.macromedia.com/flash/8/main/00001459.html.

Also be sure you are reading the requirements for using the img tag in a
Flash TextField:
http://livedocs.macromedia.com/flash/8/main/00001464.html
"To use this tag, you must set your dynamic or input text field to be
multiline and to wrap text. "

and
http://livedocs.macromedia.com/flash/8/main/00001472.html
"In general, an image embedded in a text field appears on the line following
the <img> tag. However, when the <img> tag is the first character in the
text field, the image appears on the first line of the text field"
Signature

Lon Hosford
www.lonhosford.com
Flash, Actionscript and Flash Media Server examples:
http://flashexamples.hosfordusa.com
May many happy bits flow your way!

> html code is perfect without any error , here is one funny profblem i
> rectified
[quoted text clipped - 7 lines]
>
> now this is the problem do anybody know how to  overcome this problem
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.