+ Reply to Thread
Results 1 to 6 of 6

Thread: SWF help.

  1. #1
    espfutbol98's Avatar
    espfutbol98 is offline x10 Sophmore espfutbol98 is an unknown quantity at this point
    Join Date
    Apr 2009
    Location
    Zagreb... želim
    Posts
    200

    SWF help.

    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&dis playheight=291&lightcolor=0x6e788c&backcolor=0xfff fff&frontcolor=0x42719E&shuffle=false&enablejs=tru e&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?

  2. #2
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: SWF help.

    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).
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  3. #3
    loveispoison is offline Banned loveispoison is an unknown quantity at this point
    Join Date
    Nov 2007
    Posts
    323

    Re: SWF help.

    the player shows up when i visit this url

    http://podaci.selfip.org/hr/flvplayer.html

  4. #4
    espfutbol98's Avatar
    espfutbol98 is offline x10 Sophmore espfutbol98 is an unknown quantity at this point
    Join Date
    Apr 2009
    Location
    Zagreb... želim
    Posts
    200

    Re: SWF help.

    I tried adding the image variable in the movie tag but it still didn't work.
    I also tried just typing in:
    http://podaci.selfip.net:8080/hr/fla...lashvideos.xml
    without any flashvars except for the xml and it still shows the image. This makes me think it is all about the xml.

  5. #5
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: SWF help.

    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 by misson; 06-27-2009 at 02:34 AM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  6. #6
    espfutbol98's Avatar
    espfutbol98 is offline x10 Sophmore espfutbol98 is an unknown quantity at this point
    Join Date
    Apr 2009
    Location
    Zagreb... želim
    Posts
    200

    Re: SWF help.

    It works
    Thanks guys. I thought I tried this earlier but I guess I had something else wrong.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers