Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Flash embed not working when in a control


Reply

2 Posts   937 Views

Avatar
b0bro

24 August 2009 at 3:05pm (Last edited: 24 August 2009 3:16pm), Community Member, 38 Posts

Hi Im having a weird problem.

I've designed a flash application that displays all my portfolio thumbnails on my homepage.

If i embed that flash using swfobject and the code below

<div>   
<object id="$ID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="195" height="155">
<param name="movie" value="$project/images/portfolio_thumb.swf?projectName='$Title'&projectInfo='$SubHeading'&isnew='true'&imageURL='$HomeImage.URL'&projectURL='$Link" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="$project/images/portfolio_thumb.swf?projectName='$Title'&projectInfo='$SubHeading'&isnew='true'&imageURL='$HomeImage.URL'&projectURL='$Link'" width="195" height="155">
<!--<![endif]-->
<div>
<h1>Alternative content</h1>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>

This works fine! As soon as i add it to my control, all I get is a weird white box and thats it. WTF??

<% control portfolio %>
//PASTING THAT CODE ABOE INTO HERE DOSNT WORK! JUST GET A WHITE SQUARE
<% end_control %>

Avatar
b0bro

24 August 2009 at 4:52pm Community Member, 38 Posts

SOLVED::

You cant use $project within the control.

eg "src=$project/images/file.swf" needs to be "src=_sitefiles/images/flile.swf"

God Damnit I hate this simple problems that i always over look. Spend half a bloody day looking for different ways to embed flash in a million different ways. Then looked over millions of line of saphire code to see what it might be doing!!! Ive cracked the sh**ts!