I searched a lot for something like this and it helped me a lot improving my plugins, so I am sharing it with Wordpress Plugins developers: http://wp.tutsplus.com/articles/quick-tip-improving-shortcodes-with-the-has_shortcode-function/
Like someone posted in the comments section, I don’t like parsing the whole content, it looks slowish.
This methos seems much better: http://scribu.net/wordpress/optimal-script-loading.html
Indeed, the method you indicated is better, thanks for sharing it!
Just write wp_enqueue_script inside the add_shortcode function, the script will get loaded at the end of the < body > if the shortcode has been called
All problems solved