Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clippy text can only be set at initialization time #2

Open
natacado opened this issue Aug 3, 2009 · 3 comments
Open

Clippy text can only be set at initialization time #2

natacado opened this issue Aug 3, 2009 · 3 comments

Comments

@natacado
Copy link

natacado commented Aug 3, 2009

I'd like to use something like jQuery to update the flashVars attribute of clippy, so it clips different things at runtime. A workaround is to destroy and re-create clippy entirely, but it seems like it'd be possible to make clippy just read from the flashvars as the user clicks?

@theworkinggroup
Copy link

+1 for this one. It's wasteful to initialize a bunch of clippies. As a matter of fact I just crashed Firefox by loading like 100 of them.

@ericabouaf
Copy link

+ 1 , would be cool to have an javascript way to change the text

@harking
Copy link

harking commented Sep 19, 2011

Work around until the flash source can be recompiled is to just remove and recreate the flash object.

    function updateBcpClippy( text ) {
      $('#bcp-clippy').remove();
      var clippy = $('<object id="bcp-clippy" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"'+
                 'width="110"'+
                 'height="14"'+
                 'id="clippy" >'+
            '<param name="movie" value="/swf/clippy/build/clippy.swf"/>'+
            '<param name="allowScriptAccess" value="always" />'+
            '<param name="quality" value="high" />'+
            '<param name="scale" value="noscale" />'+
            '<param NAME="FlashVars" value="text='+text+'">'+
            '<param name="bgcolor" value="#fff">'+
            '<embed src="/swf/clippy/build/clippy.swf"'+
                   'width="110"'+
                   'height="14"'+
                   'name="clippy"'+
                   'quality="high"'+
                   'allowScriptAccess="always"'+
                   'type="application/x-shockwave-swf/clippy/build"'+
                   'pluginspage="http://www.macromedia.com/go/getswf/clippy/buildplayer"'+
                   'FlashVars="text='+text+'"'+
                   'bgcolor="#fff"'+
           '/>'+
           '</object>');
      $(bcp_textarea).after( clippy );
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants