Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: activate swf without clicking on it.

  1. #11
    Join Date
    Apr 2007
    Location
    Phoenix, AZ
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by pcbrainbuster View Post
    It will basically click on the whole obejct itself and not a single area on any object... EG a checkbox...
    By inserting the SWF with a javascript like this, you bypass the need for it to even be clicked in the first place.

  2. #12
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I realize that but it was just something I suggested he should try as I had not...

  3. #13
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by pcbrainbuster View Post
    Well in JavaScript do this -

    <script>
    document.onload=function() {
    document.getElementById('id').click()
    }
    </script>

    Just replace id with the objects id, though I do not know if this would work for what your looking for, but it does with things like check boxes...
    That is IE only (if it would even work for this) but, 'click to activate' happens in other browsers. Adobe has a script to fix this whole mess in browsers or you can simply take your tag(s) and surround them in a <noscript></noscript> tag so that non-javascript enabled users will still see the content, albeit with that 'click to activate' nonsense. Then make a script with your tag(s) in it:

    document.write('<object etc....');

    Save that as an external script (text only file) - say media.js, and place the tag for it after the closing </noscript> tag:

    HTML Code:
    </noscript>
    <script type="text/javascript" src="media.js"></script>
    Proper escaping of line breaks should be followed in the script, ex:

    Code:
    document.write('<object>\n\
    <param name="whatever" value="whatever">\n\
    </object>');
    If you have any single quotes (') in your tag(s) - you shouldn't, generally - they must also be escaped, like so:

    Code:
    \'
    Other script methods also work but the outerHTML=outerHTML one is IE only and that and the innerHTML=innerHTML ones can fail if there is any non-standard markup that might get trashed in the translation.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #14
    Join Date
    Apr 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I found this http://www.kirupa.com/developer/flash8/flash_fix.htm to fix the problem apparently it had to do with the embed method. I will try it and let you all know if it works.

    Thanks everyone for your willingness to help

  5. #15
    Join Date
    Apr 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    http://www.nickschale.us/joni/index.html

    hey from the design point of view.. is pretty good..
    I would recommend that you move the about image to touch the bottom border and the left one.. same with the homepage.. just a thought.


  6. #16
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I believe that will work.

    The problem though, is any multimedia object. Whether it uses the embed, applet, object or a combination of these tags makes no difference.

    Generally, if you write the tag(s) to the page via any external javascript, you are OK. When doing so, it is best to also provide fall back, non-javascript enabled code. Some methods for doing this work better (in more cases) than others. I've recently made up a wizard that will do this for you in virtually all cases. All you need are your otherwise working tags, the ones that cause the 'click to activate' thing:

    http://home.comcast.net/~jscheuer1/s...activate_w.htm
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #17
    Join Date
    Jan 2007
    Location
    Bournemouth, England
    Posts
    99
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I think Dreamweaver CS3 has a function that disables that inbuilt, when I open a page with a flash thing on in CS3 it asks me to convert the code to JS for some reason.

  8. #18
    Join Date
    Apr 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    I believe that will work.

    The problem though, is any multimedia object. Whether it uses the embed, applet, object or a combination of these tags makes no difference.

    Generally, if you write the tag(s) to the page via any external javascript, you are OK. When doing so, it is best to also provide fall back, non-javascript enabled code. Some methods for doing this work better (in more cases) than others. I've recently made up a wizard that will do this for you in virtually all cases. All you need are your otherwise working tags, the ones that cause the 'click to activate' thing:

    http://home.comcast.net/~jscheuer1/s...activate_w.htm
    so just use your wizard? and not the kirupa stuff?

  9. #19
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by dgnara View Post
    so just use your wizard? and not the kirupa stuff?
    That choice is up to you. Either should work. I can help out if you have problems with the wizard, perhaps even with other code you might use. But, I am of course more familiar with how my code own works.

    Eventually, if you do this sort of thing much at all, you may want to gain an understanding of the principals involved so as to inform your choice of method as it most applies to a given situation.

    Or, you may just want to take the approach of using whatever works and is easiest for you to implement.

    Either way, it is still up to you.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •