Add prices and display in dynamic text box

Hey,
I have a combobox and radio buttons with specific prices that
I want attached depending on the choice the user makes. I'm having
trouble getting the application to add the total of the selections
and display the total in a dynamic textbox.
I am trying to use global variables. I set them to a certain
value depending on what is selected. At the end I set add them up
in the variable total and set that equal to the text box named
totalPrice.
Right now the value of the global variables is not being
returned from their functions.
Any suggestions for how to do this correctly?
Thanks!

kglad,
Thanks for your quick response. I know that the return
doesn't work and that is why I decided to post it. Your suggestion
about updating "total" was something I hadn't thought of. Can you
give me anymore in terms of how to get the values out of the
function and update "total"?
Thanks!
Oh, if anyone needs a link to the fla...
fla file in zip
format

Similar Messages

  • Grab Frame Number, add 6 and display in dynamic textbox

    Hey,
    I have a gallery that needs numbered images. To do this I
    need to grab the current frame number of a parent movie, add 6 and
    display in a dynamic textbox. Sounds simple!
    The frame number I need to grab is in:
    _root.gallery
    The dynamic textbox has the var name 'displayNumber' and is
    in:
    _root.gallery.controlbox
    I need this to refresh every time the frame number changes in
    the _root.gallery clip. This is a fairly urgent project so swift
    help is obviously appreciated!
    Thank you in advance

    your code will work if all you state is valid and there's no
    other _root.gallery.onEnterFrame overwriting the one you
    posted.

  • Dynamic text box, HTML Text with Image

    Hello Everyone,
    I am using Flash version 8. I have used the text tool and
    created a dynamic text box and have attached the UIScrollBar
    component to it. This text box is configured to allow the use of
    html text to be inputted to it. I have code that reads a file which
    contains a list of text files that I then read and place them into
    the text box. The user can use the scroll bar to scroll through all
    the text.
    I have created an image that is a picture of the tab portion
    of a file folder. On the tab I have place some text. This was all
    done in Photoshop. This tab image is used to separate the different
    stories in the text box. The image is save as a jpeg file
    Everything you have just read works with out any problems.
    Now for the problem!
    This image is only 20 pixels tall and the text is not very
    readable. As we all know the HTML tags are very limited in Flash 8.
    Ideally I would like to put the text and image in to the text
    box as I would normally do. Then place text on top of the image and
    have it all scroll properly with in the text box.
    I have taken the tab image and converted it in to a graph
    symbol and then put the text on top of the image. This looks good;
    however I don’t know how (or if it is even possible) to place
    the graphic symbol in to the text box at the correct place within
    the text.
    Does anyone have ideas on what may work? Remember that the
    image I am working with is only 20 pixels tall which is why the
    text quality on the image is so poor.
    Thank you all for any help you may provide,
    Steve

    Yes Tim I am using the <img> tag and I know that I
    can’t place text over the image. I have set the height and
    width to be the exact size of the image. However When you go to the
    webpage it will open the movie to the maximum size based on the
    resolution of your display; however I do maintain the aspect ratio
    of the movie. For testing I did set a fix size to the size of the
    movie. Sometimes the fix size (1000x750) looks better and sometimes
    a larger size (example 1280x1024). I believe that the main problem
    is the fact the size of the image is 670 pixels wide by 25 pixels
    high and of the 25 pixels the text is only 18 pixels tall. In
    Photoshop this makes it about a 1.75 point font. As you can see the
    real problem is that I don’t have enough pixels to make up
    the text. This is why I am looking for an alterative way to create
    the text.
    I tried importing the image into flash as a graphic symbol
    and then using the text tool to create the text. The results looked
    real sharp, the text was nice and crisp (just what I wanted). The
    problem is that I could not find a way to place the graphic symbol
    into the dynamic text area like id did using the <img> tag.
    This symbol needs to scroll as you scroll the text in the text
    area.
    This is why I am asking for help. I am looking for some ideas
    that may work.
    Thank you,
    Steve

  • Printing a movie clip with dynamic text boxes

    I've got a certificate inside a movie clip, and i want the
    dynamic text box to dispay the user name, but for some reason it is
    coming up undefined, even though i have the dynamic text box set to
    finalname = _root.inputname, but it comes up as undefined on the
    screen. :( Can anyone tell me where i am going wrong?
    Is there a way to print just a specific movie clip on the
    screen? I can only print all the frames in the movie and without
    the dynamic text box... any help would be greatly
    appreciated.

    assign the mouseChildren property of your movieclip to false.

  • Displaying the result of a calculation in a dynamic text box

    Hi folks,
    I'm having a very minor issue here (operator error, I'm sure ). With the help of some folks here, I've created a series of calculations, and I've got that part down. Now, I just need it to show up in the movie.
    I've created the dynamic text box in Flash (CS3), but when I hit test, it won't show up.
    After all the calculations, I should have a figure that I call totalmoney. My dynamic text box is called total. The user doesn't need to hit anything for it to appear. It just appears as part of the movie.
    Here's my code:
    stop();
    var startDate:Date = new Date(2010,0,12);  // use your  startyear, startmonth, startdate in the new Date() parameters.
    var  currentDate:Date = new Date();  // assuming user's clock is correct and in your  timezone.  else use server date/time.
    var numberOfSeconds:Number =  (currentDate.getTime()-startDate.getTime())/1000;
    var interest:Number =  (numberOfSeconds*0.74356);
    var totalmoney:Number =  (interest+15,000,000);
    function displaytotal(evt:TextEvent):void {
         total.text = "totalmoney";
    Any thoughts?
    Thanks!
    Napo

    You didn't have to bury any of the calculations in the function--leaving it as you had it is better.  They could remain where they a=werew, and you'll probably find you want them outside it if you have other plans for using them.  If left inside, they only have scope inside.  In the programming world, it's good to think of functions as things that do one thing and one thing only (though it isn't often practiced that way)--it's called modular design.
    When you place an event as an argument for a function, it typically means that there is an event listener that initiates the call to the function.  If you work with buttons you'll see what I mean.  But if the plan is to create your own call to a function when you desire it as such, not have it driven by an event listener, then you don't need to pass any event to it, though you may pass some other type of variable to it if need be.
    For instance, what you have now will call the function without an argument because the function has the value built into its code....
    displaytotal();
    But you could also make the function a little more generic and set it up to recieve the value instead as an argument...
    function displaytotal(amt:Number):void {
         total.text = String(amt); // an earlier error of mine
    displaytotal(totalmoney);
    That would make your function a little more useful.  Now it could be used to display other Number variables as well.
    // my earlier error was that a textfield displays text, so you need to convert the Number value to s String.
    Hope I'm not confusing you.

  • Can I put Chinese and English characters in the same dynamic text box?

    I'm translating a game into several different languages, one of which is Chinese. I've noticed that in a dynamic text box where English characters are included also, they aren't displayed when the .swf is exported. The font is embedded in the document with all characters selected. It seems like whatever language-character is first displayed in the text box, the other language cannot be. For instance, if there are Chinese characters first, then English, the English will not display, and vice-versa. Any work around on this? I am using Flash CS5 and Actionscript 2.0. Thanks!

    Kglad - I'm not sure I follow your instructions for the fix. I assume you want me to set the _visible property to false via Actionscript ( textInvisible._visible = false; ). What is the purpose of this second text field - does it need any specific content in it to function? It doesn't seem to work to fix the problem but maybe I'm misunderstanding.

  • Displaying XML data in dynamic text box

    I'm attempting to display external XML data in a dynamic text box. When I test preview my code, the information that I want to display shows up in the Output window, so I know that its linked and works. My trouble is creating the code that will link to my (txtBox) and displaying when previewed. Please take a look at the files below if you have any time to offer suggestions.
    Thank you!
    Andy

    That's not an error, it's just a warning and flash is suggesting that if you use appendText vs. +=, that your results may display faster
    if you don't want to see the warning, you can take the suggestion and use:
    txtBox.appendText(bldg.S11[i].SF.text());
    txtBox.appendText(bldg.S11[i].Tenant.text());
    txtBox.appendText(bldg.S11[i].Status.text());
    ~chipleh

  • HT202879 how do i add a line to the top and bottom of a text box only

    i have a text box in my Pages document but i need to be able to add a line tot he top and bottom only to my text box. can i pleae get some help.

    Hello alegna23,
    To add a line just to the top and bottom of a text box, you will need to add the two lines as shapes.  Follow the steps below to add a line to your document:
    Add a shape
    Click Shape in the toolbar.Click the arrows to see more shape styles.
    Select a shape to add it to the page.
    In step 2, select a line and use the squares on the end of the line to help resize the line.  You can find the full article here:
    Pages Help for Mac - Add and edit shapes
    http://help.apple.com/pages/mac/5.0/#/tan9ad18c384
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Text arrays (variables) and Dynamic Text Box

    Hello everyone. I have a text file (let's call it sample.txt)
    that has numerous variables or arrays in this format:
    &info=This is some information
    &stuff=This is more stuff
    &whatever=Even more stuff again....
    Anyway, I need to load a particular variable via individual
    buttons from this same sample.txt file into a dynamic text box
    (let's call it dynText), and I am a bit lost as to how to do it.
    Please provide me a solution thank you.
    Glenn

    Thank you very much, it's greatly appreciated. It worked
    perfectly except that it does not like variables that begin with
    numbers like:
    &401_2b=401_2b
    The above doesn't work, but if I do this...
    &h401_2b=401_2b
    Everything is fine. Problem being, I am generating the
    variables via PHP and therefore cannot "change" them. Can you
    provide me with a way that ActionScript can "see" the variable that
    starts with a numeric value? Thanks for your time.
    Glenn

  • Is there a way to list all the file names (automatically) in a folder to dynamic text box?

    Hi,
    I would like to know whether FLASH AS3 has some option to get all the files names from a folder specified and show it in a dynamic text box? Whenever some new files added to this folder it should update the list accordingly.
    Thanks for any information in this regard.

    Not particularly experienced in this field myself, but I've found its just easier to implement an XML file which lists the contents of the folder. It just means that when you upload a new file you have to add it to the list in the xml file also. No real hardship once you figure out the mechanics of it

  • Dynamic text box problems

    I have created a dynamic text box and an input text box.
    I have produced code that replicates whatever is typed in the
    input box to display in the dynamic box along with a date and time
    stamp once a button is clicked.
    This all works fine, except for the sizes of the fonts. for
    both boxes, i selected font size 10 . The input box is fine,
    however the dynamic box text is huge.
    When i make the dynamic text font smaller, it fits in fine,
    but the input text that is inserted into the dynamic text box comes
    in too big. If i make the input text box font smaller it is
    unreadable when typing it in.
    any soultion to how to make my font consistent. I am assumin
    the problem is because both the text boxes are different sizes,
    however i don't know how to resolve the issue.
    Any help is much appreciated.
    Laura

    hi laura
    i think the problem it's in the targetPath "
    mainClip.newspaper_mc.newinstructions.text =
    lu.welcome[langIdx];".
    chech if you have mistype the instance names of your
    movieClip and rewrite it or in the Actions panel select the path "
    mainClip.newspaper_mc.newinstructions" and click the button
    "Insert Target Path" this will open a popup with a tree of your
    MC's on the stage, so you can browse and find the textfield. i hope
    i helped you if not let me know!

  • Dynamic text boxes, font size issues

    I have created a dynamic text box and an input text box.
    I have produced code that replicates whatever is typed in the
    input box to display in the dynamic box along with a date and time
    stamp once a button is clicked.
    This all works fine, except for the sizes of the fonts. for
    both boxes, i selected font size 10 . The input box is fine,
    however the dynamic box text is huge.
    When i make the dynamic text font smaller, it fits in fine,
    but the input text that is inserted into the dynamic text box comes
    in too big. If i make the input text box font smaller it is
    unreadable when typing it in.
    any soultion to how to make my font consistent. I am assumin
    the problem is because both the text boxes are different sizes,
    however i don't know how to resolve the issue.
    Any help is much appreciated.

    var today_date:Date = new Date();
    var date_str:String =
    (today_date.getDate()+"/"+(today_date.getMonth()+1)+"/"+today_date.getFullYear());
    var my_date:Date = new Date();
    var boat = ""
    btn_send.onPress = function() {
    var today_date:Date = new Date();
    var date_str:String =
    (today_date.getDate()+"/"+(today_date.getMonth()+1)+"/"+today_date.getFullYear());
    var my_date:Date = new Date();
    date_txt = date_str + " " + my_date.getHours() + ":" +
    my_date.getMinutes() + ":" + my_date.getSeconds() + " " + boat;
    the text appears in the dynamic box it just is a mish mash of
    font sizes!!!

  • Dynamic Text Boxes / Resizing text boxes

    I have a site with a dynamic text box that I have initialized
    (I'm not sure that that is the correct term) at the beginning with:
    myText = new LoadVars();
    myText.onLoad = function()
    { textBox_txt.htmlText = this.content;
    myText.load("text/bio.txt");
    stop();
    Then I have just used a text box throughout with the same
    instance name, although sometimes I have it on a new keyframe. I
    assumed I could just keep loading text into it on different frames
    with:
    stop();
    myText.load("text/performances.txt");
    This appears to be working, except that sometimes it seems to
    be confused and the text box on a certain frame has the wrong text
    in it. Do I have to initialize one for each frame in order for them
    to display the right code? What could be causing it to load another
    text file if it's frame action is telling it to load something
    else? It seems unnecessary to have to re-initialize it for a new
    text box instance in every new frame, but is that the way it has to
    be done?
    Also, I'm not clear on resizing text boxes. It seems like if
    I use the width and height numbers to resize this text box on
    different pages then it changes the size of the text inside, and
    the scroll bar (the UIScrollbar) is a little squishy looking
    sometimes. How does this work?
    Thanks for any help.

    You will find it much better to create a new LoadVars object
    for each of the frames, just call them myText1 myText2 etc.
    The name of the text box instance in this case is irrelevant
    but best practice would be to give them individual names.
    As for the stretching effect use setSize() for UI
    components.

  • Part 2: Load Image from URL into Dynamic Text Box - goodinson.snapshot

    I have a flash file where a user can add an image url into a Dynamic Text Box (image_in.text) and the image will now appear in the flash file.
    I am using goodinson.snapshot as featured in this article: Saving Flash graphics as image files at runtime | Adobe Developer Connection
    This application works fine (graphic is generated and downloaded) only if a user chooses an included graphic in the flash file (loaded externally) or if I declare a url inside the flash file for the load image variable (var image_url:String = "http://website.com/image.jpg";).
    However, if a user enters an image url into the Dynamic Text Box (image_in.text), which the flash does successfully load, the download image function no longer works!
    Is this a security bug in flash itself? Or am I missing a code tweak somewhere? 
    If an FLA that does this already exists somewhere, let me know.
    Thanks in advance for your help!

    Thanks for your response!
    The image urls are on the same domain as where the swf is.
    I don't understand how declaring the variable as the url is different from declaring it from the value of a dynamic text box... it's the same url, but only one method works, shouldn't they both work?
    var image_url:String = "http://website.com/image.jpg"; works..
    var image_url:String = image_in.text; does not work, even though the value for image_in.text is identical to the one in the example above.
    Since they are all on the same domain, this should work, right?
    Thanks again.

  • Showing RSS feed in Dynamic Text box (with hyperlink)

    Hi all -
    I am currently trying to pull RSS data into a project for my first time and am trying to get 3 (potentially 4) boxes filled with rss data that will be updated. So far, I am going with Actionscript 3. So far I have the code below, but it puts data in a listbox. What is the easiest way to put the data in three dynamic text boxes inside a movie clip, so I have one for the title, one for description and one for link (shown as 'read more' text but a link using the url from the rss value)?
    I am really banging my head against the wall on this one and want to get it sorted asap, so any help would be GREATLY appreciated! I have also attached an image to show what I am trying to do:
    I also want to know if it's possible to show rss values only if they exist. For example, my xml feed currently only has 3 items that change, and i will be assigning these to boxes, but is it possible to display a fourth if it exists, and if it doesn't it just shows the first?
    My code so far:
    var loader:URLLoader = new URLLoader();
    loader.addEventListener(Event.COMPLETE, onLoaded);
    var xml:XML;
    function onLoaded(e:Event):void
        xml = new XML(e.target.data);
        var il:XMLList = xml.channel.item.description};
        trace(il[1]);
             lb.addItem({data:il.description.text()
                                label:il.title.text()}):
    loader.load(new URLRequest("http://www.rssfeedhere.xml"));

    you would create a movieclip (exported for actionscript and class = rssItem) with 3 textfields and the display shown in your message and use something like:
    var loader:URLLoader = new URLLoader();
    loader.addEventListener(Event.COMPLETE, onLoaded);
    var xml:XML;
    function onLoaded(e:Event):void
        xml = new XML(e.target.data);
        var il:XMLList = xml.channel.item.description};
        for(var i:uint=0;i<il.length();i++){
            var mc:rssItem = new rssItem();
            addChild(mc);
            mc.x = 300*i%2;
            mc.y = 300*Math.floor(i/2);
            mc.titleTF.text = il[i].title.text();
            mc.descriptionTF.text = il[i].description.text();
            mc.readmoreTF.text = ?
    loader.load(new URLRequest(http://www.rssfeedhere.xml));

Maybe you are looking for

  • Interactive Report for Pending Order

    Hi Gurus, Iam new to ABAP.     I have Requirement to display the Interactive Report for Pending Order Status Report which displays pending of purchase orders for material wise and Vendor wise .Using ALV. Can Any one help ...me which table data i need

  • How to get rid of mail number on e-mail icon?

    How do I get rid of the red mail count number from e-mail icon?

  • Multiple line printing in SAPscript

    Hello Friends, I have problem in printing multiple lines on sap script. I have created a window. and i have creted a text eliment 'MULTIPLE it. Under this Text eliment i have code as below. /E    MULTIPLE AS  & internalTABLE-FIELD& I have fetched dat

  • Select options with function modules.

    Hello People, I found few threads on this topic already, I tried solving with the help of those clues but in vain. I want to create a function module which accepts a date range like in ACC_T_RA_DATE, and output a list of materials. The list of materi

  • Production order change (quantity) doubt.

    Hi pp experts,     I have a problem, while changing order quantity in the production order through Coois or co02, i am not getting the changed quantity. how to display that. for ex, The order qty is 10 Nos , through Coois i change this qty to 4, i wa