Page 2 of 3

Re: process to insert flash

Posted: Fri May 02, 2008 5:01 pm
by nate22
DOH! I just realized I can view the TAG HELP FILE. THANKS.

Re: process to insert flash

Posted: Fri May 02, 2008 5:07 pm
by nate22
Blerg.

I did everything right according to the help file.

Re: process to insert flash

Posted: Fri May 02, 2008 5:25 pm
by nate22
So...

Since the swfobject tag obviously isn't going to work for me and I'll never figure out why
(perhaps it is because I am using version 2.0 with an older version of CMSMS or something, whatever)

Can I still get CMSMS to render Flash if I just use {literal} tags around regular html and javascript in my CMSMS template???

Because if so, I'll just use the standard Dreamweaver-produced javascript in the and the embed code for the wrapped in {literal} tags.

In fact, I will do that right now.

Re: process to insert flash

Posted: Fri May 02, 2008 5:26 pm
by Nullig
The latest version of the SWFObject tag works with version 2 of SWFObject.js.

Nullig

Re: process to insert flash

Posted: Fri May 02, 2008 5:28 pm
by nate22
Okay, for posterity, let me just inform y'all that wrapping the regular HTML code for embedding a Flash object in {literal} tags does not work.  ;D

I love failure. Every time I fail I am that much closer to succeeding. Or killing myself.  ;)

Re: process to insert flash

Posted: Fri May 02, 2008 5:48 pm
by calguy1000
Here's the steps I just followed, and you can view it here:

http://svr.techcom.dyndns.org/cms_test/svn/index.php?page=swfobject-test

go ahead, view the source

1) downloaded the latest swfobject 2.0 javascript
2) unzipped the file
3) copied the swfobject.js to my install directory
4) copied the sample .swf files to my install directory
5) Created a new page
6) copied the header text from the index.html of the swfobject sample into the metadata section of my page
    (changed paths as appropriate)
    ** note, I didn't have to dot his, I could have copied the script tags into the body section just as easily **
7) copied the body text from the index.html of the swfobject sample into the metadata section of my page
    (changed paths as appropriate)
8) tested.... it worked
9) downloaded another swf file from somewhere
10) edited the page, and changed paths as appropriate to point to the new swf file
11) tested again, it works.

No literal tags necessary anywhere.

If you're having problems its probably because of bad paths, or something.  I've done this a few times now and it's simple.  CMS does not limit you,  and there is nothing special you have to do.  It's probably some simple error you're making.

Re: process to insert flash

Posted: Fri May 02, 2008 6:39 pm
by nate22
Oh wow, thanks Calguy!

I was just listing my steps for posterity and I saw yours. I will see if I did anything differently or wrongly.

Here was what I had done before:

• uploaded function.swfobject.php to my plugins directory (and it obviously WORKS because when I view source it spits out a couple blocks of code for a flash object)

• added {swfobject swf='uploads/images/hd-split-intro.swf' width='888' height='580' fver='8.0' fbg='#ffffff' } to my template


... But, now I will check out what you did and see if I missed something. Thanks again!

Re: process to insert flash

Posted: Fri May 02, 2008 6:57 pm
by nate22
calguy1000 wrote:
3) copied the swfobject.js to my install directory
4) copied the sample .swf files to my install directory

waaaaiiit a minute... all I got when I unzipped the file was this:

function.swfobject.php

EDIT:

OH! I see, you're using the regular  javascript then found at http://code.google.com/p/swfobject/?
Neat! Okay, I will try it your way. Forget about this CMSMS plugin, then!

Re: process to insert flash

Posted: Fri May 02, 2008 7:08 pm
by Nullig
The function.swfobject.php plugin works in conjunction with the SWFObject.js, which you have to download separately, to make it easier to use that javascript.

The advantage of the SWFObject javascript is that it is cross-browser XHTML compliant.

Nullig

Re: process to insert flash

Posted: Fri May 02, 2008 7:13 pm
by nate22
Hoho! Now I see! It seems you can help me afterall. I had really written it off as hopeless since I triple-checked everything to make sure it was coded right and the paths were correct. Seems I didn't have the javascript! Ha. I thought that was included in the function which I FTP's to my plugins folder.

The funny thing is I even CLICKED the link to the js from the help section of the tag and when it brought me to the Google page I just thought, "Oh so this is where the original came from. Okay." I thought that original script had been modded to fit in a CMSMS plugin or something with smarty tags and whatnot. Der.

Thank you, Nullig! You have helped me a lot on this forum!  If I could change your karma in real life, I would. But, I am no Buddha or God or whatever, so I will just have to give you a +1 on the board Karma. Actually, pretty soon maybe I should ask you for a Paypal account to make a donation.

Re: process to insert flash

Posted: Fri May 02, 2008 11:24 pm
by nate22
My God, this is unbe-#$%&-lievably complicated!

I mean, good LORD, give me a $%*&ing break here!

string(132) "Smarty error: [in template:32 line 33]: syntax error: expecting '=' after attribute name 'no' (Smarty_Compiler.class.php, line 1555)" string(135) "Smarty error: [in template:32 line 33]: syntax error: expecting '=' after attribute name 'Flash' (Smarty_Compiler.class.php, line 1555)" string(136) "Smarty error: [in template:32 line 33]: syntax error: expecting '=' after attribute name 'player' (Smarty_Compiler.class.php, line 1555)" string(176) "Smarty error: [in template:32 line 33]: syntax error: expecting '=' after attribute name 'installed!' fvarname='userid' fvarval='223' (Smarty_Compiler.class.php, line 1588)"

Tell me, if I put the %$&*ing script from the header into my template like so:

Code: Select all

<__script__ type="text/javascript" src="swfobject.js"></__script>
<__script__ type="text/javascript">
swfobject.embedSWF("images/hd-split-intro.swf", "myContent", "888", "580", "9.0.0", "images/hd-split-intro.swf");
</__script>
Should my body code look like this or not:

Code: Select all

{swfobject swf='uploads/images/hd-split-intro.swf' width='580 height='888' fver='6.0.65' fbg='#000000' fmenu='false' text='<b>Sorry, no Flash player installed!</b>' fvarname='userid' fvarval='223'}

Re: process to insert flash

Posted: Fri May 02, 2008 11:53 pm
by Nullig
In the head of your template put:



In the spot where you want the flash (template or page), put:

{swfobject swf='uploads/images/hd-split-intro.swf' width='580 height='888' fver='6.0.65' fbg='#000000' fmenu='false' text='Sorry, no Flash player installed!'}

In your case, I don't think you need the fvarname='userid' fvarval='223' parameters - they were examples of how to add flashvars when the flash movie needed them.

Nullig

Re: process to insert flash

Posted: Sat May 03, 2008 12:47 am
by nate22
That worked! I see Flash! There is some horrendous other problem however because there is still a gigantic amount of error message displayed, so I will go use this advice on a fresh template. Thank you for helping me again. It is going in my file; once this CMSMS site is finally up, I am going to start my website of tips based on what I have learned and saved to text files as notes. I will stick it in my footer and at least be giving something back to the community.

Re: process to insert flash

Posted: Sat May 03, 2008 9:39 am
by Wiedmann
Nullig wrote:In the head of your template put:
This should not be necessary, because the plugin should do this automatically (if this is not working, "swfobject.js" is saved at the wrong location, and youcan/must use the script parameter).

Re: process to insert flash

Posted: Mon May 05, 2008 3:55 pm
by nate22
Wiedmann wrote:
Nullig wrote:In the head of your template put:
This should not be necessary, because the plugin should do this automatically (if this is not working, "swfobject.js" is saved at the wrong location, and youcan/must use the script parameter).
It's supposed to be in the install directory, no?