PHP Forums & Resources
Moderator: General Moderators
-
phpjunkie666
- Forum Newbie
- Posts: 10
- Joined: Tue Jul 01, 2008 8:09 am
PHP Forums & Resources
Hey guys,
I made a couple of threads within the last week asking some PHP questions and nobody has even replied to them. I was wondering if anyone could share their PHP resource websites and forums so I can get some help.
I badly need to know how to imbed a flash file that uses remote XML images and sound files into a PHP blog. Can anyone point me in the right directions on where to find an answer to this question?
ANY help would be appreciated.
I made a couple of threads within the last week asking some PHP questions and nobody has even replied to them. I was wondering if anyone could share their PHP resource websites and forums so I can get some help.
I badly need to know how to imbed a flash file that uses remote XML images and sound files into a PHP blog. Can anyone point me in the right directions on where to find an answer to this question?
ANY help would be appreciated.
Re: PHP Forums & Resources
The topics you're asking about are pretty specific, so apparently not many folks here have much knowledge of. I'd suggest you search for Flash related forums. Since I don't have any experience with Flash, I don't even know what forums may exist. Google is your friend.
-
phpjunkie666
- Forum Newbie
- Posts: 10
- Joined: Tue Jul 01, 2008 8:09 am
Re: PHP Forums & Resources
Thanks for the reply.califdon wrote:The topics you're asking about are pretty specific, so apparently not many folks here have much knowledge of. I'd suggest you search for Flash related forums. Since I don't have any experience with Flash, I don't even know what forums may exist. Google is your friend.
I've asked some flash developers and posted on a couple of flash forums and they told me I'd find the answer on a PHP forum
Arrgh!
Re: PHP Forums & Resources
Well that's a load of crap, pardon my french. Embedding flash is purely HTML syntax and has nothing to do with PHP. The only connection you might have is passing variables through PHP to flash, but even then it is only through echoing them in the appropriate flash syntax.
Using google on the term 'embed flash object' came up with relevant results immediately.
Using google on the term 'embed flash object' came up with relevant results immediately.
-
phpjunkie666
- Forum Newbie
- Posts: 10
- Joined: Tue Jul 01, 2008 8:09 am
Re: PHP Forums & Resources
You may not believe me when I say it, but the flash developer forums who created one of my files said my problem was a PHP issue. I'm still trying to get my head around where my head should actually bepytrin wrote:Well that's a load of crap, pardon my french. Embedding flash is purely HTML syntax and has nothing to do with PHP. The only connection you might have is passing variables through PHP to flash, but even then it is only through echoing them in the appropriate flash syntax.
Using google on the term 'embed flash object' came up with relevant results immediately.
I've tried a few of those sites that your term brought up, but there is some kind of conflict when I embed them into a blog. They work fine in a normal HTML site, which is where my problems begin. Thanks for the reply though.
Re: PHP Forums & Resources
Perhaps you could show us what you tried and what were the problems / errors, that would be much easier to address than generic questions about HTML markup than can easily be answered on google.. Also I hope you didn't take offense, I meant its a load of crap what the flash guys told you
-
phpjunkie666
- Forum Newbie
- Posts: 10
- Joined: Tue Jul 01, 2008 8:09 am
Re: PHP Forums & Resources
It's cool, I didn't get offended. It's just due to so many people saying you need to be here, there and everywhere, it's a totally confusing where I should be and what exactly should I even be looking for
Ok, here's what I'm trying to do. I'll try keep it simple to avoid additional headaches
I am trying to embed a flash player into a blog sidebar. The flash player streams the tracks and grabs thumbnail images of the tracks being played via an XML file.
Here's where the files are currently placed on my domain...
Flash swf
XML file
HTML file
SWFobject.js
http://www.mydomain.com/player/
Music
http://www.mydomain.com/player/music/
Images
http://www.mydomain.com/player/images/
Here's where I'm trying to embed the file...
Blog
sidebar.php
http://www.mydomain.com/blog/
What I've done so far is embed the file using a number of different codes, mostly the standard ones (i.e. youtube/google embed etc). The flash file shows up in the embed, but I'm having a nightmare of a problem trying to get a code working that reads the XML in the above dir to grab the music/images from the other dirs.
The HTML page that the files are located in work perfectly when viewed directly, so there's no problems with the XML. The beast is with the embed code. This is where the confusion regarding who can help dwells lol
The above files also shows that I have setup SWFobject.js in the same folder I have the swf and the XML and HTML that the flash is currently sitting nicely inside. I have tried a number of flashvar (i.e. file=playlist.xml&autostart=true etc) to try grab the XML.
If you can help in any way it would be awesome, as it's driving me totally insane
Ok, here's what I'm trying to do. I'll try keep it simple to avoid additional headaches
I am trying to embed a flash player into a blog sidebar. The flash player streams the tracks and grabs thumbnail images of the tracks being played via an XML file.
Here's where the files are currently placed on my domain...
Flash swf
XML file
HTML file
SWFobject.js
http://www.mydomain.com/player/
Music
http://www.mydomain.com/player/music/
Images
http://www.mydomain.com/player/images/
Here's where I'm trying to embed the file...
Blog
sidebar.php
http://www.mydomain.com/blog/
What I've done so far is embed the file using a number of different codes, mostly the standard ones (i.e. youtube/google embed etc). The flash file shows up in the embed, but I'm having a nightmare of a problem trying to get a code working that reads the XML in the above dir to grab the music/images from the other dirs.
The HTML page that the files are located in work perfectly when viewed directly, so there's no problems with the XML. The beast is with the embed code. This is where the confusion regarding who can help dwells lol
The above files also shows that I have setup SWFobject.js in the same folder I have the swf and the XML and HTML that the flash is currently sitting nicely inside. I have tried a number of flashvar (i.e. file=playlist.xml&autostart=true etc) to try grab the XML.
If you can help in any way it would be awesome, as it's driving me totally insane
-
phpjunkie666
- Forum Newbie
- Posts: 10
- Joined: Tue Jul 01, 2008 8:09 am
Re: PHP Forums & Resources
Here's my progress so far and a simple method worked with a similar file that just needed to import the images via XML and have each image have a link through...
Now all I need is to add some more param names and flashvars to the flash emebed code so it plays the XML music.
Here's what I've got so far...
The red text is probably where I'm mostly going wrong.
The XML data file is named 'settings.xml' and it loads both the music files on stream, thumbnail images and artist/album/track text. All of the files link up and work perfectly in their original HTML location and has a swfobject.js embed into the index.
I've searched around Google looking for fixes, but I've not had much luck. I think it needs an echo or some autoplay in the flashvars. It looks like a totally obvious solution but my mind fails me lol
Code: Select all
<object type="application/x-shockwave-flash" height="320" width="310" align="middle" data="http://www.mydomain.com/blog/my.swf">
<param name="movie" value="http://www.mydomain.com/blog/my.swf" />
<param name="flashvars" value="file=images.xml&linktarget=_parent" /></object>Here's what I've got so far...
Code: Select all
<object type="application/x-shockwave-flash" allowScriptAccess="always" height="335" width="415" align="middle" data="http://www.mydomain.com/blog/player.swf">
<param name="allowScriptAccess" value="always" />
<param name="allowNetworking" value="internal" />
<param name="movie" value="http://www.mydomain.com/blog/player.swf" />
<param name="quality" value="high" />
[color=#FF0000] <param name="flashvars" value="file=settings.xml&autostart=true" />[/color]
<param name="salign" value="l" /><object>The XML data file is named 'settings.xml' and it loads both the music files on stream, thumbnail images and artist/album/track text. All of the files link up and work perfectly in their original HTML location and has a swfobject.js embed into the index.
I've searched around Google looking for fixes, but I've not had much luck. I think it needs an echo or some autoplay in the flashvars. It looks like a totally obvious solution but my mind fails me lol
Re: PHP Forums & Resources
Your object looks ok, I think what you are having difficulty with is with the relative path to the xml. Since its hard to tell where exactly the object considers the flash to be (if for example the blog starts at a bootstrap file like index.php, it should be relative to it. hard to tell) - you should use absolute path. Something like - "file=/path/to/xml/settings.xml" or even "file=http://your.host.name/path/to/xml/settings.xml"
When you find the right path, it should work
When you find the right path, it should work
-
phpjunkie666
- Forum Newbie
- Posts: 10
- Joined: Tue Jul 01, 2008 8:09 am
Re: PHP Forums & Resources
My thumbnail images are showing up and the track data (all of which is in my XML) are all showing up in the embed. The prob is with the music not playing on startup or on click command.
Here's a copy of my XML file used in the player. If anyone wants to use this in their own files go for it.
The thumbs/album.jpgs and the CDATA all shows fine. I just gotta find the embed code now to get the music to launch and play.
I have a 'swfobject' javascript file setup on the HTML page the swf is originally placed on. The code for this is...
My guess is I need to place additional flashvar commands to get the music to play or maybe something to interact with that JS file.
Argh
Here's a copy of my XML file used in the player. If anyone wants to use this in their own files go for it.
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<gallery>
<category name="Featured">
[color=#FF0000] <item thumbPath="thumbs/album.jpg" mp3Path="music/music.mp3"><![CDATA[Track Title<br><font color="#666666">Artist | Album "Album name"</font>]]></item>[/color]
</gallery>I have a 'swfobject' javascript file setup on the HTML page the swf is originally placed on. The code for this is...
Code: Select all
[color=#FF0000]<script type="text/javascript" src="swfobject.js"></script>[/color]
</head>
<body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" scroll="yes">
<table width="100%" height="100%">
<tr>
<td align="center">
<div id="flashcontent">
<strong>You need to upgrade your Flash Player to version 9 or later.</strong>
</div>
[color=#FF0000] <script type="text/javascript">
var so = new SWFObject("Mp3 Player.swf", "sotester", "419", "343", "9", "#000000");
so.addParam("allowFullScreen", "true");
so.write("flashcontent");
</script>[/color]Argh
Re: PHP Forums & Resources
As far as I know there aren't additional flashvars for that purpose (then again I don't work with flash on a regular basis). It's probably a problem inside the flash itself - or maybe its expecting something custom, only the author would know.
-
phpjunkie666
- Forum Newbie
- Posts: 10
- Joined: Tue Jul 01, 2008 8:09 am
Re: PHP Forums & Resources
It's all good. I got it fully working. I can sleep well tonight 