Help with shrinking objects

Hello folks, I'm a message board virgin, so be kind.
Can anyone help me with this:
Once i have shrunk a text object in motion I can't get it to stay at it's small size, once the behaviour has finished it flicks back to it's original size. What i am trying to achieve is to shrink some text and then hold it for 30 secs in it's new size.
Thanks for listening
Joe

add a Stop behavior to the Scale parameter (The Scale parameter in the Properties tab in the Inspector) at the point where you want the shrinking to stop.
In the Timeline, it would look like this. (The periods would be empty space)
LAYER>>>>>>>>
TEXT>>>>>>>>>
..................>>STOP>>>>
SHRINK>>>>>>>>
Keep in mind that by using the behaviors to do this, the shrink will stop abruptly. You may just want to keyframe this movement since you'll have more control over how the object resolves (ie: ease into it's final position)

Similar Messages

  • Help with layered objects

    I am new to Pages and struggling to layer objects. I am working with opacity, but unable to move one object on top of another.
    thanks for any help,
    Kim

    Welcome to Apple Discussions Kim
    When you insert any object in a Pages document & have it "fixed on page," by default wrap is turned on with a 12 point gutter. This results in objects "pushing" other objects out of the way. With your object(s) selected, go to the wrap inspector & uncheck "object causes wrap." Unfortunately, there is no way to change this default setting, it will have to be done manually for any object inserted. You may wish to leave feedback for the Pages team asking that the ability to have wrap apply to all objects or not be added as a preference in future versions of Pages.

  • Help with shared objects...again...

    Okay, I've been looking at a really good tutorial for shared objects in AS2, and I think I've gotten the basic concept down of how they work... now the problem lies in just integrating it into what I already have, which is making my brain hurt.  Basically its for a quiz game, which will have a dynamic scoreboard.  I want the scores in the shared object to update when the submit button is pressed, and then have the new values loaded into text boxes.  Displaying the values is going to be the easy part, its just updating them is what my brain doesnt want to wrap itself around.  Here is the array I have at the moment (yes, horribly inefficient, but the last time I actually did any coding before this was over 2 years ago when I was still a computer science major... with all of 4 actual Comp Sci courses under my belt -_-)
    scores= new Array();
    names= new Array();
    insert=function() {
         var newscore;
         var newname;
         newscore=0
         newscore=_global.correct;
         if (newscore > scores[0]) {
             scores[14]=scores[13];
             scores[13]=scores[12];
             scores[12]=scores[11];
             scores[11]=scores[10];
             scores[10]=scores[9];
             scores[9]=scores[8];
             scores[8]=scores[7];
             scores[7]=scores[6];
             scores[6]=scores[5];
             scores[5]=scores[4];
             scores[4]=scores[3];
             scores[3]=scores[2];
             scores[2]=scores[1];
             scores[1]=scores[0];
             scores[0]=newscore;
             names[14]=names[13];
             names[13]=names[12];
             names[12]=names[11];
             names[11]=names[10];
             names[10]=names[9];
             names[9]=names[8];
             names[8]=names[7];
             names[7]=names[6];
             names[6]=names[5];
             names[5]=names[4];
             names[4]=names[3];
             names[3]=names[2];
             names[2]=names[1];
             names[1]=names[0];
             names[0]=newname;
             else if (newscore > scores[1]) {
             scores[14]=scores[13];
             scores[13]=scores[12];
             scores[12]=scores[11];
             scores[11]=scores[10];
             scores[10]=scores[9];
             scores[9]=scores[8];
             scores[8]=scores[7];
             scores[7]=scores[6];
             scores[6]=scores[5];
             scores[5]=scores[4];
             scores[4]=scores[3];
             scores[3]=scores[2];
             scores[2]=scores[1];
             scores[1]=newscore
             names[14]=names[13];
             names[13]=names[12];
             names[12]=names[11];
             names[11]=names[10];
             names[10]=names[9];
             names[9]=names[8];
             names[8]=names[7];
             names[7]=names[6];
             names[6]=names[5];
             names[5]=names[4];
             names[4]=names[3];
             names[3]=names[2];
             names[2]=names[1];
             names[1]=newname;
    Continues all the way down to scores[14]
    Now, if I wanted this to pull data from the shared object, would I just put user_so.score[3]=user_so.score[2] for instance?  Or would I run the array and just update the new valued individually once the array insertion function completes?  THe problem with the latter is that it's not directly accessing the shared object so I'd need to find a way to pull them out into other variables first, and this is about the point where my brain just decides to short out on me and stop working alltogether...yay...
    So yea, any help on this would be much appreciated.
    also, would the array have to be declared within the shared object as well?  If so, how would I do that exactly?  Probably something so simple but the fact that it's shared objects is throwing me off...

    Ok, the shared object WAS working just fine until I had the banner start referencing it.  Then the quiz began giving me syntax errors like crazy, and even when the banner isnt runnit it gives me issues.
    user_so.data.soArray[0]=scores[0];
    user_so.data.soArray[1]=scores[1];
    user_so.data.soArray[2]=scores[2];
    user_so.data.soArray[3]=scores[3];
    user_so.data.soArray[4]=scores[4];
    user_so.data.soArray[5]=scores[5];
    user_so.data.soArray[6]=scores[6];
    user_so.data.soArray[7]=scores[7];
    user_so.data.soArray[8]=scores[8];
    user_so.data.soArray[9]=scores[9];
    user_so.data.soArray[10]=scores[10];
    user_so.data.soArray[11]=scores[11];
    user_so.data.soArray[12]=scores12];
    user_so.data.soArray[13]=scores[13];
    user_so.data.soArray[14]=scores[14];
        _global.player= "Input Name";
        player.text=_global.player;
        _global.correct= 0;
        phrase=" ";
    gotoAndStop (1);
    these are the lines it's telling me I need an on handler for, which I do have, at the very start of the entire code.
    Ive counted the brackets and those seem to line up, but I'll double check again.  The code is on the submit button itself (yes I know it's poor coding form, but this is how I learned it and what I'm used to, and since I'm on a bit of a time schedule now isn't the time to completely re-learn the proper conventions and etiquite of coding in flash).
    on (release) {
        if (user_so.data.tname!=undefined){
            user_so.data.tname = _global.player;
            user_so.data.newscore = _global.correct;
            insert=function() {
        var newscore;
        var newname;
        newscore=0
        newscore=_global.correct;
        if (newscore > scores[0]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=scores[7];
            scores[7]=scores[6];
            scores[6]=scores[5];
            scores[5]=scores[4];
            scores[4]=scores[3];
            scores[3]=scores[2];
            scores[2]=scores[1];
            scores[1]=scores[0];
            scores[0]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=names[7];
            names[7]=names[6];
            names[6]=names[5];
            names[5]=names[4];
            names[4]=names[3];
            names[3]=names[2];
            names[2]=names[1];
            names[1]=names[0];
            names[0]=newname;
            else if (newscore > scores[1]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=scores[7];
            scores[7]=scores[6];
            scores[6]=scores[5];
            scores[5]=scores[4];
            scores[4]=scores[3];
            scores[3]=scores[2];
            scores[2]=scores[1];
            scores[1]=newscore
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=names[7];
            names[7]=names[6];
            names[6]=names[5];
            names[5]=names[4];
            names[4]=names[3];
            names[3]=names[2];
            names[2]=names[1];
            names[1]=newname;
        else if (newscore > scores[2]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=scores[7];
            scores[7]=scores[6];
            scores[6]=scores[5];
            scores[5]=scores[4];
            scores[4]=scores[3];
            scores[3]=scores[2];
            scores[2]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=names[7];
            names[7]=names[6];
            names[6]=names[5];
            names[5]=names[4];
            names[4]=names[3];
            names[3]=names[2];
            names[2]=newname;
            else if (newscore > scores[3]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=scores[7];
            scores[7]=scores[6];
            scores[6]=scores[5];
            scores[5]=scores[4];
            scores[4]=scores[3];
            scores[3]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=names[7];
            names[7]=names[6];
            names[6]=names[5];
            names[5]=names[4];
            names[4]=names[3];
            names[3]=newname;
            else if (newscore > scores[4]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=scores[7];
            scores[7]=scores[6];
            scores[6]=scores[5];
            scores[5]=scores[4];
            scores[4]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=names[7];
            names[7]=names[6];
            names[6]=names[5];
            names[5]=names[4];
            names[4]=newname;
            else if (newscore > scores[5]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=scores[7];
            scores[7]=scores[6];
            scores[6]=scores[5];
            scores[5]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=names[7];
            names[7]=names[6];
            names[6]=names[5];
            names[5]=newname;
            else if (newscore > scores[6]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=scores[7];
            scores[7]=scores[6];
            scores[6]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=names[7];
            names[7]=names[6];
            names[6]=newname;
                else if (newscore > scores[7]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=scores[7];
            scores[7]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=names[7];
            names[7]=newname;
                    else if (newscore > scores[8]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=newname;
                        else if (newscore > scores[9]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=newname;
                            else if (newscore > scores[10]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=newname;
                                else if (newscore > scores[11]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=newname;
                                    else if (newscore > scores[12]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=newname;
                                    else if (newscore > scores[13]) {
            scores[14]=scores[13];
            scores[13]=newscore;
            names[14]=names[13];
            names[13]=newname;
                                        else if (newscore > scores[14]) {
            scores[14]=newscore;
            names[14]=newname;
        else {
            user_so.data.tname = _global.player;
            user_so.data.newscore = _global.correct;
            scores[0]=user_so.data.newscore;
            names[0]=user_so.data.tname;
    user_so.data.soArray[0]=scores[0];
    user_so.data.soArray[1]=scores[1];
    user_so.data.soArray[2]=scores[2];
    user_so.data.soArray[3]=scores[3];
    user_so.data.soArray[4]=scores[4];
    user_so.data.soArray[5]=scores[5];
    user_so.data.soArray[6]=scores[6];
    user_so.data.soArray[7]=scores[7];
    user_so.data.soArray[8]=scores[8];
    user_so.data.soArray[9]=scores[9];
    user_so.data.soArray[10]=scores[10];
    user_so.data.soArray[11]=scores[11];
    user_so.data.soArray[12]=scores12];
    user_so.data.soArray[13]=scores[13];
    user_so.data.soArray[14]=scores[14];
        _global.player= "Input Name";
        player.text=_global.player;
        _global.correct= 0;
        phrase=" ";
    gotoAndStop (1);

  • Help with Dynamic Objects

    Hi All,
    New to Flex and wanted to get some help from the public.
    Basically, here's what I want to do.
    I have a tab navigator with multiple tabs. Each tab has a
    datagrid on it. When you click the tab, the grid should update to
    new data based on the tab clicked. That's no problem. The problem
    I'm running into is that because the data is taking a while to
    retreive from the server, users are getting the previous's tabs
    datagrid until the information is updated. I wanted to do two
    things:
    1) Change the cursor to a "thinking" or "processing" icon
    where clicks can't be done until the full data has been retreived
    and updated. This is a nice to have; i haven't the slightlest clue
    on how to accomplish this.
    2) In lieu/addition to #1, i wanted the datagrid to be
    dynamic. Meaning, if you go to the tab, it'll add dynamically the
    datagrid to the tab and then show the data.
    Here's my code, but it doesn't work very well. Any help i can
    get from you guys would be great:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="horizontal" initialize="createDataGrid()">
    <mx:Script>
    <![CDATA[
    import mx.controls.DataGrid;
    import mx.managers.PopUpManager;
    import mx.collections.ArrayCollection;
    import mx.controls.Alert;
    import mx.rpc.events.ResultEvent;
    import mx.containers.HBox;
    import mx.containers.TabNavigator;
    [Bindable]
    private var infoDataGrid:ArrayCollection;
    [Bindable]
    private var currentID:String;
    [Bindable]
    private var dynDataGrid:DataGrid;
    private function createDataGrid():void {
    dynDataGrid = new DataGrid;
    dynDataGrid.dataProvider=infoDataGrid;
    dynDataGrid.width=80;
    private function getDataFromServer(event:ResultEvent):void {
    var numOfRecords:int = event.result.result_set.num_rows;
    if (numOfRecords > 0 ) {
    infoDataGrid = event.result.result_set.results.result as
    ArrayCollection;
    } else {
    // no information retrieved worry about this later
    private function mainBuilder( event:Event ):void {
    var tabNavigator:TabNavigator = TabNavigator( event.target
    var pattern:RegExp = /\D/gi;
    if (tabNavigator.selectedChild.id != "NewTab") {
    // Remove all non-digits from LID
    var str:String = tabNavigator.selectedChild.id;
    currentID=(str.replace(pattern, ""));
    phpHTTPService.send();
    // loop through all children and remove any datagrids while
    adding to the current one
    for (y=0; y<tabNavigator.numChildren; y++) {
    var tmpNavID:String = tabNavigator.childDescriptors[y].id
    if ((tmpNavID == tabNavigator.selectedChild.id) &&
    (tmpNavID != "")) {
    // this does not work as intended...
    tabNavigator.selectedChild.addChild(dynDataGrid);
    } else {
    // this does not work.
    //How do you access something directly with an ID but
    represented by a variable?
    // tmpNavID.removeChildAt(0);
    } else {
    // New Tab selected, do something here
    ]]>
    </mx:Script>
    <mx:HTTPService id="phpHTTPService"
    url="/flex/php/AssetsInLocation.php" useProxy="false" method="GET"
    result="getDataFromServer(event)">
    <mx:request xmlns="">
    <lid>{currentID}</lid>
    </mx:request>
    </mx:HTTPService>
    <mx:TabNavigator id="tabNav"
    creationComplete="tabNav.selectedIndex=0;mainBuilder(event)"
    width="100%" change="mainBuilder(event);">
    <mx:HBox id="LID2345" label="Tab 1" width="100%"
    height="100%" horizontalAlign="center">
    <!-- <mx:DataGrid dataProvider="{infoDataGrid}"
    width="80%"/> -->
    </mx:HBox>
    <mx:HBox id="LID1111" label="Tab 2" width="100%"
    height="100%" horizontalAlign="center">
    <!-- <mx:DataGrid dataProvider="{infoDataGrid}"
    width="80%"/> -->
    </mx:HBox>
    <mx:HBox id="LID1234" label="Tab 3" width="100%"
    height="100%" horizontalAlign="center">
    <!-- <mx:DataGrid dataProvider="{infoDataGrid}"
    width="80%"/> -->
    </mx:HBox>
    <mx:Canvas id="NewTab" label="New..." width="100%"
    height="100%">
    </mx:Canvas>
    </mx:TabNavigator>
    </mx:Application>
    Thanks all for your assistance.

    I think Ned is on the right track, but the specific form of
    the command may be off. If the ProgressEvent handler is defined on
    MC_Holder_Image, then the command to get the
    MC_Holder_Preload_TextField object should be something like:
    var oTextField:TextField =
    this.parent.parent.MC_Holder_Preload.getChildByName(childname);
    oTextField.text = "some text";
    The first "parent" references MC_Holder_Sprite, the second
    MC_Holder. If there are several instances of MC_Holder_Preload,
    then the above would have to be modified to account for that by
    first using the getChildByName method to acquire the appropriate
    instance like so:
    var oMC:MovieClip =
    this.parent.parent.getChildByName(HolderPreloadName);
    var oTextField:TextField = oMC.getChildByName(TextFieldName);
    Hope this (a) makes sense, (b) helps and (c) actually works.
    Regards
    Dave Spaar

  • Help with Combining Objects

    I've been thinking of submiting some of my Illustrator designs to iStock and I want clean up the files and perhaps combine some of the objects so there isn't this bigg mess of layers. The problem I'm having is that some objects need to be on top of other objects - for example a shadow on a foot needs to be above the layer with the foot's primary color. So if I wanted to combine objects that are in this kind of order would anyone have any tips or suggestions? I also want to combine layers that have just lines I've drawn on them, like movement lines which are just open paths with strokes. If I could get these types of objects all merged into one object then I could cut down not only on the size of the file but also the number of layers involved. This way when someone buys it from iStock they're not faced with this huge file with hundreds of layers.
    Any help would be appreciated.
    Thank you.

    Fully familiarize yourself with these topics:
    Combining paths. These are functions common in vector programs which union, punch, and intersect multiple paths. In Illustrator, they are called Pathfinders.
    Outlining Srokes. Creates unstroked filled paths around the edges of stroked paths. Understanding this is integral to using path combination functions in Illustrator especially, because Illustrator is so poor at cutting and dealing with open unfilled paths.
    Transparency and other Raster Effects. You need to understand which effects and transparency settings result in rasterization, and what that portends regarding the scaleability of your artwork.
    Color Model. Are you going to deliver CMYK or RGB files? Do you know why?
    What format do you intend to provide to the clipart reseller? Native AI files? If so, what version?
    Merely having Layers in your AI file does not significantly affect file size. An AI file is a stack of objects. That's true whether the whole stack of objects resides on a single Layer or a hundred Layers. Layers are nothing but another way of "grouping" subsets of the object stack for organization purposes. You seem to be thinking of Layers in AI as similar to Layers in Photoshop. That is a very common and very basic misunderstanding of the nature of vector artwork.
    It's the object constructs that you need to concern yourself with when creating clean, efficient, reliable, versatile, and easy-to-work-with vector artwork. "Normalize" things to their simplest constructs. Avoid unnecessary anchorpoints, clipping paths, masking, so-called "transparency" and "live effects."
    I very much applaud your desire to build clean files. (There is far too much sloppy, convoluted crap floating around out there nowadays.) Not meaning to discourage, but the fact of your concern about Layers frankly suggests that you may not really be ready to be delivering ready-made and problem-free artwork for widespread use as clipart. You need to fully understand the items mentioned above, and alot more. Asking questions in a user forum will be a very slow method of learning that stuff--there are too many variables and specific situations.
    JET

  • I need help with a Object Array

    I am having trouble and this maybe really simple seeing that I am fairly new to java but I have text that is being broken down in to preset part with those parts stored in Object arrays.
    Now I also have a object array inside my object array. Within the second object array are the broken down parts of the text and I want to compare this text with another string so for example this is what I am trying
    boolean found = false;
    for (int i = 0; i < FirstObjectArray.length ;i++)
         Object[] SecondObjectArray = (Object[]) FirstObjectArray;
         if(SecondObjectArray[0] == "string")
              found = true;
              break;
         else
              found = false;
    }Help would be very appreciated.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    astlanda wrote:
    Sure, you're right.
    [public boolean equals(Object obj)|http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#equals%28java.lang.Object%29]
    sharkura said all the OP needs at the moment. I just wanted to clarify a bit why You don't use == 99.999% of the time with objects, and never with String.
    I have argued elsewhere in these forums that it is inappropriate to tell anyone that you never use == to compare objects. This has not always been accepted. I have, on rare occasions, known experienced developers to blindly compare two objects with equals(), and cite the professor that taught them, 15 years iin the past, that object references are never compared using ==, but always with equals().
    However, the cases where == is appropriate and equals() is not are indeed rare, but not, in my experience, non-existent. In my statement, I probably exaggerated. And String is a case where I can probably accept that you will probably never go wrong with equals(). If the String has been pooled (see String::intern()), you can actually use either. From the javadocs: "*It follows that for any two strings s and t, s.intern() == t.intern() is true if and only if s.equals(t) is true.*"
    ¦ {Þ                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Help with string object code

    Hello,
    First off thanks in advance to anyone who helps. I am trying to write a program that using a class string object to convert this kind of "text speech" to english. For example if the user inputs "HowAreYou?", I want the program to output "How are you?" I am having too much trouble with strings for some reason. This is what I have so far and I am not sure where to go from here. Should I use a do loop to check through the input string until it is done seperating the words? And how should I go about doing that?
    import java.util.Scanner;
    public class P8
    public static void main( String args[] )
    char choice;
    String line = null;
    String answer = null;
    Scanner scan = new Scanner(System.in);
    do
    System.out.println();
    System.out.print("ENTER TextSpeak sentence(s): ");
    line = scan.nextLine();
    System.out.print( "Converted to English: \t ");
    System.out.print( textSpeaktoEng( line ) );
    System.out.println();
    System.out.print("Want more TextSpeak?\t\t ");
    answer = scan.next();
    choice = answer.charAt(0);
    if( scan.hasNextLine() )
    answer = scan.nextLine();
    }while(choice != 'N' && choice != 'n');
    public static String textSpeakToEng(String s)
    String engStr = null;
    if( Character.isUpperCase( s.charAt(j) ) )
    engStr += ? ?;
    engStr += Character.toLowerCase( s.charAt(j) );
    scan.close();
    }

    I got my program to compile and run but I have a problem. If I input something like "ThisForumIsGreat" it will output just "t f i g" in lower case letters. Any suggestions?
    import java.util.Scanner;
    public class P8
    public static void main( String args[] )
       char     choice;                          // Repeat until n or N                                             
       String line   = null;                     // Sentences to toTextSpeak
       String answer = null;                     // Repeat program scan
       Scanner scan = new Scanner(System.in);    // Read from keyboard
       do
          System.out.println();
          System.out.print("ENTER TextSpeak sentence(s): ");
          line = scan.nextLine();                // Read input line
          System.out.print( "Converted to English: \t    ");
          System.out.print( textSpeakToEng( line ) );
          System.out.println();
          System.out.print("Want more TextSpeak?\t\t ");
          answer = scan.next();                  // Read line, assign to string
          choice = answer.charAt(0);             // Assign 1st character
          if( scan.hasNextLine() )               // <ENTER> character
            answer = scan.nextLine();            // Read line, discard
      }while(choice != 'N' && choice != 'n');    // Repeat until input start n or N
    public static String textSpeakToEng(String s)
       String engStr = null;  
       int i;  
       for ( i = 0; i < s.length(); ++i )
       if( Character.isUpperCase( s.charAt(i) ) )
         engStr += " ";                                  // Append 1 blank space
         engStr += Character.toLowerCase( s.charAt(i) ); // Append lowercase
       return( engStr );
    }

  • I just upgraded to CP 5. Need help with drawing objects.

    I am trying to put a simple drawing object around a word.  Like a square.  I can't figure out how to not have any fill, just the outline of the box.  Any suggestions?  I was able to do this in CP 4.

    Hi there
    Personally, I'd use a Highlight Box to accomplish this. But that's just me.
    Here are the steps for a square drawing object. I'll assume you have already inserted the object and placed it and all you want are instructions for dealing with the fill.
    Look inside the properties inspector at the Fill & Stroke section. Click the Fill color and configure Alpha to 0%.
    Cheers... Rick
    Helpful and Handy Links
    Begin learning Captivate 5 moments from now! $29.95
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcererStone Blog
    Captivate eBooks

  • Need help with Calling objects

    I have created an object named "user" and I currently have 1 Frame in my program. The first frame is called "LogonFrame" and the second is called "UserDataFrame".
    In the main method of the application I declare a "User" object as user and then call LogonFrame to retreive the logon_name and password from the user. The logon_name and password will be placed in the User object to be accessed throughout the application.
    When I compile the application I receive the following error message:
    Error: (85) variable user not found in class GL2.LogonFrame
    *I know that 85 is the line number that the error is located
    *GL2 is the name of the package.
    Has anyone ever encountered this error before, and if so how can I fix this error.
    *Listed below is the code used in the User object if it helps at all.
    Jason Franz
    // Copyright (c) 2003 Jason T. Franz
    package GL2;
    * A Class class.
    * <P>
    * @author Jason T. Franz
    public class User extends Object {
    private static int user_id;
    private static String first_name;
    private static String last_name;
    public static void User(){
    user_id = 0;
    first_name = "";
    last_name = "";
    //sets the user ID
    public static void setUserID(int newID){
    user_id = newID;
    //Returns the User ID
    public static int getUserID(){
    return user_id;
    //Sets the User First Name
    public static void setFirstName(String newFirstName){
    first_name = newFirstName;
    //Gets the Users First Name
    public static String getFirstName(){
    return first_name;
    //Sets the Users Last Name
    public static void setLastName(String newLastName){
    last_name = newLastName;
    public static String getLastName(){
    return last_name;
    //Resets all data in the User Class
    public static void reset(){
    user_id = 0;
    first_name = "";
    last_name = "";

    The code below is a small portion of the program.
    If it helps at all I am useing Oracle JDeveloper version 3.2.3 with JDK1.2.2_JDeveloper
    This section is the User object
    // Copyright (c) 2003 Jason T. Franz
    package GL2;
    * A Class class.
    * <P>
    * @author Jason T. Franz
    public class User extends Object {
      private String first_name;
      private String last_name;
      public User(){
        first_name = "Jason";
        last_name = "Franz";
      //Sets the User First Name
      public void setFirstName(String newFirstName){
        first_name = newFirstName;
      //Gets the Users First Name
      public String getFirstName(){
        return first_name;
      //Sets the Users Last Name
      public void setLastName(String newLastName){
        last_name = newLastName;
      public String getLastName(){
        return last_name;
      //Resets all data in the User Class
      public void reset(){
        first_name = "";
        last_name = "";
        logon_name = "";
        user_password = "";
    }Here is the main method.
    // Copyright (c) 2003 Jason T. Franz
    package GL2;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    * GL2.DevilsHead
    * <P>
    * @author Jason T. Franz
    public class DevilsHead {
      public User user = new User();
       * Constructor
      public DevilsHead() {
        AddUserFrame frame = new AddUserFrame();
        //Center the window
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension frameSize = frame.getSize();
        if (frameSize.height > screenSize.height) {
          frameSize.height = screenSize.height;
        if (frameSize.width > screenSize.width) {
          frameSize.width = screenSize.width;
        frame.setLocation((screenSize.width - frameSize.width)/2, (screenSize.height - frameSize.height)/2);
        frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } });
        frame.setVisible(true);
       * main
       * @param args
      public static void main(String[] args) {
        try  {
          UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        catch (Exception e) {
          e.printStackTrace();
        new DevilsHead();
    }and here is the Frame which calls the user object to display the Information.
    // Copyright (c) 2003 Jason T. Franz
    package GL2;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    * A Swing-based top level window class.
    * <P>
    * @author Jason T. Franz
    public class AddUserFrame extends JFrame {
      BorderLayout borderLayout1 = new BorderLayout();
      JPanel jPanel1 = new JPanel();
      Button button1 = new Button();
       * Constructs a new instance.
      public AddUserFrame() {
        super();
        try  {
          jbInit();
        catch (Exception e) {
          e.printStackTrace();
       * Initializes the state of this instance.
      private void jbInit() throws Exception {
        this.getContentPane().setLayout(borderLayout1);
        this.setSize(new Dimension(400, 300));
        button1.setLabel("button1");
        button1.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
            button1_actionPerformed(e);
        this.setTitle("Add a User");
        this.getContentPane().add(jPanel1, BorderLayout.CENTER);
        jPanel1.add(button1, null);
      void button1_actionPerformed(ActionEvent e) {
        System.out.println(user.getFirstName());
        System.out.println(user.getLastName());
    }The error I receive is
    Error: (51) variable user not found in class GL2.AddUserFrame

  • Need help with moving objects

    Hello, i'm new to java and i'm building applets with eclipse. I'm stuck on how to move and object to the left of the screen i can move it right of the screen with the
    blueTriangle.slowMoveXPosition(50);
    but how do i move it back again say 50. I know this easy stuff for you guys.
    Do i have to put something on negative positions in the triangle class file?
    Any help is much appreciated.
    Thanks.

    Hello, i'm new to java and i'm building applets with
    eclipse. I'm stuck on how to move and object to the
    left of the screen i can move it right of the screen
    with the
    blueTriangle.slowMoveXPosition(50); What class is this 'blueTriangle' reference talking about?
    I doubt it's a standard one which anyone here would know about. I bet it's something your school provided instead, or another 3rd-party. So ask them.

  • Help with Registering objects/access cache

    Below is the save routine i use to persist my top-level objects to the database.
    It seems very likely that I am doing something fundamentally wrong as I am obvserving behaviour that I do not expect.
    For example, I am using a field called version_id to hold an integer for optimistic locking. The first time I save the object, the correct sql is created, and the database row looks as I would expect. However, subsequent attempts to save do not work because I cannot figure out how to get a reference to the object with the incremented version_id.
    It would be much appreciated if someone can see things i am doing incorrecty with the implementation i have included below.
    thanks in advance.
    craig
    public static Object save(IdentifiableValue obj, String sessionName) {
              Object entity= null;
              try {
                   UnitOfWork uow= getSession(sessionName).acquireUnitOfWork();
                   if (obj.isNew())
                        uow.registerObject(obj);
                   entity= uow.deepMergeClone(obj);
                   //                    uow.printRegisteredObjects();
                   uow.commit();
                   //               uow.registerObject(facility);
              } catch (DatabaseException e) {
                   e.printStackTrace();
              Object returnValue= getSession(sessionName).readObject(obj);
              return returnValue;
         }

    When I create a new record, the id (sequence generated) gets set fine, but not the version number.
    When I save a record, the version id is not incremented.
    It seems to use the version number field properly in the sql though.
    Below is my sessions.xml entry, which looks like I am not JTS unless I am doing something incorrect.
    Any help is much appreciated.
    <session>
              <name>default</name>
              <project-xml>toplink.xml</project-xml>
              <session-type>
                   <server-session/>
              </session-type>
              <enable-logging>true</enable-logging>
              <logging-options>
                   <log-debug>true</log-debug>
                   <log-exceptions>true</log-exceptions>
                   <log-exception-stacktrace>true</log-exception-stacktrace>
                   <print-thread>true</print-thread>
                   <print-session>true</print-session>
                   <print-connection>true</print-connection>
                   <print-date>true</print-date>
              </logging-options>
              <login>
              <platform-class>oracle.toplink.internal.databaseaccess.OraclePlatform</platform-class>
                   <datasource>jdbc/toplinkDS</datasource>
                   <uses-external-connection-pool>true</uses-external-connection-pool>
                   <uses-external-transaction-controller>false</uses-external-transaction-controller>
              </login>
         </session>

  • Help with Classes, Objects and their relationship.

    Alright, I've got this assignment from a computer science class that won't stop annoying me and I need some help. This is the complete assignment: http://zebra0.com/Tarraga/CS103/Project4.php
    What I'm having issues with is the course specifications. It says:
    ? Create a course class. It will contain the course name, 5 Student objects, the number of Students, etc. It will contain an addStudent(), printRoll() and average() methods. You may add methods as needed. The average method computes the average of all students test score averages.
    I'm not sure what my instructor means by 5 student objects. I'm assuming that addStudent() would create a new student() object (from the class which I've already created here: http://zebra0.com/Tarraga/CS103/studentP4.php) and printRoll() will print the existing objects, average() I think I know.
    So...wth am I supposed to create 5 student objects for? Or what are they referring to? I'd assume that the student objects are created only when the user inputs the student data, not internally.
    My question is what I'm assuming to be extremely newb-ish, and to be honest I am a complete newbie, but if anyone can help please do so.
    Edit: Another question I had regarded my student class would be, do I need to write getters/setters for every value in there? My instructor wouldn't stop raving about how we need getters/setters, but at this point I'm not exactly sure what they do.

    to didittoday:
    You could say that, yes. But honestly...I've been paying plenty of attention. What I've learned so far about an object in Java is the following:
    An object in programming is like an object in real life. It makes up the program. Just like a wheel is part(object) of a card, an object is part of the program.
    That's what my teacher has taught me, with pictures even. I've written about two GUI and one non GUI projects so far that I had to look to the book to actually finish. And that's her general answer to all our questions, "read the book!" She doesn't ever take time from showing us her precious powerpoints to actually teach us. And not once has she actually given us examples of coding. She instead directs us to the programs in our book which may or may not be of relevance.
    And all the tutors who could actually help me aren't on campus. If you'd like to redirect me to a link that may hold useful (and RELEVANT) information, please do so.
    Also: I do understand that a student object would hold student information (I.E.:
    public student (String firstname, String lastname, double score1, double score2, double score3, double score4)but I don't understand why 5 student objects should be created in the other class...is it that they have to be initialized and then once the user inputs the information, they are updated? I'm grasping at straws here.
    Edited by: Valkyrio on Mar 5, 2008 3:28 PM

  • Help with creating objects for ArrayCollection

    Hi all,
    I am trying to update an ArrayCollection with Objects created
    in ActionScript
    In the end the array collection will provide data to a chart
    I can add the objects to my arrayCollection and access the
    values of the properties via text field output but the data is not
    Bindable
    So my text field shows the values from my AC but my chart
    isn't getting the data

    AaffordableWeb:
    Wrapping the Object in an ObjectProxy seems to have worked in
    that the properties are bound but my Chart shows nothing.
    I have posted the code below (keep in mind its a work in
    progress)
    Any help would be appreciated.
    //////Code
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="handleResult(event);">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.events.FlexEvent;
    import mx.rpc.events.ResultEvent;
    import mx.utils.ObjectUtil;
    import mx.utils.ObjectProxy;
    //// set price change range for the four arrays
    [Bindable]
    public var nPchange:Array = new Array(-12, -11,
    -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0);
    [Bindable]
    public var pPchange:Array = new Array(12, 11,
    10,9,8,7,6,5,4,3,2,1,0);
    //// Set up temprary var
    [Bindable]
    public var tempval:*;
    [Bindable]
    public var tempval2:*;
    [Bindable]
    public var tempvaly:*;
    [Bindable]
    public var tempvalr:*;
    [Bindable]
    public var tempvalr2:*;
    [Bindable]
    public var tempvalry:*;
    [Bindable]
    public var ylovert:Array = new Array;
    [Bindable]
    public var rylovert:Array = new Array;
    [Bindable]
    public var ymin:*;
    [Bindable]
    public var testarray:Array;
    /// declare the lPrime ac
    // declare the rprime ac
    [Bindable]
    public var rPrime:ArrayCollection = new ArrayCollection();
    // declare rylover ac
    [Bindable]
    public var ryLover:ArrayCollection = new ArrayCollection();
    // declare ylover ac
    [Bindable]
    public var yLover:ArrayCollection = new ArrayCollection();
    /// declare default cMargin
    [Bindable]
    public var cMargin:* = 80;
    [Bindable]
    public var lPrime:ArrayCollection;
    public function handleResult(event:FlexEvent):void
    pedata();
    public function pedata():*{
    /// begin loop
    lPrime = new ArrayCollection();
    for(var n:int = 0; n < nPchange.length; n++){
    var value:* = nPchange[n];
    if(value == 0){value = .0001;}else{value = value;}
    tempval = -1 * value / (cMargin + value);
    tempval2 = (tempval / value);
    ylovert.push(tempval2);
    var o:Object = new Object;
    o.PriceChange= value;
    o.PriceElasticity= tempval2;
    lPrime.addItem(new ObjectProxy(o));
    } // end loop
    lprime.xField= "PriceChange";
    lprime.yField= "PriceElasticity";
    lprime.dataProvider = lPrime;
    ///last brkt
    ]]>
    </mx:Script>
    <mx:AreaChart id="myChart" showDataTips="true"
    mouseSensitivity="25" width="100%" >
    <mx:horizontalAxis>
    <mx:LinearAxis maximumLabelPrecision="1" title="Pricec2a"
    minimum="-12" maximum="12"/>
    </mx:horizontalAxis>
    <mx:verticalAxis>
    <mx:LinearAxis displayName="Price Elasticity to Break
    Even" minimum="-1.5" maximum="-1" />
    </mx:verticalAxis>
    <mx:series>
    <mx:AreaSeries id="lprime" form="curve" >
    <mx:areaFill>
    <mx:SolidColor color="red"/>
    </mx:areaFill></mx:AreaSeries>
    </mx:series>
    </mx:AreaChart>
    <mx:Text id="txt2"
    text="{lPrime.getItemAt(3).PriceElasticity}"/>
    </mx:Application>

  • Help with moving objects.

    Can anyone give me a hint or code or a website where i can find help on how to move obkects from side to side of the screen and also how to make balll blink (shrink, get bigger and over 5 times). Thnx

    Hi,
    to start you should have a look at the examples at
    https://java3d.dev.java.net/binary-builds.html.
    To animate objects in java3d you can use interpolators as shown in the SphereMotion.java example.

  • Help with View Objects

    I have created a new ViewObject in my Application Module in the project where I have my BC4J.
    Previously, I created a BC4J JSP Application project based on the other project but a this time I didn4t have created a ViewObjet that I want to use now.
    Then, I created a new JSP pages and I added the DataTags referring to that new ViewObject like this:
    <%@ page language = "java" errorPage="errorpage.jsp" import = "java.util.*, oracle.jbo.*, javax.naming.*, oracle.jdeveloper.html.*, oracle.jbo.html.databeans.*" contentType="text/html;charset=ISO-8859-1" %>
    <%
    // make sure the application is registered
    oracle.jbo.html.jsp.JSPApplicationRegistry.registerApplicationFromPropertyFile(session , "PrjSegJSP_PkgSeg_PkgSegModule");
    %>
    <HTML xmlns:jbo="jbo">
    <HEAD>
    <TITLE>INSTITUTO ECUATORIANO DE SEGURIDAD SOCIAL</TITLE>
    <LINK href="estilo/estilo.sty" rel=stylesheet type=text/css>
    </HEAD>
    <BODY class="clbody" aLink=#800000 bgColor=#ffffff leftMargin=0 link=#808000 text=#000000 topMargin=0 vLink=#c0c0c0>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <jbo:ApplicationModule configname="PkgSeg.PkgSegModule.PkgSegModuleLocal" id="PkgSegModule" username="iessuser" password="iess" />
    <jbo:DataSource id="dtsVista" appid="PkgSegModule" viewobject="ViewRolPorUsu" ></jbo:DataSource>
    <FONT class="texgen">Primero</FONT> |
    <FONT class="texgen">Anterior</FONT> |
    <FONT class="texgen">Siguiente</FONT> |
    <FONT class="texgen">Ultimo</FONT>
    <br>
    <%
    String navop = request.getParameter("NAV");
    if ( navop == null )
    navop = "First";
    if ( navop.equals("Previous") && !dtsVista.getRowSet().hasPrevious() )
    navop = "First";
    if ( navop.equals("Next") && !dtsVista.getRowSet().hasNext() )
    navop = "Last";
    %>
    <jbo:RowsetNavigate datasource="dtsVista" action="<%=navop%>" />
    <br>
    <form name="Vista" action="untitled2_Submit.jsp">
    <table border="0">
    <tr>
    <td>Nombre de Usuario</td>
    <td>
    <FONT class="texgen"><jbo:ShowValue datasource="dtsVista" dataitem="Nomuniusu" ></jbo:ShowValue></jbo:ShowValue></FONT>
    </td>
    </tr>
    <tr>
    <td>Cedula de Identidad</td>
    <td>
    <jbo:ShowValue datasource="dtsVista" dataitem="Cedideusu" ></jbo:ShowValue>
    </td>
    </tr>
    <tr>
    <td>Fecha Inicio Vigencia del Rol</td>
    <td>
    <jbo:InputText datasource="dtsVista" dataitem="fecinivigrol"/>
    </td>
    </tr>
    <tr>
    <td>Tipo de Usuario</td>
    <td>
    <jbo:InputText datasource="dtsVista" dataitem="tipusu"/>
    </td>
    </tr>
    <tr>
    <td>Descripcion del rol</td>
    <td>
    <jbo:InputText datasource="dtsVista" dataitem="desrol"/>
    </td>
    </tr>
    </table>
    <input name="MyRowKey" type="hidden" value="<jbo:ShowValue datasource="dtsRolPorUsu" dataitem="RowKey"/>" />
    </form>
    </BODY>
    </HTML>
    <jbo:ReleasePageResources releasemode="Stateless" />
    But when I run the page I found this error:
    Application Error
    Return
    Error Message: DataWebBean: Could not locate View Object: ViewRolPorUsu in application PkgSegModule
    How can I work with a View Object created recently and after I have created the BC4J JSP Application???
    Could you help me please?

    Yes, I added my new View Object to the Data Model because when I right_click on the JSP page and I want to add a new Datasource Datatag, I see the ViewObject but it gave me the error.

Maybe you are looking for