A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: PHP embedding problem

  1. #1
    Senior Member TheLostGuru's Avatar
    Join Date
    Aug 2004
    Location
    I live on this webpage...
    Posts
    784

    PHP embedding problem

    I'm using PHP to embed a swf file into a webpage. The problem is that before the swf shows anything (i.e. the preloader doesn't load) the swf has to completely load. Is there a way to force the swf to show the preloader before the swf has completely loaded?
    "If I have seen further it is by standing on the shoulders of giants." Isaac Newton
    ------------------------------------------------------------------------------

  2. #2
    When you know are. Son of Bryce's Avatar
    Join Date
    Aug 2002
    Location
    Los Angeles
    Posts
    838
    You're mentioning PHP as if it's causing the problem. Does it work fine in HTML?

  3. #3
    Senior Member TheLostGuru's Avatar
    Join Date
    Aug 2004
    Location
    I live on this webpage...
    Posts
    784
    Yes, if I embed the swf using HTML, it works fine.
    "If I have seen further it is by standing on the shoulders of giants." Isaac Newton
    ------------------------------------------------------------------------------

  4. #4
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    In theory if you just create HTML page with PHP it should behave exactly same as having separate html file.

  5. #5
    Senior Member TheLostGuru's Avatar
    Join Date
    Aug 2004
    Location
    I live on this webpage...
    Posts
    784
    Code:
    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
     codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"
     WIDTH=<?php echo $gameWidth; ?> HEIGHT=<?php echo $gameHeight; ?>>
    <PARAM NAME=movie VALUE="<?php echo $filename; ?>">
    <PARAM NAME=menu VALUE=false>
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=bgcolor VALUE="<?php echo $bcol; ?>">
    <PARAM NAME=FlashVars VALUE="movie=<?php echo $gameName; ?>&id=<?php echo $gameID; ?>">
    <EMBED src="<?php echo $filename; ?>" FlashVars="movie=<?php echo $gameName; ?>&id=<?php echo $gameID; ?>" menu=false quality=high bgcolor="<?php echo $bcol; ?>" WIDTH=<?php echo $gameWidth; ?> HEIGHT=<?php echo $gameHeight; ?> TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
    </OBJECT>
    This is the code I am using to embed the swf.
    "If I have seen further it is by standing on the shoulders of giants." Isaac Newton
    ------------------------------------------------------------------------------

  6. #6
    Senior Member
    Join Date
    Feb 2004
    Posts
    312
    well make that entire block as a string and and echo that no?
    $flashEmbed = "<object classid....</object>"
    echo $flashEmbed

  7. #7
    Pencil Farmer cadin's Avatar
    Join Date
    Jul 2006
    Location
    Vancouver BC
    Posts
    323
    I'm with Tony, using PHP shouldn't make any difference if everything is done correctly, even doing little echoes everywhere like you are doing.
    You can compare the output of the PHP page to the regular HTML and see what's different, that should give you a clue to what's going wrong.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center