Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: link fix

...

Panel
titleSyntax

urlEncode(string, [usePercentEscape])

  • Parameters

string url- The URL to encode.

bool usePercentEscape - Optional. False or black indicates to use query parameter style escaping. True indicates to use URI fragment style escaping.

  • Results

string- The encoded URL.

...

Panel
titleExamples


Code Block
languageactionscript3
titleCode Snippet
urlEncode("Hello World")   //yields "Hello+World"


Code Block
languageactionscript3
titleCode Snippet
urlEncode("Hello World", False)  //yields "Hello+World"


Code Block
languageactionscript3
titleCode Snippet
urlEncode("Hello World", True)  //yields "Hello%20World"


Custompanel
titleExample

Vision Example

  1. Drag a Text Field component and a Label component onto a window.
  2. In the Vision Property Editor, enter a parameter for the URL you'll use. For this example, we used 'Hello World.'
  3. Select the Label component, then click on the Binding icon for the label's Text property.
  4. On the Property Binding screen, select Expression.
  5. Enter the expression in the Configure Expression Binding section. In the example, we entered the URL plus the expression function, "urlEncode ()". We entered the oath to the Text Field's text property as the string.

    Code Block
    languageactionscript3
    titleCode Snippet
    "https://inductiveuniversity.com/" + urlEncode({Root Container.Text Field 1.text})




  6. Alternatively, you can get the path for the text field by putting the cursor inside the parentheses, clicking the Property Value icon, then selecting the text property from the Text Field component.
  7. Click OK to save the binding.The encoded URL is now displayed in the Label component.


Custompanel
titleExample

Perspective Example

  1. Drag a Text Field component and a Label component onto a view.
  2. In the Perspective Property Editor, enter a parameter for the URL you'll use. For this example, we used 'Hello World.'
  3. Select the Label component, then click on the Binding Binding  icon for the label's Text property.
  4. On the Property Binding screen, select Expression.
  5. Enter the expression in the Configure Expression Binding section. In the example, we entered the URL plus the expression function, "urlEncode ()". We entered the oath to the Text Field's text property as the string and the parameter "True" to use URI fragment style escaping.

    Code Block
    languageactionscript3
    titleCode Snippet
    "https://inductiveuniversity.com/" + urlEncode({../TextField_0.props.text}, True)



  6. Alternatively, you can get the path for the text field by putting the cursor inside the parentheses, clicking the Property Value icon, then selecting the text property from the Text Field component.

  7. Click OK to save the binding.The encoded URL is now displayed in the Label component.


...