Jump to content
Stef's Coding Community

draig_hand

Member
  • Content Count

    23
  • Joined

  • Last visited

Community Reputation

0 Neutral

About draig_hand

  • Rank
    Member
  1. Resolved it myself by cheating. I've placed the code below fyi. function disableButton() { var tempdur="a duration value from program"; if(myValue=incorrect) document.getElementById('button').disabled = false; else if((myValue=correct) setTimeout("document.getElementById('button').disabled = true;",1)&&setTimeout("document.getElementById('button').disabled = false;",tempdur); }
  2. Hello all, I am trying to figure out a way to enable and disable a button depending on wether a video is in pause (enable) or play (disable) condition. I have tried to figure out if this can be done using only JavaScript coding but with no success. Can it be done with JS or is there a need to use ActionScript in the fla? (I hope not!). Please find the code below fyi. (Note it refers to external video_shell.fla, .flv and .swf files built using Adobe Flash CS3.) Can someone look at the code supplied and point me in the right direction please? Thanks very much. codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="490" height="367" id="video_shell" align="middle"> value="#e5e5e5" /> allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> I need something along the lines of: function enabledisable() { if(video is not playing) { document.getElementById('button').disabled = false; } else if (video is playing) { document.getElementById('button').disabled = true; } }
  3. Succeeded with window.open(choosetopic()+''+chooseproject()+''+".html");
  4. Thanks everyone The solution - i just needed to put quotes around it window.open("disclaimer.html") Thanks again.
  5. Thanks Benjamin I'll give it a go and get back to you. Thanks again.
  6. Hello all, I am trying to set up an onclick function in Javascript that opens another html file. Below there are a few examples of the code used and the error messages they received. Please note that it must be a button not a hyperlink and also it needs to be the genuine file that opens not a popup window. I cannot fathom why a simple request to open a file with a button should be such a problem! Can anyone assist please? THE FOLLOWING CODE function openFile() { file.open(C:\Documents and Settings\Administrator\My Documents\abbtweb\disclaimer.html) } GETS ERROR:- - line 145 Object expected (button line of code) ... THE FOLLOWING CODE function openFile() { file.open(disclaimer.html) } GETS ERROR:- - line 227 file is undefined (file.open line of code) ... THE FOLLOWING CODE function openFile() { file.open{C:\Documents and Settings\Administrator\My Documents\abbtweb\disclaimer.html} } GETS ERRORS:- - line 227 char 11 expected ; (file.open line of code) - line 145 Object expected (button line of code) ... THE FOLLOWING CODE function openFile() { window.open(disclaimer.html/) } GETS ERRORS:- - line 227 'disclaimer' is undefined (window.open line of code) ... THE FOLLOWING CODE function openFile() { window.open(/disclaimer.html/) } GETS ERRORS:- - line 227 Access Denied (window.open line of code)
  7. ElEng GenKno HVAC ICT Engineering MarEng /* end clicking */> Scope Specification Design Build Accept /* end clicking */> LOD 1 LOD 2 LOD 3 LOD 4 /* end clicking */> My FileName Values:
  8. Hello all, I have tried to solve this problem a number of ways, all unsuccessfull, and I am now back at the stage were I have to begin again so I am seeking your help. I have two radio button arrays which I want to use to construct a file name and then have a button 'onclick' command that opens that file. I am finding it difficult writing a function that can retrieve the checked values and retain them until the button 'onclick' event is initiated. FYI The first array provides the first part of the file name, the second array the second part and then the file extension is added to the file name at the 'onclick' event. I am hoping someone can suggest a way of picking up these values, concatentating them and then opening the file? Thanks for taking the time to read this.
  9. Hello Stefan, My reason fro delay in reply to your last post is that I have taken your advice and 'bitten the bullet' and obtained CS3 since which time I have been struggling to learn how to use it all. (it's a very powerfull and comprehensive package!) I have opened a new thread which you may be interested to view - http://www.killersites.com/forums/post/10185/#p10185 Thankyou for taking the time to answer my earlier request.
  10. Hello all, I have an HTML page created using Dreamweaver CS3 which contains a SWF movie produced with Flash CS3 (movie duration 9min57secs). I have deliberately excluded the addition of a skin and the movie is placed in a ?Pause? condition when the page opens. Within the HTML I have a Javascript function which produces a duration value 'x'. (which is an integer of milliseconds) My requirement, and my problem, is that I wish to pass this duration value to the Flash video in such a way as to instruct the video to ?resume? play and then (after 'x' milliseconds duration) pause the playback and await the next ?resume? instruction from Javascript. I am aware that Javascript and Actionscript can pass instructions to and from one another using ?ExternalInterface.addCallback? and ?ExternalInterface.call?, however, all the tutorials and forum examples I have viewed to date only show how to pass text, or to run a very short video to its end and invariably they all involve the use of a button to instigate the function. Can anyone direct me to, or provide, an example that performs the functions I have described above. I hope someone can help me. Thanks.
  11. Hello Stefan, Thanks for your prompt response. I've been reading up on Flash, as you say it's powerfull, unfortunately it's powerfully expensive too. Can you recommend a cheaper alternative that I could use until I'm profficient enough to justify the purchase of Flash? Something that would make the transition to Flash straightforward.
  12. Hello, I wasn't sure that I could choose the appropriate forum for this query so, if anyone can advise me of the correct forum I would appreciate it. Please note that I am deliberatelly not mentioning formats or applications in this query! I wish to have a video on my web page that has no direct user control of Start, Pause, Stop, etc. The video presented needs to be controlled by the background program which at appropriate points will advance or pause the video. Can anyone advise the best video format and best program language to use to accomplish this? In addition would anyone know where I can see an example of this sort of thing in action. Thanks in advance.
  13. I replaced the existing code with the code you supplied. Locally the functionality is unaffected i.e. it works. Unfortunately I'm still seeing the same problems when running from the web server! Observation: (NB - the 'quizform' form contains 'thequestion', 'theresponse' and 'thesolution'.) When rolldice function completes the "theresponse" and the "thesolution" parts of the form are returning the correct details. It is only "thequestion" that does not correspond with the rolldice result! Is it possible that the 'generatequestions' function is to blame? To see on server look for abbermist.co.uk/quizGK%20w3c%20NEWEST.html
  14. Reading the link provided I felt I was nearing the end of the saga too so I copied the suggeted solution:- on action {loaded()} However, try as I might I cannot seem to fit this into my code and make it work I'm sure it's due to my ignorance. e.g. the first line of given code is "on action {loaded()}" - I don't know where this would fit. It seems to be hanging there independant of the rest of the code!? Also the convention
  15. Here it is :- http://www.abbermist.co.uk/quizGK%20w3c%20NEW.html
×
×
  • Create New...