SimplePortal

Customization => Custom Coding => Topic started by: MESSIAH on February 19, 2012, 07:49:21 PM

Title: SMF 2.0.2 + SIMPLEPORTAL + SWF FILE
Post by: MESSIAH on February 19, 2012, 07:49:21 PM
Forgive me my bad english. I got forum  http://audioground.pl (http://audioground.pl) with installed simpleportal.

I embed swf file to block (Name "Welcome" Type "HTML")
Code: [Select]
<embed width="800" height="360" name="plugin" src="http://audioground.pl/mCube/cu3er.swf" type="application/x-shockwave-flash">
But swf file don't start it's showing only logo of the banner.
Banner working fine when i enter url - http:audioground.pl/mCube/cu3er.swf (http://http:audioground.pl/mCube/cu3er.swf)
I need any help to start this banner.

THX FOR ANY HELPS
Title: Re: SMF 2.0.2 + SIMPLEPORTAL + SWF FILE
Post by: Chen Zhen on February 20, 2012, 02:12:22 AM
Try this:
Code: [Select]
global $boardurl;
$file = $boardurl . '/mCube/cu3er.swf';

echo '<script type="text/javascript" src="swfobject.js"></script>
<div class="centertext" style="overflow:hidden;">
<object width="800" height="360">
<param name="movie" value="'.$file.'">
<embed src="'.$file.'" width="800" height="360" />
</object>
</div>';
Title: Re: SMF 2.0.2 + SIMPLEPORTAL + SWF FILE
Post by: MESSIAH on February 20, 2012, 09:08:45 AM
Try this:
Code: [Select]
global $boardurl;
$file = $boardurl . '/mCube/cu3er.swf';

echo '<div class="centertext" style="overflow:hidden;">
<script type="text/javascript" src="swfobject.js"></script>
<object width="800" height="360">
<param name="movie" value="'.$file.'">
<embed src="'.$file.'" width="800" height="360" />
</object>
</div>';

This same effect - stoped banner.
If that helps ther is home page of this banner http://demo.templateworld.com/zero/in_action/mCube/ (http://demo.templateworld.com/zero/in_action/mCube/)
Title: Re: SMF 2.0.2 + SIMPLEPORTAL + SWF FILE
Post by: Chen Zhen on February 20, 2012, 10:51:54 AM
I don't know exactly what your $boardurl is with all those sub directories.
Adjust the $file variable appropriately or you can just put the entire url into it.
ie.
Code: [Select]
$file = 'http://demo.templateworld.com/zero/in_action/mCube/cu3er.swf';
Title: Re: SMF 2.0.2 + SIMPLEPORTAL + SWF FILE
Post by: MESSIAH on February 20, 2012, 11:36:46 AM
I don't know exactly what your $boardurl is with all those sub directories.
Adjust the $file variable appropriately or you can just put the entire url into it.
ie.
Code: [Select]
$file = 'http://demo.templateworld.com/zero/in_action/mCube/cu3er.swf';

any urls and allways is stoped.
Title: Re: SMF 2.0.2 + SIMPLEPORTAL + SWF FILE
Post by: Chen Zhen on February 20, 2012, 12:23:47 PM

It's your actual swf file that is not configured correctly.

Try the code I gave you with this for the file as an example:
Code: [Select]
$file = 'http://askusaquestion.net/Games/game_AdagioHard2v32Sparky/AdagioHard2v32Sparky.swf';

In scene 1 of your swf file try putting in actionscript to play the first frame of your animation.

ie.
Code: [Select]
gotoAndPLay(3);
Title: Re: SMF 2.0.2 + SIMPLEPORTAL + SWF FILE
Post by: MESSIAH on February 20, 2012, 12:34:21 PM

It's your actual swf file that is not configured correctly.

Try the code I gave you with this for the file as an example:
Code: [Select]
$file = 'http://askusaquestion.net/Games/game_AdagioHard2v32Sparky/AdagioHard2v32Sparky.swf';

In scene 1 of your swf file try putting in actionscript to play the first frame of your animation.

ie.
Code: [Select]
gotoAndPLay(3);

You don't understanding me.
Hit the url http:audioground.pl/mCube/cu3er.swf - is working fine and perfect
When I embed this swf file to simple portal to board allways this banner has been stoped and never play.
Title: Re: SMF 2.0.2 + SIMPLEPORTAL + SWF FILE
Post by: Chen Zhen on February 20, 2012, 02:22:42 PM
Try this:
Code: [Select]
echo '<script type="text/javascript" src="http://audioground.pl/mCube/js/swfobject/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.xml = "http://audioground.pl/mCube/config.xml";
flashvars.font = "http://audioground.pl/mCube/font.swf";
var attributes = {};
attributes.wmode = "transparent";
attributes.id = "slider";
swfobject.embedSWF("http://audioground.pl/mCube/cu3er.swf", "cu3er-container", "800", "360", "9", "expressInstall.swf", flashvars, attributes);
</script>
<div class="centertext">
<div id="cu3er-container">
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
</div>
</div>';

This seems to function properly in Firefox, IE Chrome & Opera.


Title: Re: SMF 2.0.2 + SIMPLEPORTAL + SWF FILE
Post by: MESSIAH on February 20, 2012, 02:51:16 PM
Try this:
Code: [Select]
echo '<script type="text/javascript" src="http://audioground.pl/mCube/js/swfobject/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.xml = "http://audioground.pl/mCube/config.xml";
flashvars.font = "http://audioground.pl/mCube/font.swf";
var attributes = {};
attributes.wmode = "transparent";
attributes.id = "slider";
swfobject.embedSWF("http://audioground.pl/mCube/cu3er.swf", "cu3er-container", "800", "360", "9", "expressInstall.swf", flashvars, attributes);
</script>
<div class="centertext">
<div id="cu3er-container">
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
</div>
</div>';

This seems to function properly in Firefox, IE Chrome & Opera.


YOU ARE GENIUS :) Very Very THX MAN

I know it - connecting swf + xml but i don't knowing how.

Yes this code is working fine.
SimplePortal 2.3.8 © 2008-2024, SimplePortal