Problem with action script 3 make input text box and button....

Hi every one I am trying to make a family book using "Air for Android" with a simple search engin in the book
air for android only work with AS3,
the search function is to type a person's name and hit submit then go to a specific frame.
have a problem making below code to work in AS3 and hopefully one of you guys can lead me in the right direction to fix the issue.
Currently, I have an input text box and a button. When you type specific words into the input box and then hit the button it sends you to a specific frame.
(it work find in AS2 but not in AS3,)
Here is my current code that is placed on the main timeline, first frame:
stop();
onEnterFrame = function () {
    submit.onRelease = function() {
        switch (yourname.text) {
        case "name1" :
            gotoAndStop(2);
            break;
        case "name2" :
            gotoAndStop(3);
            break;
My button that checks if the phrase is correct is called "submit" and my input box has an instance of "yourname".
My phrases that will be accepted in the input box are "name1" and "name2" which bring me to two different frames.
Basically, I'm having a problem with making this to work with AS3.

you should use the default option in the switch statement
that way yourname contains something not in one of the case statements it will go to the default bit and execute teh code there
function onSubmit(e:MouseEvent):void
                              switch (yourname.text)
                                        case "name1":
                                                  gotoAndStop(2);
                                                  break;
                                        case "name2":
                                                  gotoAndStop(3);
                                                  break;
                                        default:
                                                  goToAndStop(you frame you want);
                                        break;

Similar Messages

  • Can we hide the real value of input text box and show other value in ADF?

    Hi All,
    I have a table in which i have one the column as "Quantity" and text box as "quantity" :-
    <af:column sortProperty="quantity" filterable="true"
    sortable="true" headerText="Quantity" id="c3"
    width="60"
    rendered="#{row.bindings.booleanFlag.inputValue != 'E'}"
    filterFeatures="caseInsensitive">
    <div align="center">
    *<af:inputText value="#{row.bindings.quantity.inputValue}"*
    label="#{bindings.queryProductResponseType.hints.quantity.label}"
    required="#{bindings.queryProductResponseType.hints.quantity.mandatory}"
    columns="#{bindings.queryProductResponseType.hints.quantity.displayWidth}"
    maximumLength="#{bindings.queryProductResponseType.hints.quantity.precision}"
    shortDesc="#{bindings.queryProductResponseType.hints.quantity.tooltip}"
    id="it5" partialTriggers="it19"
    readOnly="#{row.activeYN == 'N'}">
    <f:validator binding="#{row.bindings.quantity.validator}"/>
    <af:validateRegExp pattern="^[1-9]+[0-9]*$"
    messageDetailNoMatch="Quantity must be in whole number format."/>
    </af:inputText>
    </div>
    </af:column>
    Now when the user will enter say 400 in input text box "quantity" , the value should be divided in the same row to other column text box say "conversion" which holds the value as 40 , so if the division doesn't give any remainder(means remainder =0 ) means real value(400/40) = 10 then it should set the value of input text box "quantity" as 10 but the user should be able to see 400 which he/she entered before, as we want to send the 10 as request but we have to show 400 to the user and if remainder goes greater than 1 than it should show an error.
    I have to implement this in value change listener of the text box as i need to calculate the real value each time for a row.
    How should i implement this ?
    Thanks .
    Thanks.

    Thanks timo,
    But can you give me full details how should i implement this as i am newbie to ADF. I have found the data control in Data controls tab in left hand side and right click on it -> edit definition -> but it does not give me the option to add attribute , it just give me the option to edit the existing attribute. Can you explain me how to add the transient attribute and how to implement it ? Any sample code snippet ?
    Thanks.
    Edited by: user13644804 on May 15, 2011 10:09 AM
    Edited by: user13644804 on May 15, 2011 10:09 AM

  • Problem with action script calculations

    I have a simple action script 3 code that will not calculate the correct answer on my PC.  I'm running flash cs5 on Window 7 OS.  I can move the file to another machine running  flash cs4 and it works, but when I run it on my laptop, I get funky answers.  see cold below.  I have uninstalled and reinstalled cs5 , run the cleanscript for cs5 and cs4 to make sure everything was removed.  I have uninstalled and reinstalled flash player.  but nothing seems to work.  Any help will be appreciated.  It acts like Action Script 3 is corrupt or something else that related to Action Script 3.  Everything else seems to work.  I also have a preloader running with the same issue.  It is should be showing the percentage completed but it go 2 5 50 4 32 or something funky like that.  Please help.
    the code I'm using.
    function calculateTotal(evtObject:MouseEvent):void {
       var price:Number;
       var totalCost:Number;
       var numberOfJerseys:Number;
       if (jerseyType.text == "2") {
        price = 12;
          if (jerseyType.text == "1") {
        price = 10;
       if (playerNames.text == "Y" || playerNames.text == "y") {
        price += 1.50;
       numberOfJerseys = int(numberOfPlayers.text) +int(numberOfCoaches.text);
       totalCost = numberOfJerseys*price;
       total.text = String(totalCost);
    calc_btn.addEventListener(MouseEvent.CLICK, calculateTotal);     
    the preloader percentage is
    var percent:int = amtLoaded*100
    percent_txt.text = String(percent);

    HELLO,
                  just check       navigateToURL()

  • Problem with action script from Schewe and Frasier book.

    I am working on a Photoshop CS3 action script to
    open raw files, do a couple of modifications
    in Camera Raw, exit camera raw and save
    the file as a jpeg.
    I think this should work, because I am working
    on an example out of "Camera raw with Adobe
    Photoshop CS3" by Schewe and Frasier which
    shows the step recorded.
    See page 344 of Schewe and Frasier.
    In figure 9-11 you see, after the open
    statement, 10 lines of details like
    "As camera raw"
    "Model:Canon 350d" etc.
    I get the file path and name line, but
    none of the other details reflecting
    actions in Camera Raw.
    The problem is that in setting up the action, none
    of the steps done in camera raw after I do the
    open get recorded.
    And it works in my old CS version !
    Out of frustration I repeated the action
    script creation in my old CS version and
    it worked fine.
    Any idea where I am screwing up ?

    Crappy format justification:
    I sometimes have a day of family
    type pictures that are in raw format
    that I want to put up on the internet
    quickly. I would like to be able to
    apply the "Auto" feature, as in general
    it seems to be pretty good for something
    quick.
    OK, it sorta works in CS, go here
    http://www.angelplace.net/photos/sample.jpg
    It sets up all of the details and gets the
    "As camera raw" but opens the .dng file
    rather than the Camera raw window.
    The point is, these important settings
    seem to be saved, which does not happen
    in CS3.

  • Problem with action script to button

    Hello all.
    I'm having a problem with my adobe flash CS3 action script. My button cant link to the other URL. I tried to put an action script but i fail. anyone can help me? here the attachment for my flash document.

    HELLO,
                  just check       navigateToURL()

  • Problem With Action Script

    function loadProgress(my_content:ProgressEvent):void {
              var percent:Number = Math.floor( (my_content.bytesLoaded * 100) / my_content.bytesTotal );
              percent_Txt.text = percent + "%";
              preloader.gotoAndStop(percent);
    function loadComplete(e:Event):void {currentFrame;}
    loaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
    loaderInfo.addEventListener(Event.COMPLETE, loadComplete);
    is not working
    Mean
    the Text is to 1 - 100 % increase.
    But not working that .
    Only others are animating
    Please some one help me

    function loadProgress(my_content:ProgressEvent):void {
              var percent:Number = Math.floor( (my_content.bytesLoaded * 100) /
    my_content.bytesTotal );
              percent_Txt.text = percent + "%";
            preloader.gotoAndStop(percent);  // preloader should have frames
    1,...,100.*
    function loadComplete(e:Event):void {
    currentFrame+1;
    // the above will do nothing.  what are you trying to do?
    This action script is not working in my background. Any settings to change.?

  • How can I make a text box with 2 columns?

    I can't figure out how to make a text box with two columns. I made one in pages and pasted it into iWeb but it seems to have turned it into an image when I published to a folder. I want to keep it text so the search engines will index it.
    Any suggestions would be greatly appreciated.
    Thanks, David

    You will have to create two text boxes, configure them as columns and then paste into the first and cut where you want the columns to end and paste the remainder into the second column as on this page . I've tried saving a two column Word document as a web page and it just converts it to one column.
    OT

  • I am pulling my hair out! I am using adobe indesign and just want to make a text box 'autofit text' as I change fonts a lot and want the font to automatically re-size as I change it. help help help please - I have latest version of indesign - thanks

    I am pulling my hair out! I am using adobe indesign and just want to make a text box 'autofit text' as I change fonts a lot and want the font to automatically re-size as I change it.
    Is it not possible to create a text box, fill it with dynamic (data driven) text, but make the font size either scale up or down automatically, so that the entire text box is filled? This is a feature in PrintShop Mail Pro called COPY FIT. but no such feature in Indesign??
    help help help please - I have latest version of indesign - thanks, DJ

    lol... it seems to work, but I have another huge problem!
    Apparently .CSV files cannot contain page breaks in the data! The data I am trying to merge is a 'letter', with paragraphs, line breaks, etc.,
    But, after data merging, it ignores page breaks and only merges the first paragraph of each letter. (sigh)
    Solution? Hopefully, an EASY solution. lol as we have thousands of records.
    Is there a third party indesign plugin that will allow .xml, or .xls data merge import??
    Thx,
    DJ

  • JDeveloper problem with actions

    Hello
    I'm working on my first struts application and I have any problem with actions(I think).
    When I run the application, I don't see any data from DB on my page but when I click any of these 4 buttons, then the data load from DB.....Can anybody help me....I want to see my data when the page loads for the first time, not after the button click. Thanks a lot.
    (The buttons shows the rows of the table....first,previous,next,last)
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <html:form action="/zuctzaz.do" >
    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
    <input type="hidden" name="<c:out value='${bindings.statetokenid}'/>" value="<c:out value='${bindings.statetoken}'/>" >
    <tr>
    <td>
    <table>
    <tr>
    <td>
    <table>
    <tr>
    <td><input type="submit" name="event_First" value="First" STYLE="width:35px" <c:out value="${bindings.First.enabledString}" /> ></td>
    <td><input type="submit" name="event_Previous" value="Prev" STYLE="width:35px" <c:out value="${bindings.Previous.enabledString}" /> ></td>
    <td><input type="submit" name="event_Next" value="Next" STYLE="width:35px" <c:out value="${bindings.Next.enabledString}" /> ></td>
    <td><input type="submit" name="event_Last" value="Last" STYLE="width:35px" <c:out value="${bindings.Last.enabledString}" /> ></td>
    </tr>
    </table>
    </td>
    <td>
    <table>
    <tr>
    <td colspan="3"><strong>Z�&#269;tovac� z�znam</strong></td>
    </tr>
    <tr>
    <td>Date</td>
    <td><input type="text" name="textfield1" value="<c:out value="${bindings['datZuct']}"/>"></td>
    <td><c:out value="${bindings['cisPdo']}"/> AND <c:out value="${bindings['zucZazn']}"/></td>
    </tr>
    <tr>
    <td>Place</td>
    <td colspan="2">Brusel</td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </html:form>

    Hy Again!
    I forgot to say one more thing that could be relevant:
    If i add any action from the struts-config.xml in the provider for the <defaultAction> of the portlet it works correctly.
    So the actions work correctly, the problem is that when sending back to the oracle portal the request with the new action, there is no response.
    Pls help!
    Thanx, and best regards!
    Ado

  • Is it possible to make a text box cycle/rotate through text, like a slide show does?

    Is it possible to make a text box cycle through 3 or 4 separate pieces/groups of text, like a slide show does with photos? So that when I open my site a text area says "Statement 1", then 10 seconds later it changes to "Statement 2", then 10 seconds later it chagnes to "Statement 3", etc.
    Its that possible with a text box? My desire is to have 3 or 4 testimonials that change every 10 seconds.
    You can see that right now it's a single testimonial:
    www.kmlstudio.com
    All help is appreciated
    Thanks!
    Kevin

    Right.  Some plugins have zip file downloads while others are just copy & paste.
    In DW, go to File > New > Blank page > JavaScript.
    Copy & paste the Cycle plugin code into your new JS page. 
    SaveAs   cycle.2.9.81.js  in whichever site folder you normally keep scripts.
    Link your HTML page to your new cycle script:
    Insert > Script > Script (browse to folder containing your cycle script). Hit OK.
    Don't forget to add a link to the jQuery core library, too.  Plugins don't work without it.
    Nancy O.

  • Problem with a script to remove graphics

    Hello,
    I have tried to build a javascript to remove all graphics whose extension is not ".EPS" (with "EPS" really in upper cases, as it is for Mathtype equations in Word import).
    But It doesn't work and I can't understand why.
    Here is the script:
    //The script intend to remove all graphics whose extension is not ".EPS"
    var myDoc = app.activeDocument;
    var myGraphics = myDoc.allGraphics
    //Remove graphic if graphic extension is different from ".EPS"
    for (var p = 0; p < myGraphics.length; p++) {
        var myImage = myGraphics[p]
        if (CheckExtEps(myImage) != 0){
        myImage.remove ()
    //Compare graphic extension with ".EPS" and return myExtValue = 0 if it matches exactly
    function CheckExtEps(myImage) {
        var  myString = myImage.name
        myExt = myString.substr(myString.lastIndexOf( "." ))
        myExtValue = myExt.localeCompare(".EPS")
        return myExtValue
    When I run this script, ALL the graphics are removed, ".EPS" included.
    I do have ".EPS" graphics in my document and I expected them not to be removed.
    So there is something wrong somewhere, but I don't know what to change.
    Any ideas?
    By the way, I have a more generic question as a beginner:
    I am working with ExtendScript Toolkit. How can I do to check my script step by step?
    For exemple, how can I display my variables values as "myString", "myExt", "myExtValue" at each step?
    Actually, this script is a step for a bigger script I intend to build to deal with Mathtype equations in Word import.
    After not-EPS graphics beeing removed, I wish to relink all remaining equation prewiews to eps in a selected folder, by consecutive order.
    But this is a big piece of scripting to swallow for me, so I'm working slowly, step by step.
    TIA
    Best regards
    Nicolas

    Hello Ariel
    Thank you very much for your help.
    1. I added semicolons at the end of lines, but the script result is the same.
    2. Running line by line, I could see in the Console where is the problem:
    variable "myString" is always undefined.
    Well, I have to get more inside my script...
    Thank's again
    Best regards
    Nicolas
    Nicolas BALBO  
    [email protected]
    22, rue d'Hauteville  75010 PARIS
    Tel : 33 (0)1 42 57 14 31
    Le 18 avr. 2012 à 17:36, Arïel a écrit :
    Re: Problem with a script to remove graphics
    created by Arïel in InDesign Scripting - View the full discussion
    Well, I can't see any semicolons in your script. Maybe that's just the
    email interface, but there should be semicolons at the ends of lines.
    In the ESTK, you can step through a script a line at a time. Just click
    on the downwards pointing arrow instead of the "play" arrow. Each time
    you click, the script will advance one line. In the Console window
    (Windw>Console) you can then type the name of the variable you wish to
    examine.
    Ariel
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4344039#4344039
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4344039#4344039. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in InDesign Scripting by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Input Text Box

    Hi Experts!
    I have SP3 with its Fix Pack 3.1 installed
    I am not able to use Input Text box component
    when i hit preview i cant see the input text box. it gets hidden for no reason
    i am not using Dynamic visibility
    i have no other component in my dashboard except Input Text component. i have just started
    is anyone else experience the same issue? can anyone help please?

    Hi,
    Create a new dashboard and test as follows:
    1. Give some background color on the input box and then preview to check.
    2. Check whether you have marked for HIDE in the Object Browser for that input box.
    With best wishes
    BaaRaa.

  • Hidden password in input text box

    How do I hide the letters in a password input text box. I
    have an input text box for the viewer to type in a password and
    would like the password to not show when typed in, like is the case
    with html text boxes, where you just see a bullet for each letter
    in the password. How would I do this? Is there a font I could use?
    Thanks for any help with this.

    Select the Input text object on the stage. In the Properies
    window, select the pulldown at the bottom center, it probably says,
    "Single line". Select "Password". You can then get the actual text
    that the user types in by asking for the instance name's text value
    or the variable's value for that Input text field. Be sure to embed
    the font that you want to use.

  • How can I make a text box in Aperture transparent??

    Hello,
    After a great trip to Thailand I want to make a book of all my pictures using Aperture 3. At some places in the book I use a title to indicate what will be shown on the image. This title is made by the text box and it is put on the image itself. Now what I would like is to make is a transparent bar of the text box, so that I still can see the details of the image through this bar and also read the text about the image easily.
    I have no problems making this text box and putting it in the right place, the thing that I don't understand, after two nights of trying, is how to make this text box transparent.
    Any help is appreciated!
    Thanks in advance!

    Perhaps I need to reformulate what I exactly want to do...!
    I would like to use transparent text boxes but not as transparent as the image itself. I want to show the text box as a real bar but slightly different than the original image colour. So something between a normal image and a white bar so that it will be a bit transparent but also shown as a real bar..
    I think the text boxes of each theme are identical, so yes you are right about the transparent text boxes of art collection but they are the same as photo essay.
    Do you understand what I mean?

  • How to convert the Adobe 10 PDF to Adobe LiveCycle ES2 so that I can make the text boxes expandable?

    When I convert the Adobe 10 PDF to Adobe LiveCycle ES2 it is a static document, thus not allowing me to make the text boxes expandable.  How do I take a current Adobe 10 PDF with Text and convert it to Adobe LiveCycle ES2 so that I can make the text boxes expandable?

    Hi Alan,
    TextField objects can expand dynamically.  There are a few things that you need to do:
    1. The TextField object should be contained in a subform that is set to Content: Flowed.  This isn't technically necessary, but if you have anything below the expanding text box and the subform is set to Positioned, the text will expand and overlay what's below.
    2. On the Field tab of the text field's Object property tab, check the Allow Multiple Lines checkbox
    3. On the Layout tab, check the Expand To Fit checkbox under Y:/Height
    4. Set the PDF Render Format under Form Properties/Defaults to Dynamic XML Form.  If you're previewing in Designer, don't forget to set the preview to Dynamic too.
    Regards,
    Rave

Maybe you are looking for

  • Create an interactive digital brochure

    Which of the Adobe Suite applications is best suited to create an interactive digital brochure? I am new to Creative Coud and fairly new to most of the Adobe Apps but wanting to learn. Indesign or Illustrator plus which others? I want to be able to v

  • TS3249 iphoto 9.4.2 wont edit photos-scattered immages of previous pics apear?

    since i found a pic on internet and imported it on iphoto, my iphoto started to have problrms: 1, i cant open it 2. i cant edit pics(scattered and grey area appears+of previously looked at items-docs, pics, ) i tried all repairs suggested by help men

  • Name attribute not giving the desired result in form tag

    Hi, I am using struts and the name attribute in form tag is not giving me the desired reuslt. The code is <html:form name="loginActionForm" type="source.form.LoginActionForm" action="/login.do" method="post"> </html:form> when I am trying to use the

  • Sending edited web page via email

    I received via email a web page which someone asked me to change. I'm a painter not a web designer and I know just enough to be dangerous. I managed to get the page into Dreamweaver and edit it but now I don't know how to get it back to the person, p

  • XI Installation on Windows AMD64 -- JDK issue

    Hello, We are installing XI 7.0 on a server with AMD64 processor architecture. OS is Windows 2003 server. For XI, JDK 1.4.2 is required. However, it appears that JDK for AMD64 is only available from version 1.5.0. Does anyone have a solution to this?