I think I might be asking something is already answered, but I'm getting confused by the posts that I've read and it's late in the day!
I am working on a node to create and insert flash content using an input filter (example).
I have written an input filter in the form [flash|nid=xx|parameters...]. My filter generates the necessary HTML to inject flash using the ufo method. I have realised that Drupal is caching my filter, which is fine, but my original code relied on the generation of the HTML to inject the relevant javascript in to the <head> of the page.
When it calls the filter output from the cache my generation routine is skipped, the injection doesn't occur, so the flash fails.
My first option was to hard code the script in to the template, but I want a more flexible solution that is template independent.
As far as I can tell there is no way (?) to determine whether the flash input filter is being used on a given page (or am I wrong?) so I need to inject the javascript to every page just in case.
If that's the case then I thought I would use hook_footer, but that wasn't right.
I have found a post that describes the use of hook_menu, so I think I need something like...