Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: activate swf without clicking on it.

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

    Red face activate swf without clicking on it.

    Hi,
    I dont know why the swf file has to be clicked in order to start working in explorer, it shows outlined until you click, and then it starts running, any way arround this?

    Thanks a bunch!

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    There's a javascript method, I believe, as well as, I think, modification of part of the object/embed tags.
    Try searching the forum, as there have been several discussions of this.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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

    Default

    The javascript method is discussed in my posts here.

  4. #4
    Join Date
    Dec 2006
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am trying this also.
    My test page is www.nickschale.us/joni (the test nav bar is on the ABOUT page)

    Pulling my last few hairs out with this... could someone take a look and lend some advice?

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

    Default

    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...

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I doubt it. That's taking too much control of the user's computer. With that, if it worked for anything, you could help the user click ok to agree to install a bunch of spyware, ok to delete all the files on his/her harddrive, then ok to give you his/her credit card numbers.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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

    Default

    Its not like that...

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

    Default

    Quote Originally Posted by Hound View Post
    I am trying this also.
    My test page is www.nickschale.us/joni (the test nav bar is on the ABOUT page)

    Pulling my last few hairs out with this... could someone take a look and lend some advice?
    I looked at your source. One question I have is where your swfobject.js file resides. Is it in the same directory as your page? You probably also want to move your link to that file from the <td> up to the head. Other than that, the only thing I see is that I've never tried to use it within a table. But I can't see why it wouldn't work that way.

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

    Default

    It will basically click on the whole obejct itself and not a single area on any object... EG a checkbox...

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

    Default

    Code:
    <td colspan="3" bgcolor="#990000"><div id="flashcontent">
    
    
    <script type="text/javascript" src="swfobject.js"></script>
    <div id="flashcontent">
      <a href="index.html">Home</a> | <a href="about.html">About</a> | <a href="services.html">Services</a> | <a href="benefits.html">Benefits</a> | <a href="menu.html">Menus</a> | <a href="faq.html">FAQ</a> | <a href="contact.html">Contact</a>
    </div>
    
    <script type="text/javascript">
       var so = new SWFObject("flash/navbar.swf", "navbar", "790", "25", "8", "#990000");
       so.write("flashcontent");
    </script></td>
    I looked again and found the problem. You've got the "flashcontent" <div> started twice. Delete the first one, and I'd guess you should be good to go.

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
  •