Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8304839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:56:52+00:00 2026-06-08T17:56:52+00:00

I am currently trying to put together a simple Illustrator plugin, and coming from

  • 0

I am currently trying to put together a simple Illustrator plugin, and coming from a design background this is proving to be quite a task, I have experience with JS, but not with Flex.

What I want to do is to have a panel in Illustrator, with an input field and a button. You type something in the input and press the button and a text frame with the desired text is added to the canvas.

But how do I pass the value from a mx:Textinput to the Controller.as file? I couldn’t find an answer on the web.

This is my main.mxml file:

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" historyManagementEnabled="false">
    <mx:Script>
        <![CDATA[
            private var c:Controller = new Controller();
        ]]>
    </mx:Script>

    <mx:VBox height="100%" width="100%" verticalAlign="middle" horizontalAlign="center">
        <mx:Label text="myVariable"></mx:Label>
        <mx:TextInput name="TextValue"/> // I want the text value to be passed to the Controller class so I can pass it on to my JSX function
        <mx:Button label="Run" click="c.run()"/>
    </mx:VBox>

</mx:Application>

And this is my Controller.as file:

package
{
    import flash.external.HostObject;

    public class Controller
    {
        [ Embed (source="myScript.jsx" , mimeType="application/octet-stream" )]

        private static var myScriptClass:Class;

        public function run():void {
            var  jsxInterface:HostObject = HostObject.getRoot(HostObject.extensions[0]);
            jsxInterface.eval( new myScriptClass ().toString());

            //calling from AS to JSX
            jsxInterface.myJSXFunction (myVariable); //This is where I want the value to be passed to

        }

    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T17:56:53+00:00Added an answer on June 8, 2026 at 5:56 pm

    You might also pass the string directly to the c.run() call.

    public function run(myString:String):void {
    ...
        jsxInterface.myJSXFunction (myString)
    ...
    

    and then

    <mx:TextInput id="TextValue"/>
    <mx:Button label="Run" click="c.run(TextValue.text)"/>
    

    Just another approach.

    Loic

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently trying to put together a rich text editor that includes widgets from
I'm currently trying to get the most popular productID from my MSSQL Database. This
I am trying to make put together a simple application to control the phone
I am trying to put together a simple proof of concept with a Pinterest
I'm trying to put together a simple system for a user to generate a
I'm trying to put together a real simple MVC DataBind sample. I'm comparing Telerik
Good evening guys! I'm currently trying to put together a CloudFlare client for the
I am currently trying to put together an URL where I specify some GET
I am currently trying to put together a model structure for performing various calculations,
Im currently trying to downlaod a audio track from a WCF, i need some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.