Drupal variable into Flash

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by elgwiedo on July 23, 2009 at 12:15pm

Hi

I am new to Drupal/Javascript and would like to read the parameter (language selector: $language) into a flash that run on another site (server) within the same domain.
Anyone that can help me ?

Categories: ,

Comments

It's pretty simple. On the

Posted by Garrett Albright on July 23, 2009 at 3:18pm

It's pretty simple.

On the Drupal side, have your module use drupal_add_js() with $type = "setting" to add the variables you need to the Drupal.settings JavaScript object. Also create a JavaScript function that will return the values you need from the object.

Then, inside your Flash app, use the ExternalInterface API to call the JavaScript function and get the values you need.

Easy peasy.

Services

Posted by robloach on August 19, 2009 at 9:27pm

Services is another option with AMFPHP.

Javascript

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /