www.webdeveloper.com
Results 1 to 3 of 3

Thread: pls help combining two scripts

  1. #1
    Join Date
    Oct 2011
    Posts
    2

    pls help combining two scripts

    Hi everyone

    can someone help me to combine the following two scripts so that it's one script.

    Script 1
    PHP Code:
    <script language="JavaScript" type="text/javascript"
    function 
    abspielen(){
        var 
    obj swfobject.getObjectById("FlashID2");
        
    obj.abspielen();
        }
    </script> 

    <script language="JavaScript" type="text/javascript">

    Script 2
    PHP Code:
    function einblenden(div) { 
      
    with(document.getElementById(div).style){ 
        if(
    display=="none"){ 
          
    display="inline"
        } 
        else{ 
          
    display="none"
        } 
        
      } 

    </script> 


    Thanks

    Schiggi

  2. #2
    Join Date
    Nov 2010
    Posts
    1,036
    I'm assuming that there's something wrong with:

    Code:
    <script type="text/javascript">
    
    function abspielen(){
        var obj = swfobject.getObjectById("FlashID2");
        obj.abspielen();
        }
    
    function einblenden(div) {
      with(document.getElementById(div).style){
        if(display=="none"){
          display="inline";
        }
        else{
          display="none";
        }
        
      }
    }
    </script>
    but what could it be?

  3. #3
    Join Date
    Oct 2011
    Posts
    2
    Hi

    the problem is that I have to call the function in AS3 via
    ExternalInterface.addCallback( ....

    so I'd wonder if i can combine both functions in one, so that its enough calling 1 function in AS3
    Thx

    Schiggi

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles