samoht Posted November 26, 2007 Share Posted November 26, 2007 hello all, I have a client who wants a marquee of their top news story to scroll across the top of the page. the <marquee> tag does not validate - so I thought that flash would be an easy solution. only problem is I am retrieving my data from a db - and for some reason the loadVariables function is only printing the name of my php variable. Here is my code: <?php require_once '../Connections/connection1.php'; $q = dbQuery("SELECT Descr FROM news WHERE Type = 'N' AND FlagStatus != 'I'"); $row = dbFetchAssoc($q); $marquee = '"'.$row['Descr'].'"'; print("&textbData1=$marquee"); ?> a little page called news.php Then in my flash movie I have this action script in the first frame: flashMarquee.loadVariables("news.php"); Where flashMarquee is the movie clip with a dynamic text box named "textbData1" what shows up on testing the movie is just: marquee and sometimes: $marquee"); However if I run the news.php page I get: &textbData1=New Britain, PA – Hull Industries broke ground on their new engineering and manufacturing campus located in New Britain, PA. This 75,000 square foot manufacturing campus will provide additional manufacturing capability, complete machinery showroom/lab, and engineering offices. Anybody have an idea what I'm doing wrong - or a better approach to a valid marquee?? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/78974-sending-db-info-to-a-flash-swf-via-php-variable/ Share on other sites More sharing options...
rxbanditboy1112 Posted November 26, 2007 Share Posted November 26, 2007 I am not sure about the flash solution, but just a note.... If you are changing headlines frequently some user will not see updated information immediately because flash gets stored into cache and depending on settings it may not come out easily. For your situation, i would try using javascript. It may be a lot easier for you predicament. Here are a few marquee open source scripts: http://www.news-scroller.com/javascript_scrolling_marquee.html http://www.javascriptkit.com/javatutors/marquee4.shtml http://www.msfrontpage.net/fp/jsmarquee.htm I know you said it wouldn't validate. I don't know if you mean your code then doesn't "comply" with wc3 standards or it just wont work, but it shouldn't matter if it doesn't comply... If everything else complies but this one thing it should be just fine. Quote Link to comment https://forums.phpfreaks.com/topic/78974-sending-db-info-to-a-flash-swf-via-php-variable/#findComment-399675 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.