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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Flash embed not working when in a control


Go to End


2 Posts   1482 Views

Avatar
b0bro

Community Member, 38 Posts

24 August 2009 at 3:05pm

Edited: 24/08/2009 3:16pm

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

Community Member, 38 Posts

24 August 2009 at 4:52pm

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!