Jump to content

dtUser

New Members
  • Posts

    4
  • Joined

  • Last visited

dtUser's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. dtUser

    ActionScript

    I have an movie clip I'm using as a button with an onRelease event handler in an inline function. movieclip.onRelease = function (){ //code that executes here } I would also want this code to execute if the user presses the Enter key. movieclip.onRelease = movieclip.onKeyDown = function (){ // code that executes here } Can anyone help fill in the missing code? Thanks
  2. falkencreative, that's it! Thank you so much for your help. It it now working.
  3. I've tried using a for loop with my array and also changed the 'if' statement. var aDsx:Array = new Array(); aDsx[0] = "dsx"; aDsx[1] = "dsx-1"; aDsx[2] = "dsx1"; aDsx[3] = "dsx3"; aDsx[4] = "dsx-3"; aDsx[5] = "digital signal cross-connect"; for (var i =0; i<aDsx.length; i++){ //trace (aDsx); } if (inputText == aDsx){ Run this function (); } The trace statement works but the input text field does not.
  4. Flash ActionScript 2.0 question about Arrays and input text fields. I’m using an input text field (instance name: inputText)for a Search in a Flash virtual tour. The user types in a keyword and clicks on a Search button. In the Search button, I have an ‘if’ statement that reads: If (inputText == “thekeywordtext”){ Run this function (); } So, for example if I want the user to run a particular function if they type in ‘dsx1’, I’m thinking they could also type in dsx-1, dsx, digital cross connect, x-connect etc. Can I use an array with these variations for searching and then in my if statement reference the array? So: var myArray:Array = new Array(); myArray[0] = "dsx"; myArray[1] = "dsx1"; myArray[2] = "dsx-1"; myArray[3] = "digital signal cross-connect"; If (inputText == myArray){ Run this function(); } Thanks.
×
×
  • Create New...