WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] FLV movie - javascript in page (7 posts)

  1. ryanoz
    Member
    Posted 5 years ago #

    Ok, so I've looked everywhere, read the docs (using javascript) and I can not figure this out.
    I am trying to insert a FLV movie into a WP page. However, I want to use the same publish settings I used in flash. Specifically, I need to use the javascript flash spit out when publishing the .swf which uses one of the controller skins, color, and the player detection with link to download player. This can't be done using the wp-flv plugin.
    When I insert the javascript in the page and save, it is putting a <p> in front of the script and so its not working.
    So how can I insert the javascript in a page?
    Like I said, I read the (using javascript) and it suggest creating a function within the script and calling it from within the page. This doesn't work, the whole script needed can't just be put into one function. Please help. Thank you

  2. Eric Amundson
    Volunteer Moderator
    Posted 5 years ago #

    Not sure I know the answer to this, but if you're trying to use JavaScript within a post, you'll probably want to use a plugin:
    http://wordpress.org/extend/plugins/inline-javascript/

  3. ryanoz
    Member
    Posted 5 years ago #

    no I don't think that is going to work. I'm using WP just for content management, so I'm dealing only with pages and page templates. I guess I'm going to have to come up with some kind of page template that has the javascript for embedding the FLV file. Although, its not the same FLV movie on every page; each is different. I'm looking into using the SWFobject, maybe I can make a generic template that I can use to embed any FLV movie.

  4. Eric Amundson
    Volunteer Moderator
    Posted 5 years ago #

    I'm pretty sure that if you're going to use JavaScript in any pages or posts, you'll need a plugin like this.

  5. ryanoz
    Member
    Posted 5 years ago #

    yea. but the problem is that the client will be logging in to make changes/updates and they will be using the visual editor and so I'm sure WP will strip the markup and script.

  6. Eric Amundson
    Volunteer Moderator
    Posted 5 years ago #

    I'm not so sure of that . . . give it a try on a dev machine and see.

  7. ryanoz
    Member
    Posted 5 years ago #

    oh. I got this working. I just changed the wp-flv plugin to output the swfobject markup I needed. Putting scripts in a page isn't going to work when you have someone logging in as an editor and using the visual editor to make changes and save, it will just strip all that out.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.