How to replace one symbol with another?

I have a symbol with some very basic animations. I would like to set conditions upon which one symbol is swapped out for a symbol in a library. Each symbol is the same size, but so far I can't seem to get this right. I've attempted createChildSymbol but nothing really works.  I've got it set up as:
My Stage:
container0container (rectangle)
container1container (rectangle)
container2container (rectangle)
button1
button2
My library symbols:
Symbol_1
Symbol_2
Symbol_3
Symbol_4
Symbol_5
I want to be able to click button 1, and replace the container1>container with container1>Symbol2 and then play the animation associated with container1
Can anyone advise me on this?

Not sure if it is what you want but try this:
sym.$('down_btn').click(function(){
var firstS = sym.createChildSymbol("Symbol_1", "container1");
sym.play('down1');
sym.$('up_btn').click(function(){
var firstS = sym.createChildSymbol("Symbol_2", "container1");
sym.play('up1');

Similar Messages

  • How to replace one variable with another in large number of queries

    Hello guys!
    I have this situation: our company needs to use one variable instead of another for certain amount of queries.
    Is there some way to automatically replace one variable with another for a certain characteristic in big number of queries ( like 150 - 200 ) ? Doing this manually would take lots of time)
    Apreciate your help!

    you could try (at your own risk) the following:
    1. search the technical id (ELTUID) of your variable in table RSZELTDIR
    2. see where this variable is used in table RSZELTXREF (by filling RSZELTDIR-ELTUIID in RSZELTXREF-TELTUID)
    3. add similar entries for your new variable
    4. delete the entries for the old variable (they're part of the key, so you can't simply "change" them)

  • How to replace a movieclip with another movieclip

    How to replace a movieclip with another movieclip
    Hi,
    I am having a swf called tchild.swf... in this i got a
    movclip 'child1'. i am loading this tchild.swf into another swf
    tparent.swf within 'mcloader' movie clip.. i got another movclip
    called 'picture1'
    i am loading tchild.swf into mcloader movclip.. and i want to
    load 'child1' moviclip into picture1..
    how to replace a picture1 movieclip with child1 mc..
    PS: i dont want to load picture1 from library.. its on the
    stage.

    AWT or Swing?

  • How to replace one char with two chars in email address policy?

    I very much like to replace the 'ß' char in the surname with 'sz'. However, applying filter '%rßsz%[email protected]' on 'Preußig' leaves me with '[email protected]'.
    So, how do I replace one char with two chars in email address policy?

    As far as I know, your only solution is to manually create such addresses instead of using e-mail address policy.
    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

  • Stepping through a query result set, replacing one string with another.

    I want to write a function that replaces the occurance of a string with another different string.  I need it to be a CF fuction that is callable from another CF function.  I want to "hand" this function an SQL statement (a string) like this:   (Please note, don't bother commenting that "there are eaiser ways to write this SQL..., I've made this simple example to get to the point where I need help.  I have to use a "sub_optimal" SQL syntax just to demonstrate the situation)
    Here is the string I want to pass to the function:
    SELECT
      [VERYLONGTABLENAME].FIRST_NAME,
      [VERYLONGTABLENAME].LAST_NAME,
      [VERYLONGTABLENAME].ADDRESSS
    FROM
      LONGTABLENAME [VERYLONGTABLENAME]
    Here is the contents of the ABRV table:
    TBL_NM,  ABRV    <!--- Header row--->
    VERYLONGTABLENAME, VLTN
    SOMEWHATLONGTALBENAME, SLTN
    MYTABLENAME, MTN
    ATABLENAME, ATN
    The function will return the original string, but with the abreviations in place of the long table names, example:
    SELECT
      VLTN.FIRST_NAME,
      VLTN.LAST_NAME,
      VLTN.ADDRESSS
    FROM
      LONGTABLENAME VLTN
    Notice that only the table names surrounded by brackets and that match a value in the ABRV table have been replaced.  The LONGTABLENAME immediately following the FROM is left as is.
    Now, here is my dum amatuer attempt at writing said function:  Please look at the comment lines for where I need help.
          <cffunction name="AbrvTblNms" output="false" access="remote" returntype="string" >
            <cfargument name="txt" type="string" required="true" />
            <cfset var qAbrvs="">  <!--- variable to hold the query results --->
            <cfset var output_str="#txt#">  <!--- I'm creating a local variable so I can manipulate the data handed in by the TXT parameter.  Is this necessary or can I just use the txt parameter? --->
            <cfquery name="qAbrvs" datasource="cfBAA_odbc" result="rsltAbrvs">
                SELECT TBL_NM, ABRV FROM BAA_TBL_ABRV ORDER BY 1
            </cfquery>
         <!--- I'm assuming that at this point the query has run and there are records in the result set --->
        <cfloop index="idx_str" list="#qAbrvs#">      <!--- Is this correct?  I think not. --->
        <cfset output_str = Replace(output_str, "#idx_str#", )  <!--- Is this correct?  I think not. --->
        </cfloop>               <!--- What am I looping on?  What is the index? How do I do the string replacement? --->
            <!--- The chunck below is a parital listing from my Delphi Object Pascal function that does the same thing
                   I need to know how to write this part in CF9
          while not Eof do
            begin
              s := StringReplace(s, '[' +FieldByName('TBL_NM').AsString + ']', FieldByName('ABRV').AsString, [rfReplaceAll]);
              Next;
            end;
            --->
        <cfreturn output_txt>
        </cffunction>
    I'm mainly struggling with syntax here.  I know what I want to happen, I know how to make it happen in another programming language, just not CF9.  Thanks for any help you can provide.

    RedOctober57 wrote:...
    Thanks for any help you can provide.
    One:
    <cfset var output_str="#txt#">  <!--- I'm creating a local
    variable so I can manipulate the data handed in by the TXT parameter.
    Is this necessary or can I just use the txt parameter? --->
    No you do not need to create a local variable that is a copy of the arguments variable as the arguments scope is already local to the function, but you do not properly reference the arguments scope, so you leave yourself open to using a 'txt' variable in another scope.  Thus the better practice would be to reference "arguments.txt" where you need to.
    Two:
    I know what I want to happen, I know how to make it happen in another programming language, just not CF9.
    Then a better start would be to descirbe what you want to happen and give a simple example in the other programming language.  Most of us are muti-lingual and can parse out clear and clean code in just about any syntax.
    Three:
    <cfloop index="idx_str" list="#qAbrvs#">      <!--- Is this correct?  I think not. --->
    I think you want to be looping over your "qAbrvs" record set returned by your earlier query, maybe.
    <cfloop query="qAbrvs">
    Four:
    <cfset output_str = Replace(output_str, "#idx_str#", )  <!--- Is this correct?  I think not. --->
    Continuing on that assumption I would guess you want to replace each instance of the long string with the short string form that record set.
    <cfset output_str = Replace(output_str,qAbrs.TBLNM,qAbrs.ABRV,"ALL")>
    Five:
    </cfloop>               <!--- What am I looping on?  What is the index? How do I do the string replacement? --->
    If this is true, then you are looping over the record set of tablenames and abreviations that you want to replace in the string.

  • Universally replace one character with another and then change font

    Hello,
    I have a geologic map file where there are hundreds of labels like Cc, Cz, Cwu, etc... all in the Arial font. I need to change all of the capital C's with a character from the StratagemAge font. That is to say, I need to find all instances of one character in my file and then replace them with another character and then change the font of that selected character.
    I've been trying to figure out how to write an action to do this, but I was wondering if there is a way to do this easily already.
    Any suggestions?
    Jeremy

    > how do you turn off the dialog for the Find/Replace in action palette?
    At the left of each Action step is a square field. Mouse over it and the tooltip will read "Toggle Dialog On/Off".
    > I got an action that I wrote to work, but it takes a button click for each instance in my file that I want to change. Would yours have that same drawback as that?
    Yes, you would have to click each time to run the Action (or, you could assign a function key), but there would be no dialog to dismiss.
    But you can pile several iterations of the same steps in the Action; so that one execution of the Action does ten replacements with one click, for example.
    This would not be a particularly difficult thing to Javascript, but you are correct that scripting has a learning curve. This task is not something I would think often needed. Doing a few hundred replacements in a file, using an Action would not seem overly burdensome to me. But if it is a recurring need for you, it might be worth writing a script.
    JET

  • How to communicating one application with another?

    I wanted to make a web site that have the ability to view,update,insert and delete record in a database. How to do that? How can one application communicate with another? example, I wanted to have XHTML communicate with Java and Java to communicate with my database that is pointbase database.

    Multi-tier application communication is a somewhat complex matter. It may be made using differents techniques and designs. But like Sum-shusSue said, a typical Java-based solution would use these Java technologies: JSP (Java Server Page) for the presentation side (the client), Servlet or EJB (Enterprise Java Bean) for the server-side logic. The communication with the Database is made through JDBC.
    I suggest that you take a look at the J2EE edition of Java. That stands for Java 2 Enterprise Edition and it is specifically made for enterprise system development, such as Servlet, JSP, EJB, etc...
    This is a whole lot of new subjects and, from my humble experience, it is not that easy. i.e. I would not recommend it for strict newbies. However, if you have some months of Java coding on your side, maybe you should take a look. You can check first the left menu of this site, you'll find, under Technologies the sub-menu J2EE. There's also, somewhere on the site, tutorials on differents J2EE topics. Finally, I would recommend you this book:
    Professional Java Server Programming, J2EE 1.3 Edition, edited by Wrox. Of course, there a lot of other books on hte market. J2EE is a hot topic!
    Hope this help...
    Simon

  • How do I replace one table with another

    In my swing application I go out over the network and retrieve information, and then present that info in a table. Problem is this button can be pressed more than once, so in this case the old table needs to be replaced. Looking through the API their does not seem ot be a remove to compliment add. Right now when I hit the button multiple times another table just gets added to the right of the previous table.
    So how do I get rid of the first table?
    m

    Im not that advanced yet -- although I have looked over the literature and understand what you mean. Seems to me tables are more complicated than other swing elements. In any case, the container class DOES have a remove method, which is being used succesfully. Thanx for replying.
    m

  • How do you replace one image with another

    I have a page that displays the results of a search for information about a club. One of the items is the club's logo. It is displayed using the following code
    <img src="<?php echo $row_clubedit['club_logo_url']; ?>" alt="The Club's Logo"  class="logo" title="The Club's Logo">
    This works fine, except when no club has been selected, in which case it shows the default question mark in a blue box.
    It would be nice if I could display the Federation Logo, to which all the clubs belong, until a club is picked.
    Is there a simple way to set a default image that would be replaced from a data set.
    $row_clubedit['club_logo_url'] holds the url to the log in the format http://www.club.org/clublogo.png
    <img src="<?php echo ( 'federation_logo_url'); ?>" alt="The Club's Logo"  class="logo" title="The Club'c Logo">
    The logic I suppose would be
    if club_logo_url does not exist,
              then print the  federation logo,
         else print the club logo.
    How do you code that in php?
    I'm only a beginner at PHP.

    <img src="<?php echo $row_clubedit['club_logo_url'] == "" ? "http://www.club.org/clublogo.png" : $row_clubedit['club_logo_url']; ?>" alt="The Club's Logo"  class="logo" title="The Club's Logo">
    should do it

  • Replace one view with another with animation

    Hello:
    I'm clearly not following some basic principle here so I'd appreciate some guidance.
    My intentions is to create a (quiz type) app with several screens (I'm assuming each of them will be a view that I will create in the Interface builder). The goal is to let user advance from screen 1 to screen 2 then to screen 3, etc. by answering multiple choice questions (presented as buttons). So when one button is clicked the current screen would slide to the left and the next screen would slide in. This animation is very much similar to the default Navigation-type app behavior, but in my case I do not need the navigation bar on top (since user should not be able to go back). By studying the latter example, I was able to find the following code that slides view controlers one over another:
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    SecondPage *secondViewController = [[SecondPage alloc] initWithNibName:@"SecondPage" bundle:nil];
    [self.navigationController pushViewController:secondViewController animated:YES];
    [secondViewController release];
    but in my project, that doesn't seem to work, as, I'm assuming, I do not have the navigationController member.
    What am I doing wrong here?

    Hi Den -
    Den B. wrote:
    The issue I have now is how to change the initial UITableView to my own view (that I can design in the interface builder)?
    Looks like you've made a lot of progress since your original question, so I'll skip the response I might have written earlier, unless you think it would be helpful to go back there. To your current question, I guess I should first ask "What initial UITableView?". My best guess is that you've found the Navigation-based Xcode template, which includes an instance of UITableViewController as the root view controller. Based on that guess, I take it you now want to replace the table view controller with a vanilla UIViewController so the root view needn't be a table view. Are these assumptions correct?
    If so, here's how to make the replacement:
    1) In RootViewController.h, change the super class from UITableViewController to UIViewController;
    2) In RootViewController.m, remove all the lines from (and including) "#pragma mark Table view methods" upto -(void)dealloc;
    3) Open RootViewController.xib, and select Window->Document from the top menu to make sure the "RootViewController.xib" window is open. This is the window that displays icons, not the editor window which displays the view. Delete the Table View icon (select it, then Edit->Delete). Then drag a UIView object into that window from the Library, then Ctrl-drag from File's Owner to the View icon to connect the 'view' outlet of File's Owner to the View object;
    4) Double-click on the newly added View icon to open the IB editor window and populate that window with the subviews you want, returning to RootViewController.h and .m to add IBOutlet properties and IBAction methods as needed. Once RootViewController.h is saved you can make the required connections to File's Owner in IB.
    Here's an example of how to hide the nav bar and transition to the next view from an action method:
    // RootViewController.m
    #import "RootViewController.h"
    #import "SecondViewController.h"
    @implementation RootViewController
    - (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.navigationBarHidden = YES;
    - (IBAction)nextView {
    SecondViewController *vc2 = [[SecondViewController alloc]
    initWithNibName:@"SecondViewController" bundle:nil];
    [self.navigationController pushViewController:vc2 animated:YES];
    [vc2 release];
    PS. It "suks" to go from being a pro on one platform to a complete noob on another
    Many of us at this forum jumped from platforms such as Windows to iOS without any prior Cocoa experience, so you're among friends who understand the transition. In my case, after the first few weeks, I never wanted to see another dev environment again. So hang in there! It will be fun soon.
    - Ray

  • ABAP code help to replace one field with another

    Hi All,
    I have one DSO which is holding data for fields WBS(Old) and Company Code(Old).
    and I have one table which holds the information for Ols WBS and Ols Comp Code along with their New WBS and New Comp code.
    for eg:
    In DSO :
    Old WBS , Old Comp.Code
    abc        ,  001
    xyz        , 002
    In Table:
    Old WBS , Old Comp.Code , New WBS , New Comp.Code
    abc,           001,                    ABC,            001-04
    xyz,           002,                    XYZ,            002-04
    Now my requirement is ,
    search record by record from DSO and look into the table .
    If abc record in DSO matches with abc record in table, then in DSO it should replace with new WBS and Com.Codes.
    after the code, data in DSO shuld be lik this.
    WBS , Comp.Code
    ABC ,  001-04
    XYZ,   002-04.
    Thanks in advance,
    Sai Chand.S

    Hi
    If these fields are key fields dont think its possible to overwrite. Else plz write the following Code in End Routine it will overwrite the existing values in DSO.
    Select * from DSO into it_dso_temp. "U can even select only key fields WBS and CC fields.
    If sy_subrc=0.
    Sort it_dso_temp by WBS CC.
    endif.
    Select old WBS
               old CC
               new WBS
               new CC
    from Table
    into it_table
    for all entries in it_dso_temp
    where old WBS = WBS and old CC = CC.
    if sy_subrc=0.
    sort it_table by old WBS, old CC.
    endif.
    Loop at it_dso_temp assigning result_fields.
    Read it_table into wa_table with key old WBS = fs_dso_temp-WBS
                                                               old CC = fs_dso_temp-CC Binary SEarch.
    If sy_subrc = 0.
    result_fields-WBS = wa_table-new WBS.
    result_fields-CC = wa_table-new CC.
    endif.
    Endloop.
    Refresh result_package.
    result_package[] = it_dso_temp[].
    Also if incoming data has only old values u can loop at result package instead of it_dso_temp. let me know in case of issues.
    hope this helps !
    Reg
    Aparna

  • Replace one symbol to another...

    Hi ppl!
    In my report I have some field(datatype:char), which recives from database text like 'aADrR.Ww' or 'Ex.Aer.Ww' or '.WeP.5'...
    I need to replace all dots '.' with commas ','
    Can anybody advise how to do this?
    Thanx before,
    bdz

    Hi friend,
    Here is the solution for your question
    SQL> select REPLACE('SRIN.REAR.RERE.' , '.' , ',' ) FROM DUAL;
    REPLACE('SRIN.R
    SRIN,REAR,RERE,
    take the formula colume in the report and use the above logic in that.
    give the source as formula colume to your fields.
    bye

  • Replacing one namespace with another using XML Anonymizer Module

    I've following XML message
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Result xmlns:ns0="urn:source_namespace">
       <ns0:Function/>
       <ns0:r/>
    </ns0:Result>
    but I need to have a little bit different namespace (which do not exist in above message)
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Result xmlns:ns0="urn:target_namespace">
       <ns0:Function/>
       <ns0:r/>
    </ns0:Result>
    Any idea how to archieve this using  XML Anonymizer Module?

    Hi,
    You don't need a UDF to do this. Follow this...
    1. Edit the Message Type Result XML Namespace as urn:target_namespace from urn:source_namespace.
    2. Save this and activate it.
    3. In the Message Mapping go to edit and reload this new Message Type, save the changes and activate it.
    This blog How to remove namespaces in Mapping - XI By Sameer Shadab shows you hove to remove the namespace in you case you use the same to change the namespace
    Thanks
    SaNv...

  • How to split one path with another (avoid using scissors)?

    Hello.
    I'm trying to achieve simple task, but can't do that. I have a guilloche background made of strokes. I need to cut them by a shape. The visual result i'm tring to achieve is the same as using the clipping mask. However i need to apply the mask to the strokes, and remove everything that is outside the shape. So is there a way of doing that?
    Scirssors tool is not an option cos it'll take entire life to cut all the strokes manually.
    Outline opption in pathfinder is somewhat close, but then it's barely impossible to delete the cutting shape as it gets segmented as well.
    Any other ideas? Sounds simple...but...

    Thanks guys for your answers. But it doesn't quite work anyway.
    1. Don't have the shape builder tool.
    2. Don't have the Magic Wand. I have "Outline" instead at that place. And like I said, it indeed does the job, BUT, i would need to remove a lot of segments manuall, which is an overkill as well.
    I've attached coupl'o'images to illustrate my need.
    This is the source group of strokes:
    The needed result:

  • How to exchange one image for another with a click

    I am brand new to actionscript, so bear with me! I need to create an interactive web-based system which takes the user through steps to assemble something. One of the pages will have images of the tools needed. I want the user to be able to 'tick' off each tool, so that when they click on the image of a specific tool it is replaced by the image faded out and a big red tick over it. essentially it is replacing one image for another when it is clicked on.
    any ideas on the actionscript? Sorry i know this must be basic stuff for you!
    thanks!

    your tool images should be converted to movieclips and given instance names and you should create a red tick movieclip that you assign a class, say RedTick.  you can then use:
    tool1.addEventListener(MouseEvent.CLICK,toolClickF);
    function toolClickF(e:MouseEvent):void{
    var redtick:RedTick=new RedTick();
    addChild(redtick);
    redtick.x=e.currentTarget.x;
    redtick.y=e.currentTarget.y;
    e.currentTarget.alpha=.4;

Maybe you are looking for

  • Keyboard not working split x 2

    to whom may care, i appologize in advance [keyboard doesnt work so i am one finger typing on onscreen keyboard].  while surfing the web the other day and all of a sudden my mouse and keyboard does not work... take computer to store and my computer is

  • An error during the boot

    sunsparc.localhost svc.startd[7]: [ID 652011 daemon.warning] svc :/network/rpc/nisplus:default: Method "/lib/svc/method/nisplus" failed with exit status 96. bash-3.00# cat network-rpc-nisplus:default.log [ feb 11 12:33:35 Disabled. ] [ feb 11 12:33:3

  • Performance of large tables with ADT columns

    Hello, We are planning to build a large table ( 1 billion+ rows) with one of the columns being an Advanced Data Type (ADT) column. The ADT column will be based on a TYPE that will have approximately (250 attributes). We are using Oracle 10g R2 Can yo

  • Using Address..End Address Command in Script ?

    Using Address........End Address Command in Script , Is it possible to print without Name filed ? I have tried but w/o name field it is not printing   .. I liket to print like this Address paragraph Z3 Street ........................... PoBox........

  • Subversion is not working !

    Dear all, I'm trying to install/update Textmate's bundles using svn. When I try with the following instructions in terminal: $mkdir -p /Library/Application\ Support/TextMate/Bundles $cd /Library/Application\ Support/TextMate/Bundles $svn co http://sv