Go Back   Flashtory Support Forum > Flash Files Support > Other Flash Files > Horizontal News Ticker 01

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-17-2010, 11:42 PM
Junior Member
 
Join Date: Feb 2010
Posts: 2
Default My manual, especially for easy use.

Personally I think the ticker lacks a simple manual with example code.
But maybe there was a reason for this I might overlook.
Even as an experienced webmaster it took me hours to get it to work.
I want to share you my results.

I can imagine someone wants to do the "flashvars" hard coded or at least get some inside:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="920" height="40">
<param name="movie" value="http://<? print $_SERVER['HTTP_HOST']; ?>/some_directory/preview.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="flashvars" value="xml=http://<? print $_SERVER['HTTP_HOST']; ?>/some_directory/data.php" />
<embed flashvars="xml=http://<? print $_SERVER['HTTP_HOST']; ?>/some_directory/data.php" wmode="transparent" src="http://<? print $_SERVER['HTTP_HOST']; ?>/some_directory/preview.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="920" height="40"></embed>
</object>

When not using the flashvars to specify the path to and name of the xml file, the (PHP) http_host variable makes it work with www and without www when using "<base href=..." in your HTML page.

Also pay attention to the "...wmode...transparent..." story; it removes the ugly black or white container when using other background colours.

If you play a little bit with the variables (posX, posY) in the xml file you can also put some margin around the news ticker.

In order to make the ticker dynamic, please remove
<?xml version="1.0" encoding="utf-8"?>
and add the PHP code.
Don't forget to make a database connection when pulling data from a database.
Rename the file to data.php ot at least don't forget to rename the extension of the file to .php instead of .xml. Note: It is always a good practise naming PHP files to .php so passwords and such are not exposed because the file gets parsed when directly requested with a browser.

Last but not least in the (former) xml file make sure you write "target" with lower case characters and not "TARGET", otherwise the link opens in the same window/tab.

I hope this helps someone out or inspires the authors of the manuals ;-)
Reply With Quote
  #2 (permalink)  
Old 02-18-2010, 01:44 PM
Flashtory Staff
 
Join Date: Feb 2009
Posts: 199
Default

Hi mate Two words: THANK YOU

Much appreciated. Trust me on the future I will pay more attention to the help files and what you suggested here will also be included on future app releases.

Thank you for sharing all these.

Cheers !
Reply With Quote
Reply

Tags
dynamic, general, manual, php

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
based on a modified theme of CompleteGFX