Index: image_fupload.module
===================================================================
--- image_fupload.module	(revision 3)
+++ image_fupload.module	(working copy)
@@ -119,7 +119,7 @@
   return array(
     'swfupload_settings' => array(
       'template' => 'swfupload-settings',
-      'arguments' => array('modulepath' => NULL, 'uploadpath' => NULL, 'maxfilesize' => NULL, 'fileextensions' => NULL, 'sessionid' => NULL, 'uploadlimit' => NULL, 'nodetype' => NULL, 'fieldname' => NULL, 'field_required' => NULL, 'storage_mode' => NULL, 'redirect_url' => NULL),
+      'arguments' => array('modulepath' => NULL, 'libpath' => NULL, 'uploadpath' => NULL, 'maxfilesize' => NULL, 'fileextensions' => NULL, 'sessionid' => NULL, 'uploadlimit' => NULL, 'nodetype' => NULL, 'fieldname' => NULL, 'field_required' => NULL, 'storage_mode' => NULL, 'redirect_url' => NULL),
     ),
     'fupload_create_filename' => array(
       'arguments' => array('image' => NULL, 'replacements' => NULL),
Index: image_fupload.install
===================================================================
--- image_fupload.install	(revision 3)
+++ image_fupload.install	(working copy)
@@ -53,13 +53,19 @@
 
   if ($phase == 'runtime') {
     // Make sure that swfUpload Files which aren't bundled with this module, are located in swfupload directory
-    $path = drupal_get_path('module', 'image_fupload') .'/swfupload/';
-    if (!file_exists($path .'swfupload.js') || !file_exists($path .'swfupload.queue.js') || !file_exists($path .'swfupload.swf')) {
+    $path = libraries_get_path('swfupload');
+    if (!file_exists($path .'/swfupload.js') || !file_exists($path .'/plugins/swfupload.queue.js') || !file_exists($path .'/Flash/swfupload.swf')) {
       // One or more needed files are missing; give an error
       $requirements['image_fupload'] = array(
         'title' => t('Image FUpload'),
         'value' => t('Missing or wrong files in subdirectory "swfupload"'),
-        'description' => t('Some needed files which are not bundled with this module, are missing or out-of-date! This can be either "swfupload.swf", "swfupload.js" or "swfupload.queue.js" which should be located in "%path". These files can be downloaded from !page. <em>Note:</em> Version 2.2.0 or higher is needed.', array('%path' => $path, '!page' => l(t('SWFUploads project page'), 'http://code.google.com/p/swfupload/'))),
+        'description' => t('Some needed files which are not bundled with this module, are missing or out-of-date! This can be either: 
+          <ul>
+            <li>swfupload/Flash/swfupload.swf</li>
+            <li>swfupload/swfupload.js</li>
+            <li>swfupload/plugins/swfupload.queue.js</li>
+          </ul>
+          They should be located in your libraries folder, "%path". Download the swfupload 2.2.x Core package from !page, and extract its contents into %path. <em>Note:</em> Version 2.5.x is not compatible with this version of Image Fupload', array('%path' => $path, '!page' => l(t('SWFUploads project page'), 'http://code.google.com/p/swfupload/'))),
         'severity' => REQUIREMENT_ERROR,
       );
     }
Index: image_fupload_imagefield/image_fupload_imagefield.module
===================================================================
--- image_fupload_imagefield/image_fupload_imagefield.module	(revision 3)
+++ image_fupload_imagefield/image_fupload_imagefield.module	(working copy)
@@ -69,8 +69,9 @@
     if ($field['widget']['type'] == "image_fupload_imagefield_widget" && arg(3) != "noflash" && arg(3) != "list_imagefields" && user_access('mass upload images')) {
       // load needed JS & CSS - Files
       $module_path = drupal_get_path('module', 'image_fupload');
-      drupal_add_js($module_path .'/swfupload/swfupload.js', 'module');
-      drupal_add_js($module_path .'/swfupload/swfupload.queue.js', 'module');
+      $library_path = libraries_get_path('swfupload');
+      drupal_add_js($library_path .'/swfupload.js', 'module');
+      drupal_add_js($library_path .'/plugins/swfupload.queue.js', 'module');
       drupal_add_js($module_path .'/swfupload/fileprogress.js', 'module');
       drupal_add_js($module_path .'/swfupload/handlers.js', 'module');
 
@@ -100,7 +101,7 @@
       $file_max_size = parse_size($field['widget']['max_filesize_per_file']); // maximal allowed file size (bytes)
       $file_extensions = !empty($field['widget']['file_extensions']) ? "*.". str_replace(" ", "; *.", $field['widget']['file_extensions']) : '*.jpg; *.jpeg; *.png; *.gif';
 
-      drupal_add_js(theme('swfupload_settings', base_path() . $module_path, url('fupload/flash'), round($file_max_size/1024), ("*." .str_replace(" ", "; *.", $field['widget']['file_extensions'] . ' ' . strtoupper($field['widget']['file_extensions']))), (!empty($user->sid) ? $user->sid : session_id()), $upload_limit_count, $node_type, $field_name, (!empty($field['required']) ? "true" : "false"), $field['widget']['fupload_mode'], $redirect_url), 'inline');
+      drupal_add_js(theme('swfupload_settings', base_path() . $module_path, base_path() . $library_path, url('fupload/flash'), round($file_max_size/1024), ("*." .str_replace(" ", "; *.", $field['widget']['file_extensions'] . ' ' . strtoupper($field['widget']['file_extensions']))), (!empty($user->sid) ? $user->sid : session_id()), $upload_limit_count, $node_type, $field_name, (!empty($field['required']) ? "true" : "false"), $field['widget']['fupload_mode'], $redirect_url), 'inline');
       drupal_add_css($module_path .'/image_fupload-style.css', 'module', 'all', FALSE);
 
       // unvisible elements, will be written in cache
Index: image_fupload.info
===================================================================
--- image_fupload.info	(revision 3)
+++ image_fupload.info	(working copy)
@@ -1,4 +1,5 @@
 ; $Id: image_fupload.info,v 1.4 2009/03/13 13:29:10 grandcat Exp $
 name = Image FUpload
 description = "Allows uploading several images all at once using swfUpload"
-core = 6.x
\ No newline at end of file
+core = 6.x
+dependencies[] = libraries
Index: swfupload-settings.tpl.php
===================================================================
--- swfupload-settings.tpl.php	(revision 3)
+++ swfupload-settings.tpl.php	(working copy)
@@ -14,7 +14,7 @@
 
 window.onload = function() {
   var settings = {
-    flash_url : "<?php print $modulepath; ?>/swfupload/swfupload.swf",
+    flash_url : "<?php print $libpath; ?>/Flash/swfupload.swf",
     upload_url: "<?php print $uploadpath; ?>",  // Relative to the SWF file
     post_params: {"PHPSESSID" : "<?php print $sessionid; ?>" , "nodetype" : "<?php print $nodetype; ?>", "fieldname" : "<?php print $fieldname; ?>"},
     file_post_name: "Filedata",
Index: image_fupload_image/image_fupload_image.module
===================================================================
--- image_fupload_image/image_fupload_image.module	(revision 3)
+++ image_fupload_image/image_fupload_image.module	(working copy)
@@ -34,8 +34,9 @@
   if ($form_id == "image_node_form" && !isset($form['#node']->nid) && arg(0) != 'img_assist' && arg(3) != "noflash" && arg(3) != "list_images" && user_access('mass upload images')) {
     // Some needed JS & CSS - Files to be included
     $module_path = drupal_get_path('module', 'image_fupload');
-    drupal_add_js($module_path .'/swfupload/swfupload.js', 'module');
-    drupal_add_js($module_path .'/swfupload/swfupload.queue.js', 'module');
+    $library_path = libraries_get_path('swfupload');
+    drupal_add_js($library_path .'/swfupload.js', 'module');
+    drupal_add_js($library_path .'/plugins/swfupload.queue.js', 'module');
     drupal_add_js($module_path .'/swfupload/fileprogress.js', 'module');
     drupal_add_js($module_path .'/swfupload/handlers.js', 'module');
     /* Check if another step with editing options is provided  for this user*/
@@ -44,7 +45,7 @@
       $redirect_url = url('node/add/image/list_images');
     }
     /* Check END */
-    drupal_add_js(theme('swfupload_settings', base_path() . $module_path, url('fupload/flash'), round(variable_get('image_max_upload_size', 800)), '*.jpg; *.jpeg; *.png; *.gif', (!empty($user->sid) ? $user->sid : session_id()), 100, 'image', 'images', 'true', '', $redirect_url), 'inline');
+    drupal_add_js(theme('swfupload_settings', base_path() . $module_path, base_path() . $library_path, url('fupload/flash'), round(variable_get('image_max_upload_size', 800)), '*.jpg; *.jpeg; *.png; *.gif', (!empty($user->sid) ? $user->sid : session_id()), 100, 'image', 'images', 'true', '', $redirect_url), 'inline');
     drupal_add_css($module_path .'/image_fupload-style.css', 'module', 'all', FALSE);  // Style of swfUpload
 
     unset($form['title'], $form['rebuild_images'], $form['buttons']); //don't need this, title will be generated later using filepath
