Pass the content of the variable named after the current object in the text box

I am writing a drag and drop game and when an object is deleted I need information on

This object is displayed in a text box.

I've got objects moveable, put in place through a class.

Within the class, I have set up with the text of each object such as variables

var soaptext: String = "text of SOAP."

for the object with the instance name SOAP.

If I explicitly include the name of the variable:

MovieClip (parent).text_box.text = soaptext;

The required information is displayed, but if I try to get the name of the current object:

MovieClip (parent).text_box.text = myIdName + "text";

The box displays the name of the soaptext variable, but not its content.

Is there a simple way to get this information to appear?

Note - I have little experience and no training formal as3 so am hoping to keep things simple!

You will need 4 movieclips with internal textfields on stage.

Name them: liver, heart, SOAP, drive

Another area of text ("message_txt", not inside a moviclip) will do the e-mail (tell which box was dragged on what other):

For more elements create a loop that goes through an elementsarray with your name of elements inside

soap.addEventListener (MouseEvent.MOUSE_DOWN, opportunity);
soap.addEventListener (MouseEvent.MOUSE_UP, showMessage);
lead.addEventListener (MouseEvent.MOUSE_DOWN, opportunity);
lead.addEventListener (MouseEvent.MOUSE_UP, showMessage);
soap.mouseChildren = false;
lead.mouseChildren = false;

function dragstart(e:MouseEvent):void {}
e.currentTarget.startDrag ();
}

This targetArray can be improved for your needs

var targetArray:Array = new Array ("liver", "heart");

Object (this).heart.txt.text = this.heart.name;
Object (this).liver.txt.text = this.liver.name;
Object (this).liver.mouseChildren = false;
Object (this).heart.mouseChildren = false;

function showMessage(e:MouseEvent):void {}
for (var i: uint = 0; i
If (e.currentTarget.hitTestObject (getChildByName (targetArray [i]))) {}
. Message_txt.text = e.currentTarget.name of the object (cela) "was dragged" + targetArray [i];
e.currentTarget.stopDrag ();
e.currentTarget.removeEventListener (MouseEvent.MOUSE_DOWN, opportunity);
}
}
}

Tags: Adobe Animate

Similar Questions

  • Extract the contents of the text box

    Hello

    I am trying to automate a process PDFing complex. A single indesign document should appear as several PDFs named, which fall into a number of folders that also have specific names. If I place the PDF names and folders in text boxes on the pasteboard of indesign pages they can be recovered by a script. Do I need to mark the text box, so the script knows where to look, and how this is done?

    Thanks much for any help.

    Hello

    Create a new layer and name it as "printpdf", create a block of text with this layer on each page and fill in the content, as shown in the picture, the first line for the name of the folder and the second row for filaname. The text block should be placed within the page, not the editing table.

    var doc = app.activeDocument;
    var pages = doc.pages;
    var _layer = doc.layers.item("printpdf");
    _layer.printable = false;
    for(var i =0;i
    

    Kind regards

    Cognet

  • the value of variables in the text box.

    I write a code that has a function of function there is a table of the different variables of table, values come from Server I'd like
    Enter this value of var in the text box.

    It's like in the code file is like this

    public void mainMenu (rcvParametersArray:Array): void {}

    var IndianMenu:int = rcvParametersArray [0];
    var chainesMenu:int = rcvParametersArray [1];
    }

    Assuming a component textArea on the stage, something like the following should work (composed an array to pass to the):

    var theMenus:Array = [1,2];
    mainMenu (theMenus);
    function mainMenu(rcvParametersArray:Array):void {}
    var IndianMenu:int = rcvParametersArray [0];
    var chainesMenu:int = rcvParametersArray [1];
    arrayDisplay.text = IndianMenu + ', ' + chainesMenu;
    }

    However, it seems that he might extend to several items, I was wondering if maybe you don't want to have an array of arrays so that the menu name is incorporated with its index or regardless of the other properties are associated with. Maybe not, but I thought that I would say something like the following in case it is useful

    var theMenus:Array = new Array ({name: 'Indian', index: 1}, {name: 'Channels', index: 42});
    mainMenu (theMenus);
    function mainMenu(rcvParametersArray:Array):void {}
    for (var i: int = 0; i< rcvparametersarray.length;="">
    arrayDisplay.text += rcvParametersArray [i] .name + "" + rcvParametersArray [i] .index + "\n";
    }
    }

    Finally, if the values in the table of your original paintings are numbers or integers (ints), you can convert them to strings before displaying using the toString() function, unless they are be concatenated with an existing string.

  • Table of contents - power of the text box

    Hello

    I recently started using Adobe InDesign and love it! I have a question around the table of contents. At the beginning of each chapter, we have a simple page with a box in it. (each chapter has about 10 pages). The intention is to have the content of the text become the title of the chapter box and have it displayed in the Table of content. The text box itself has several characters of new line in. When I generate the table of contents, InDesign creates several entries in the Table of contents (one per each new line in the text box). So my question is... Is there a way to specify that the content of the entire text box appears as an entry in the Table of contents. (I'd like to update the table of contents by hand to avoid any errors).

    I appreciate any help in this matter.

    Thank you!!

    So, you say that, break forced line and you want that all the rows in the table of contents? I think that I misunderstood.

    If this is the case you're going to the trouble of formatting of the table of contents, as the forced line break will carry you through to the table of contents (you can change the colours using styles or nested GREP and those will not set if you use a different style in the table of contents list itself).

  • CS2 erase content and the text box

    I use CS2 on Windows. I have a file of 30 pages with the linked text boxes on each page with anchored objects. I would remove the first 10 pages, but NOT the text of these areas of 10 text wrap on the remaining pages. Is there a way to delete the text boxes AND their content before deleting these pages, that I don't have to highlight all of the text on them, remove it, then delete the text boxes themselves?

    Thank you

    Lloyd

    Ah ha! You need a script! I use CS2 and I only found on the scripts - you can find them on the CD-ROM or get you it from here (scroll to CS2.) Put them in the folder scripts in your presets folder, open the palette scripts (on Windows) and here they are. There are two useful in your goal - we split the history in separate text boxes, one pops up a text box in the story. Just select your text box and double-click the script.

    (Of course, once you cut your text out of the herd area you can remove it).

  • Cursor (cursor) appears in the text box after inserting text or the position of change

    I managed to change the position of the cursor in a TextArea as qml and C++ to help through the Publisher associated with the drop-down list.

    I checked the change to receive cursor, change of position and position again.

    However, the cursor does not appear or is not visible in the TextArea component. When I tap on the screen the cursor is displayed again.

    The cursor disappears when I insert text at the cursor position.

    No idea why or how to control the visibility of the cursor in this situation.

    I know you probaably you want to see the source code is here

    textArea.editor.insertPlainText ("plain text");

    Hello

    The cursor/caret is not visible unless the text box is focused. Code like this work for you?

            TextArea {
                id: ta
            }
            Button {
                text: "Click Me";
                onClicked: {
                    ta.editor.insertPlainText("plainText");
                    ta.requestFocus();
                }
            }
    

    Thank you.

  • How can I make the text in all the boxes down following objects when the text box is changed from 1 to 2 lines?

    Hi people Muse.

    I'm faced with a problem of text box:

    At the bottom of my page, I have the title "ACTING ERMUTIGEN ZUM". Without any manual adjustment, I was happy to see that the text box pushes down the following objects as soon as the title Exchange of 1 to 2 lines. Point out clearly: I didn t add any point to stop or change any additional settings to achieve this, it just happened automatically and that's exactly what I want to happen.

    To my confusion, I can´t find a way to apply this behavior for the second title 'COURAGE OBSERVES UND LOSEN. It s on the same page. When I drag the breakpoint controller in the design-time view from the left to the breakpoint 900 pxor do it in the browser after export of the site, the title changes from 1 to 2 lines, as assumed, , but then the next Don t objects react and stay in the same place they stay when the title takes only 1 line.

    You will find the site on businesscatalyst:

    WILLKOMMEN

    I´d appreciates your support very well. I m sure it s not a big problem, but after an hour of re - try and control and do not receive a millimeter in advance, I thought, he could be one of these 'Don t worry - here comes the solution'- Muse hero there, read this. What you...? ;-)

    Thank you in advance.

    Moritz

    –––

    1st Title: everything works fine...

    Bildschirmfoto 2016-03-15 um 17.24.43.png

    Bildschirmfoto 2016-03-15 um 17.25.25.png

    –––

    2nd title: the 1200 px BP do everything ready...

    Bildschirmfoto 2016-03-15 um 17.26.13.png

    .. .but as I drag the marker of BP to the left just as I did with the title 1, the 2nd title doesn´t lower content:

    Bildschirmfoto 2016-03-15 um 17.26.30.png

    If you set the text block "ZUM ACTING... "sensitive width via the resizing control, rather than"Stretch to the width of the browser", which will provide the behavior you're looking for.

    We will study the design compared to the difference of the browser view. It seems that how items are grouped in resizing behavior is different in the case of elements with parameters width Resize mixed, in the mode of creation of the Muse and the browser.

  • Understand the text box

    I'm trying to understand and master the elements of text boxes in Muse.

    Why some text boxes seem to have a minimum size (sometimes) and cannot be resized to fit the text content?

    What does the line in dotted lines in the text box?  It seems to be linked to the entire text box, but I don't see how or why.

    It does not appear in certain text boxes?

    Why some text boxes have no effect on the BG Image.  for example when... Add text in an INFOCYCLER widget, text size box Exchange (even if there seems to be plenty of room for more text) and the bg image is contained in the size of the changes.

    There are many things that will come into force when we add the blocks of text that contains text, such as font, size, spacing between the characters, space after/before, space of text frame, text etc. frame border.

    The dotted line indicates a height for the text frame, if you drag the shorter than the text frame, the dotted line will appear. Muse inserts a style property called min-height in the code that tells the browser which frame should be less high and can develop in height, if the content he dictates.

    Text pixellisent if we use system so fonts on the browser, the text will be rendered as an image.

    Please go through details here:

    http://helpx.Adobe.com/Muse/using/typography.html

    Thank you

    Sanjit

  • cannot delete the text box entry - break cp8

    I have two text input boxes and a button smartshape on a slide.

    Text entry areas require username, stores the responses into variables. The button moves to the next slide. I don't want the button to pause the slide, but not text entry areas.

    When I uncheck the 'pause after"in the properties of the input synchronization for each of the text boxes, the break is always carried out for each. In fact, icon pause shows still on the layer of the timeline for each as well.

    The result is that my slide stop 3 times instead of once:)

    It's Captivate 8, sensitive project.

    It is for some a bug in CP8, in previous versions you can change the time of the break, but you can disable it. Must be a design fault, using the same properties of timing for each interactive object to CP8 (to make it "clear").

    For me, it makes sense that you can't disable pause in BER, since it must wait for an input from the user. It's the same for question slides, no way to disable the pause, you can move only. For BER you can move with the synchronization properties, which is not yet the case for Question slides where you (still) that slide on the Timeline can move the point of interruption.

    Why should you get this button? If it is designed as a next button, do you want so that it can move without entries in of the TEB? Then set its action to 'go to the next slide", not to continue?

    Lilybiri

  • Test whether the text box is empty - tip action

    Hello

    I have a form that the user is required to fill out. When the user tries to advance to the next slide, I would test to check that none of the text boxes are empty.

    Ideally something like;

    If ((Textbox1) == null) {}

    See the legend of failure

    } else {}

    continue

    }

    I know you can use advanced actions but I'm unable to set the null value. I even tried to create a new variable and leave empty and tests textbox against that, but apparently not worked either.

    I'm probably missing something simple as I am very new to Captivate.

    Is it possible to submit the code of the advances in stocks using AS?

    Any help would be greatly appreciated!

    Concerning

    Tim

    Hello!

    I had the same problem.

    The user must enter his name.

    I preset the variable of the text using the feature box "what would happen if you reach this slide." You can find it if you double-click the slide with your text box, and then find the area of "navigation". I have a German version of the A4 the names of functions differ...

    Declare the variable of your text box we'll say "ABC123".

    With a collateral action, you can check if the text inside the variable passed as ABC123 to something else:

    If

    variable_name is not equal to ABC123

    then

    ...

    on the other

    ...

    If the variable is always ABC123 I jump to another slide with an error message.

    An example, which you can find here:

    http://forums.adobe.com/thread/446449?

    Kind regards

    Markus

  • Using paint and how to change the text box.

    How can I select a text box that you want to modify in the paint - Windows 7 Home Premium?  Once I leave the text box I can't select again a second time to change the text or grab it to move... I must be missing something very simple?  Is there a manual program somewhere?  Yes, the zoom is 100% and I am the administrator.  Thanks for any help!

    The painting is a very simple program and does not support the re - select a text box to change the content.

    "mikecvista" wrote in the new message: * e-mail address is removed from the privacy... *

    How can I select a text box that you want to modify in the paint - Windows 7 Home Premium? Once I leave the text box I can't select again a second time to change the text or grab it to move... I must be missing something very simple?  Is there a manual program somewhere?  Yes, the zoom is 100% and I am the administrator.  Thanks for any help!

  • How to make a 'active' phone number in the text box?

    I'm testing in 10.1 and 10.2, using the following QML simulators.  What I'm trying to understand is that 'rules' the text box used to set the active text, including phone numbers.  All I'm trying to do is to put a phone number in the text box that my users the opportunity to click on it to the phone.  But I can't make it work, or more exactly, may not get the phone number to become active.  .

    As you can see that I tried a variety of number formats, some specific UK because I was afraid that he may use country specific recognition, but nothing I try works.

    On the other hand the address which I also put in the TextArea is 'hot' and started the map.

    FYI, the client is running in Canada on Q10s using 10.1.  The numbers are also completely fictitious, if they work, then that is a stroke of luck.

                    TextArea {
                        inputMode: TextAreaInputMode.Text
                        editable: false
                        content.flags: TextContentFlag.ActiveText
                        text: "#123 1234, #123-1234  ph: 780-784-1231. ph: (403)218-1248. ph: 403-242-1231. ph: (01637)123456. 81 Street NE, # 101 ,, Calgary. "
                    }
    

    I saw this:

    http://supportforums.BlackBerry.com/T5/native-development/textarea-showing-quot-phone-numbers-quot/m...

    I was expecting that I didn't set the attributes for the text using C box.

    And I don't have permissions phone - eslewhere in the application that I detect when the user is on the phone.

    Any ideas on how I could get a phone number in a TextArea to be active, would be appreciated.

    Well, for what it's worth here's what I get with your data :

  • Replace the text box with Image through breakpoints

    Hello

    I'm looking to replace the text boxes and icons with images and want to know if I can do this on several break points at the same time without having to go and manually change each breakpoint.

    My site is here: Movement of Boulder

    In the Services section of the wider breakpoint, you can see the images that I want, but if you minimize the browser window, you will see the images and the text that he was supposed to replace. Is it possible to replace all the text boxes with the images you want?

    Hello griffinb,

    If you delete a breakpoint text areas, they will be removed from all.

    After you have placed your image just right-click on it and select the option ' copy the style and position > to other breakpoints.

    Let me know if you have any problems getting there.

    Kind regards

    Ankush

  • Update of dynamic Action with the text box

    This goes along with: update records with the text box

    APEX: 4.0.2

    THEME: SAND

    SERVER: Oracle-Application-Server-10g/10.1.3.1.0 Oracle-HTTP-Server

    I created an example with more comments on the page:

    workspace: stevendooley34

    username: dev01

    password: dev01

    application: examples of Forum

    page: update example

    I've implemented just as I think it should be put in place, but records only updates by clicking on my Refresh"" button.

    Keep in mind that the example is found in the apex 4.2.5 but I will implement this in 4.0.2.

    Thank you

    Steven



    Hi Steven,

    I think the main thing that was missing was adding the elements used in the PL/SQL "Page to go".

    The reason this is necessary is so APEX know what values of point on the browser should be sent (as part of the AJAX call) to the browser.

    IF you had all the elements that must be returned to the screen, then you will use the 'Page field items to return.

    I've also corrected a few things, P6 instead of P6 and P6_SEARCH_TYPE instead of SEARCH_TYPE, but they were just small "bugs" in the example.

    I also added another real action to refresh the report after the update.

    Thank you

    -Jorge

    PS. I do not validate that your code works for multiple, but the first glance entries and a quick test, it seems to work fine.  I focused only on the DA.

  • try to change the text in a saved file, but it will not allow isolate me the text, place the cursor in the text box or simply go back to remove.

    try to change the text in a saved file, but it will not allow isolate me the text, place the cursor in the text box or simply go back to remove.

    Hello

    in what format save you your file? If it's a jpg file, then the text is compressed and unfortunately PS is telling things as they are. Even if you could change the text before you save, after having been saved in jpg format, the text is merged and is no longer editable.

    A good solution is to save the files as PSD files, photoshop files. In this case, all layers are saved uncompressed and so your text will appear in its own layer in photoshop. All you need to do in this case to change it is the result of a three-step procedure

    (1) select the right layer

    (2) take the text tool in the tools bar

    (3) mark and change your text

    So the crucial question is: in what format you save your file?

  • Cannot mount the frame to the text box

    Hello!

    I'm in InDesign CS6, on a 2011 iMac, and I often see this problem when I try to make a block of text to its content.

    Initially, it looks like this:

    by default 2015-08-20 at 22.14.53 PM.png

    Then I click on "mount the frame to the content" in the menu object, or by double-clicking on the handle at the bottom right of the text box.

    And then I get this thing:

    by default 2015-08-20 at 22.15.01 PM.png

    The police is Montserrat (free fonts, you can install it and see how it feels on your side).

    Editing is perfect on the left and right and on the bottom, but there's a margin of 10 pixels between the top of the text and the text box.

    It's really annoying when I try to align the text boxes with objects horizontally, because I then create outlines for text boxes.

    Given that this does not happen always, only with certain fonts, I am led to think that the height of the letters is not correctly calculated within the font file? I'll ask the proponent to the police for help as well, unless there is something like a value of high indentation of the hidden default page that I'm not aware of, or a solution of workaround that someone will report.

    Thank you

    In ID, select the block of text, right-click, and choose Options of text block, then the Baseline Options tab. You can set the first base line on the menu drop-down.

Maybe you are looking for

  • Black screen with windows to return to the scroll bar - Qosmio G30

    Hello I was wondering if someone can help me. I have a Qosmio G30-161 and I encounter a few problems with it right now, every time I close the top of the laptop and leave it for about half an hour that I reopen the form and I get a black screen with

  • HO to save a project

    In HP Photo Creations, I can find how to open a project, the display of registered projects and projects display recently consulted. However, I can't find any screen, any button, any field, to SAVE a project. I begin to suspect that the ability to sa

  • Maximum nominal current of the + 5V terminal in PXI-7813R

    Hello I'm a little confused on the maximum nominal current of the + 5V terminal of PXI-7813R in 'NI R Series multifunction RIO specifications '. I understand that there are four connectors for PXI-7813R and each connector has two terminals of 5V +. I

  • Why can't I create rules more?

    Rules used to work and now it doesn't work.  Running Windows XP, use MSN Premium as homepage and e-mail but have to go to Hotmail to the new functionto control spam and they crossed to MSN Mail as well.  Had 27 rules and it helped a little, but now I

  • BlackBerry smartphones not connected to the wireless network

    HelloI went to a BB tour and I'm trying to recover My World. Whenever I try to update my list, I get an error that says: 'we cannot retrieve your list. Please make sure that your device is on the wireless network.I can reinstall many of my applicatio