Flash and PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
JBright
Forum Newbie
Posts: 6
Joined: Fri May 09, 2003 2:23 pm

Flash and PHP

Post by JBright »

I attempting to get a flash file up in php. I'm incountering a parse error and the editor I'm using isn't giving me enough information to correct the situation.

<?php
'echo '<embed src="http://www.testing.com/test.swf" loop=false pluginspage=http://www.macromedia.com/shockwave/dow ... kwaveFlash type='application/x-shockwave- flash' width="460" height="200"></embed>'';
?>

If anyone could lead a fellow some help it would be very well...helpful. In the future I'd like to create a function to load a flash file. Thanks in advance.
SBukoski
Forum Contributor
Posts: 128
Joined: Wed May 21, 2003 10:39 pm
Location: Worcester, MA

Post by SBukoski »

Try this one:

Code: Select all

<?php 
echo '<embed src="http://www.testing.com/test.swf" loop=false pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash type=''application/x-shockwave- flash'' width="460" height="200"></embed>'; 
?>
You needed to escape the single quotes surrounding your type= statement
JBright
Forum Newbie
Posts: 6
Joined: Fri May 09, 2003 2:23 pm

Post by JBright »

Your the greatest! Can you recommend any sites that have a number of good tutorials. I try to find answers anywhere I can. Cheers!
SBukoski
Forum Contributor
Posts: 128
Joined: Wed May 21, 2003 10:39 pm
Location: Worcester, MA

Post by SBukoski »

Well, I usually stick to http://www.php.net, here and my trusty PHP 4 Bible. If I can't find an answer in any of those places (which usually doesn't happen), I then start my searches until I do find an answer.
nightmatrix
Forum Newbie
Posts: 21
Joined: Sun Jun 08, 2003 11:03 am

Post by nightmatrix »

Hey here are some excellent PHP and Flash Tutorials this is where I got started learning PHP and Flash

http://www.sephiroth.it/tutorials/flashPHP/


if you want some recommended books I suggest

Foundation PHP for Flash and Advanced PHP for Flash

anyway good luck
JBright
Forum Newbie
Posts: 6
Joined: Fri May 09, 2003 2:23 pm

Post by JBright »

I'm getting another parse error on this line....please inform me of what I'm doing wrong...Thanks..

<?php echo '<embed src="'(DIR_WS_IMAGES . $category['categories_flash'])'" loop=false pluginspage=http://www.macromedia.com/shockwave/dow ... kwaveFlash type=''application/x-shockwave- flash''></embed>';?>
SBukoski
Forum Contributor
Posts: 128
Joined: Wed May 21, 2003 10:39 pm
Location: Worcester, MA

Post by SBukoski »

What is this suppose to be doing?

(DIR_WS_IMAGES . $category['categories_flash'])

Is DIR_WS_IMAGES a variable that stores path information?

If so, you need the $ and you are concatenating improperly. Assuming that, it needs to be

Code: Select all

<?php 
     echo '<embed src="'.$DIR_WS_IMAGES.$category['categories_flash'].'" loop=false pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash type=''application/x-shockwave- flash''></embed>';
?>
JBright
Forum Newbie
Posts: 6
Joined: Fri May 09, 2003 2:23 pm

Post by JBright »

I'm going to break down and buy the php bible.. does it go over all of this?
Post Reply