This topic is locked

Embed a flash file w/ player

8/16/2011 2:22:43 PM
PHPRunner General questions
author

I wanted to have the hyperlink open a new page with my flash player on it and display the contents of another field as the "Link" name on the list page.
Seems simple enough but the best I can get is the embeded file to show up using html. Or strip off the player down to the http://filename but I want the player so I can limit printing and saving.
I read on the forum that I'm suppose to use custom view as and write a piece of code that involves strValue variable which stores the file name. Anyone help me out here with some more info?

Patti

C
cgphp 8/17/2011

You can use a custom field to display the hyperlink. Clicking on it will open a new window or tab:



echo "<a href=\"url/to/your/flash/player\" target=\"_blank\">Link</a>";
501389 8/17/2011

thanks but I'm wanting to have the field value variable be the link not just a one time link.
thanks for the suggestion tho

Patti

C
cgphp 8/17/2011

Sorry Patti, could you explain it with an example or an image ?

501390 8/17/2011

My link
Here is what I have If you click on "plans" it opens the link but I lose the embed scr viewer so you can print amd save the files. The one where you see the embeded swf file looks bad.
Thanks

Patti

C
cgphp 8/17/2011

The code to embed the swf file in the viewer is the following:

<embed width="400" height="400" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" wmode="opaque" src="http://www.box.net/embed/ycmeqfpsuhz4dt2.swf">;


You can insert the above code in a php page and dinamically change the name of the video. For example, the link reference could be:

http://path/to/your/page.php?video_id=117


In the php page:

<?php

include("include/dbcommon.php");

global $conn;

$sql = "select video_name from videos where id =".$_GET['video_id']." limit 1";

$rs = db_query($sql,$conn);

$data = db_fetch_array($rs);

?>

<embed width="400" height="400" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" wmode="opaque" src="http://www.box.net/embed/<?php echo $data['video_name']; ?>">
501391 10/11/2011



The code to embed the swf file in the viewer is the following:

<embed width="400" height="400" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" wmode="opaque" src="http://www.box.net/embed/ycmeqfpsuhz4dt2.swf">;


You can insert the above code in a php page and dinamically change the name of the video. For example, the link reference could be:

http://path/to/your/page.php?video_id=117


In the php page:

<?php

include("include/dbcommon.php");

global $conn;

$sql = "select video_name from videos where id =".$_GET['video_id']." limit 1";

$rs = db_query($sql,$conn);

$data = db_fetch_array($rs);

?>

<embed width="400" height="400" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" wmode="opaque" src="http://www.box.net/embed/<?php echo $data['video_name']; ?>">



so this embededed swf file would go in the db and get call up as a custom view?
Patti

C
cgphp 10/11/2011

You can save only the file name in the db and you can use a custom view to show it.

501392 10/11/2011

dO I put this in the custom view?
<?php

include("include/dbcommon.php");

global $conn;

$sql = "select Plan Set_name from Plan_Viewer where id =".$_GETeditid1=".$data["ID"]limit 1";

$rs = db_query($sql,$conn);

$data = db_fetch_array($rs);

?>

<embed width="800" height="800" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" wmode="opaque" src="http://www.box.net/embed/<?php echo editid1=".$data["ID"]?>">
Thanks Patti

501393 10/17/2011

I put this in (or tried to) the custom view as
<?php

include("include/dbcommon.php");

global $conn;

$sql = "select Addenda2 from 'Plan Viewer' where id =".$_GETeditid1=".$data["ID"]limit 1";

$rs = db_query($sql,$conn);

$data = db_fetch_array($rs);

?>

<embed width="800" height="800" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" wmode="opaque" src="http://www.box.net/embed/<?php echo editid1=".$data["ID"]?>">
and I get a T string error on the line $sql = "select Addenda2 from 'Plan Viewer' where id =".$_GETeditid1=".$data["ID"]limit 1";
any help??

Patti

S
salus1DevClub member 10/17/2011

Hi,

I use HighSlide in conjunction with PHPRunner to view .swf files (or anything else I want to have show in an independent window). Take a look at http://www.hccvault.com for an example, let me know if you'd like specifics.

501394 10/21/2011



Hi,

I use HighSlide in conjunction with PHPRunner to view .swf files (or anything else I want to have show in an independent window). Take a look at http://www.hccvault.com for an example, let me know if you'd like specifics.


how do you call up the embeded player?
Patti

S
salus1DevClub member 10/24/2011

I use http://www.sothinkmedia.com/flash-video-encoder/ to create a .swf file that includes the flash content and the player.