I'm using SWFObject 2

[swf file="myfile.swf"] doesn't work in a page but does work. Not really a big deal there.

Now when I use this in module code... like...

if ($form_id == 'privatemsg_new' && user_access('create flashtags')) {
$form['privatemsg']['flashtags'] = array(
'#type' => 'fieldset',
'#access' => user_access('create flashtags'),
'#title' => t('Flash Tags'),
'#collapsible' => FALSE,
'#collapsed' => empty($form['#privatemsg_message']['flashtags']),
'#description' => t('Flashtags are used to add a context to a message and only viewable by the sender.'),
'#prefix' => '

',
'#value' => '[swf file="hat.swf"]',
'#suffix' => '

',
'#weight' => 1,
);

It prints out [swf file="hat.swf"] on the page if I change that to it is printing out

What's going on here that my syntax is so different to the instructions?

Comments

akayani’s picture

Let me write that again as it' stripped out the tags

I'm using SWFObject 2


[swf file="myfile.swf"] doesn't work in a page but does work is <swf file="myfile.swf">. Not really a big deal there.

Now when I use this in module code... like...

if ($form_id == 'privatemsg_new' && user_access('create flashtags')) {
$form['privatemsg']['flashtags'] = array(
'#type' => 'fieldset',
'#access' => user_access('create flashtags'),
'#title' => t('Flash Tags'),
'#collapsible' => FALSE,
'#collapsed' => empty($form['#privatemsg_message']['flashtags']),
'#description' => t('Flashtags are used to add a context to a message and only viewable by the sender.'),
'#prefix' => '',
'#value' => '[swf file="hat.swf"]',
'#suffix' => '',
'#weight' => 1,
);

It prints out [swf file="hat.swf"] on the page if I change that to <swf file="myfile.swf"> it is printing out<swf file="myfile.swf"/>

What's going on here that my syntax is so different to the instructions?

akayani’s picture

OK so I've loaded SWFObject 1 > That isn't being picked up in the list of available embed types.

If I use the jQuery method it picks up the [] tag type perfectly, except when it's added via a module then is fails and prints out as the tag.

Why is this so?