diff --git a/swfobject_api.info b/swfobject_api.info
index d4fedfe..6722e2b 100644
--- a/swfobject_api.info
+++ b/swfobject_api.info
@@ -1,4 +1,5 @@
 ; $Id$
 name = SWFObject API
 description = Implements the SWFObject Library, makes it easy for developers to add flash content
-core = 6.x
\ No newline at end of file
+dependencies[] = libraries
+core = 6.x
diff --git a/swfobject_api.install b/swfobject_api.install
index f66db16..e2bf0b3 100644
--- a/swfobject_api.install
+++ b/swfobject_api.install
@@ -12,7 +12,6 @@
 function swfobject_api_uninstall() {
   variable_del('swfoa_settings_express');
   variable_del('swfoa_settings_version');
-  variable_del('swfoa_settings_path');
 }
 
 /**
@@ -25,9 +24,8 @@ function swfobject_api_requirements($phase) {
   $requirements = array();
   $t = get_t();
 
-  $path = variable_get('swfoa_settings_path', drupal_get_path('module', 'swfobject_api') .'/swfobject.js');
-  if (! file_exists($path)) {
-    $error_message = $t("Please download the swfobject package from !url and place the required files in the swfobject module directory. See README.txt for more info.",
+  if (!file_exists(libraries_get_path('swfobject'))) {
+    $error_message = $t('Please download the swfobject package from !url and place the extracted swfobject folder into the libraries directory. See README.txt for more info.',
       array('!url' => l('http://code.google.com/p/swfobject/', 'http://code.google.com/p/swfobject/'))
     );
 
@@ -55,3 +53,41 @@ function swfobject_api_requirements($phase) {
 
   return $requirements;
 }
+
+/**
+ * Implements hook_update_N().
+ */
+function swfobject_api_update_6001() {
+  $return = array();
+
+  // If the Libraries API module is not installed and enabled.
+  if (!module_exists('libraries')) {
+    // If the Libraries API is not installed.
+    if (!drupal_get_path('module', 'libraries')) {
+      $return['#abort'] = array(
+        'success' => FALSE,
+        'query' => t('Please install the <a href="!url">Libraries API</a> module as the SWFObject API module now depends on it.',
+          array('!url' => 'http://drupal.org/project/libraries')),
+      );
+    }
+    else {
+      // Enable the Libraries API module.
+      require_once('includes/install.inc');
+      module_rebuild_cache();
+      drupal_install_modules(array('libraries'));
+    }
+  }
+  elseif (!file_exists(libraries_get_path('swfobject'))) {
+    $return['#abort'] = array(
+      'success' => FALSE,
+      'query' => t('Please download the swfobject package from !url and place the extracted swfobject folder into the libraries directory. See README.txt for more info.',
+        array('!url' => l('http://code.google.com/p/swfobject/', 'http://code.google.com/p/swfobject/'))),
+    );
+  }
+  else {
+    // Delete deprecated variable.
+    variable_del('swfoa_settings_path');
+  }
+
+  return $return;
+}
diff --git a/swfobject_api.module b/swfobject_api.module
index 2585e6f..5839168 100644
--- a/swfobject_api.module
+++ b/swfobject_api.module
@@ -93,12 +93,7 @@ function swfobject_api_settings_form() {
     '#description' => t('Express install allows player upgrades without having to leave the site. Only versions 6.0.65 and above are supported.'),
     '#default_value' => variable_get('swfoa_settings_express', FALSE),
   );
-  $form['swfoa_settings_path'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Path to SWFObject JS.'),
-    '#description' => t('Path to the SWFObject JS file.'),
-    '#default_value' => variable_get('swfoa_settings_path', drupal_get_path('module', 'swfobject_api') .'/swfobject.js'),
-  );
+
   return system_settings_form($form);
 }
 
@@ -118,7 +113,7 @@ function swfobject_api_ensure_swfobject($settings = array()) {
   static $done = FALSE;
   if (! $done) {
     // Load the swfobject library and our add-on to activate it.
-    drupal_add_js(variable_get('swfoa_settings_path', drupal_get_path('module', 'swfobject_api') .'/swfobject.js'), 'module', 'header');
+    drupal_add_js(libraries_get_path('swfobject') . '/swfobject.js', 'module', 'header');
     // Load the JS which creates loads the params into the page
     drupal_add_js(drupal_get_path('module', 'swfobject_api') .'/swfobject_api.js', 'module', 'footer');
     $done = TRUE;
@@ -161,7 +156,7 @@ function theme_swfobject_api($url, $params = array(), $vars = array(), $id = NUL
     'version' => variable_get('swfoa_settings_version', '6'),
     'type' => 'movie',
     'bgcolor' => '#FFFFFF',
-    'express_redirect' => variable_get('swfoa_settings_express', TRUE) ? drupal_get_path('module', 'swfobject_api') .'/expressinstall.swf' : 'false',
+    'express_redirect' => variable_get('swfoa_settings_express', TRUE) ? libraries_get_path('swfobject') . '/expressinstall.swf' : 'false',
     'class' => '',
   );
 
@@ -204,4 +199,4 @@ function theme_swfobject_api($url, $params = array(), $vars = array(), $id = NUL
   // Return the placeholder HTML that will normally get
   // replaced with flash content.
   return "<div id=\"$div_id\" class=\"{$class}\">{$no_flash}</div>\n";
-}
\ No newline at end of file
+}
