SWF help.

espfutbol98

New Member
Messages
200
Reaction score
2
Points
0
I have a .swf player with a variable to show an image before and after playing a video. For some reason, it is not showing it but when I type the .swf location and variables in the url, it shows it.

Embedded player: http://podaci.selfip.org/hr/flvplayer.html
File & variables: http://podaci.selfip.org/hr/flash/flvplayer.swf?file=flashvideos.xml&=poster.jpg&displayheight=291&lightcolor=0x6e788c&backcolor=0xffffff&frontcolor=0x42719E&shuffle=false&enablejs=true&javascriptid=ongfvpp1

I have to change some variables from the embedded to the player because the embedded is not in the flash folder but all of the other files are. Any suggestions?
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
Note that in flvplayer.html, the flash variables are not part of the player URL. You could try adding "image=flash/poster.jpg" to the movie URL ('movie: "flash/flvplayer.swf"' in the script).
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
It's probably because the <image> elements contain a relative URL. When you load flvplayer.html, the relative URL is translated to http://podaci.selfip.net:8080/hr/poster.jpg, which doesn't exist. When you load the movie player directly, the relative URL resolves to http://podaci.selfip.net:8080/hr/flash/poster.jpg
Solutions:
  1. use absolute URLs
  2. change flashvideos.xml to refer to the image URL relative to the hosting page.
  3. Move poster.jpg to the same folder as flvplayer.html
Example flash/flashvideos.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/"><trackList>
<track>
  <title>Uri Jip</title>
  <creator>MC Sniper</creator>
  <location>uri_jip.flv</location>
  <info>#</info>
  <image>http://forums.x10hosting.com/images/poster.jpg</image>
</track>
...
This is basically option 2, but "poster.jpg" has been moved from folder "flash" to folder "images".

Edit: a debugging note: while the problem was within the XML playlist, it was the same playlist in both cases, so looking to it wouldn't have helped. The two differences were that in one case the flash object was embedded, and the URLs were different. Looking at the latter is what lead to the realization of the cause.
 
Last edited:

espfutbol98

New Member
Messages
200
Reaction score
2
Points
0
It works:)
Thanks guys. I thought I tried this earlier but I guess I had something else wrong.
 
Top