21308 Posts in 5737 Topics by 2603 members
| Go to End | Next > | |
| Author | Topic: | 3620 Views |
-
Re: Additional params for uploaded flash

4 December 2009 at 10:54pm
Banal has put this recipe/tutorial on http://ssbits.com/embed-flash-content-using-swfobject/
Nice one!
-
Re: Additional params for uploaded flash

17 December 2009 at 12:16pm
Great idea, as I have been battling with the relative paths to my swfs for hours to no avail.
However, in your example Requirements::javascript('mysite/javascript/lib/swfobject.js'); does not seem to have any effect and swfobjects does not see to get included. (can't see "<script type="text/javascript" src="mysite/javascript/swfobject_new.js"></script>" anywhere)
Any ideas why?
Are you sure the code is working as is for you?
Thanks,
JuLo
-
Re: Additional params for uploaded flash

17 December 2009 at 8:18pm
Hi
Yes, the code is definitely working.
Why would it include swfobject_new.js, when you're telling it to load swfobject.js. Just a typo I guess.Make sure you put the files in the correct folders, and maybe check using Firebugs "Net" Tab that the file loads. You don't have to use Requirements::javascript, you could put <script type="text/javascript" src="mysite/javascript/lib/swfobject.js"></script>Â in your template code just as well.
-
Re: Additional params for uploaded flash

18 December 2009 at 8:30pm
Sorry. That was a copy paste mistake.
I had another page using the old swfobject so renamed the new version to swfobject_new.js.
On the other hand, it does work when I manually add the code in FlashPage.ss.
Go figure.
Thanks.
Nevermind.
-
Re: Additional params for uploaded flash

28 April 2010 at 4:13pm Last edited: 30 April 2010 2:03pm
Hi,
Following Banal's example, I would like to play a swf file with an external flv (i.e., a swf file that will load the video from an external FLV file at runtime and will not embed anything in the swf file itself?. The question is what is the code I would use in my FlashPage.php to load both the swf and flv file through the CMS? The swfobject code in the template ss is the same as Banal's except I changed the variable name from FlashFile to swfFile.I tried the following in my FlashPage.php, but it didn't work.
public static $has_one = array(
'swfFile' => 'File',
'flvFile' => 'File'
);
public function getCMSFields(){
$fields = parent::getCMSFields();
$swfUpload = new FileIFrameField('swfFile', 'Flash file (swf)');
$flvUpload = new FileIFrameField('flvFile', 'Flash file (flv)');
$fields->addFieldToTab("Root.Content.Flash", new FieldGroup(
new NumericField("Width", "Width"),
new NumericField("Height", "Height"),
new TextField("TopMargin", "Top Margin"),
new TextField("LeftMargin", "Left Margin")
));
$fields->addFieldsToTab('Root.Content.Flash', array(
$swfUpload,$flvUpload,
new HtmlEditorField('AlternateContent', 'Flash replacement text', 20)
));
return $fields;
}
Any ideas,
Sam -
Re: Additional params for uploaded flash

30 April 2010 at 2:00pm Last edited: 30 April 2010 3:50pm
Ah, figured it out. There was no swfobject.js file link in my template. Works fine now.
Sam -
Re: Additional params for uploaded flash

20 July 2010 at 1:51am
hay sam i would love some more info on how you play a swf file with an external flv how did you use that code (eg. did you add that code or was that all you needed)
| 3620 Views | ||
| Go to Top | Next > |




