Noob Question about Variables

Hello,
I have an element called "element1" and inside it is another
element called "element2"
main
└element1(contains variable "var")
└element2
note:both elements are movieclips, not buttons
As shown in my diagram, variable "var" is set up inside
element1's actionscript
and I want to be able to control "var" from element2
I could use _global. but I don't want to control all the
variables named "var" in my file
what should I do?

_global is not in AS3, so you wouldn't be able to use it
anyways. And var is a reserved term so you'd be hitting a wall
there too. If element2 is contained within element1, then to affect
the var in element1 from element2 you would use:
MovieClip(this.parent).variable = whatever

Similar Messages

  • 2 noob questions about speaker settin

    . What if I don't sync the Creative speaker settings with windows control panel speaker settings?
    2. What if I the speaker settings(both Creative and windows) don't match my speaker type?For example, I have only headphone connected to my Audigy 2 ZS but I set the speaker setting to 5. or whatever else. Will this improve my sound quality in games such as Battlefield 2? Am I?supposed to get the virtual 5. surround sound effect? Because I've heard that cmss upmixes stereo sound in?games to virtual 5. or 7. surround sound for headphones.
    Thanks.
    Message Edited by jermin on 06-24-2008 02:09 PM

    Re: 2 noob questions about speaker settings?slightlys I have a slightly different set up.
    I have 5. speakers that I use for movies and some games. For BF242 I use headphones because they give you an advantage as you can hear people creeping up behind. The virtual surround sound is really good with my XFi xtremeMusic.
    First I don't think it matters what you select under Windows Control Panel as the Creative Console Launcher updates speaker settings in Windows. Second if you want virtual 3d with CMSS on headphones just select headphones and enable CMSS3D. Then click the 'headphone' button on the CMSS3D tab and you can test the sound - a helicopter pans around in 360 degrees.
    Then in games set the software to output 5. - AFAIK. Battlefield seems to do this automatically but I can't speak for other games. I'm assuming the Audigy has the same CMSS3D tech that the XFi has.

  • Noob question about launching apps

    Greetings all,
    Just made the switch to a Powerbook with OS X Tiger, and have a question about launching applications; specifically how to do so without using the mouse. On my Linux boxes (one at home, one at work), I do most of my work from the keyboard, without resorting to the mouse, even in Gnome or KDE.
    In Tiger, I can select applications on the desktop, but haven't been able to figure out how to launch them without "clicking"... I've Googled and searched these forums, but no luck so far. Under Linux, it's the Enter key. I assume in Tiger it's some key combination...
    I know there's probably a simple answer, but I've not been able to happen upon the appropriate key combo it at random, so I thought I'd ask the experts.
    Be gentle, I've only had my PB a week!

    To help you in your quest to keep your hands on the keyboard you should check out apps like LaunchBar and Quick Silver. Your hands will never (well... rarely) leave the keyboard again.

  • Question about variable names

    k, so I have a for() loop that I want to take the value of String fs1 through String fs21 and add them in that order to a String fs. So, my question is, can you do this in a loop? you can do it in PHP, and that's what I'm accustom to.
    this is kinda what I want to make
    String fs = "";
    String fs1 = "foo";
    String fs21 = "bar";
    for(int i = 0; i<22;i++)
         fs+= (the variable "fs" plus the number of "i", so like fs1, fs2, fs3. . . fs21);
    System.out.println(fs);

    I think you want to use and array and be careful about using += that way.
    StringBuffer buffer = new StringBuffer();
    String[] fs = new String[2];
    String fs[0] = "foo";
    String fs[1] = "bar";
    for(int i = 0; i<22;i++)
         buffer.append(fs);
    return buffer.toString();

  • Question about variable declaration

    Hi all,
    I have a (in fact, two) question(s) about the declaration of variables inside of time-critical code, like render loops or similars.
    Does it really matter to use
    for (int k=0; k<1000; k++)
         for (int l=0; l<1000; l++)instead of
    int k;
    int l;
    for (k=0; k<1000; k++)
         for (l=0; l<1000; l++)concerning the speed of the app? What about doing this with non-basic types -> Objects, like to say Strings ?
    And are there any resources where I can find out more about that and other things like that ?
    Uhm, now it became three q's... Sorry to bother you ;-)
    Skippy

    whoo, maybe I got something totally wrong here.
    Does this mean that
    Image blah;
    for (int i=0; i<100; i++) blah = getImage("test"+i+".gif");will clean up a lot, because there are non-referenced Images and Strings?
    Hmm, anyone told me that
    for (int i = 0; i<100; i++)
    String test = "test"+i;
    System.out.println(test);
    }is disastrous code.
    Damn, ever thought to be a good Java programmer, but every day I get new thoughts I cannot solve these days...
    grmph
    Skippy

  • Question about variable scope

    Suppose theres a class that mixes colors.
    It has an constructor and two methods:
    public class ColorMix {
    //This is just an example but I've tried this and colors
    mix and show up correctly.
    public ColorMix() {
    cmColor = MixColors();
    } //e_constr
    private void mixColors() {
    //do something
    Color1 = createColors();
    Color2 = createColors();
    //etc
    private Color createColors() {
    //create some color-values
    //r, g and b ...
    Color anColor = new Color (r, g, b) //finally create color
    return anColor; //and return that color
    public Color cmColor;
    } // e_class_ColorMix
    My question is: Howcome and how the variable
    'anColor' is referred from the createColors-method to
    the mixColors-method?!? I thought that anColor would
    be out of scope, since its created in the createColors
    I've understood it would be erased once createColors
    is done with?!?
    Or did MixColors make it to the 'anColor' before garbage
    collector?
    Thanks,
    Jani

    I think you are mixing up variables and objects. A variable (like "anColor" in your example) is not the same as an object. A variable is just a reference to an object that exists somewhere in memory.
    Objects are eligible for garbage collection if the running program does not hold any reference to the object anymore.
    Your createColors() method creates a new object of type Color and stores a reference to it in the variable anColor. Then it returns the value of the variable (which is the reference to the Color object) to the calling method: mixColors. There you have another variable (Color1) which will hold the reference to the object.
    So the variable anColor goes out of scope at the end of method createColors(), but the program still has a reference to the object, stored in variable Color1.
    The object is still referenced by the program and will therefore not be garbage collected.
    I'd suggest you read the Java Tutorial: http://java.sun.com/docs/books/tutorial/java/index.html
    Jesper

  • Noob question about trying to duplicate rows in a table

    Simplification of problem is I've got a table with user_id, name, year where user_id is pk. I would like to take all the rows that match year=2008 and insert them into the same table, but start the user_id at a certain number and set year=2009.
    I know this doesn't work, but it's what I want to do in noob-code:
    INSERT into TABLE (
    user_id, name, year
    ) VALUES (
    SELECT user_id_seq.nextval after starting at 3500, name, 2009 from same table doing insert to where year = 2008
    I've contemplated using a temporary table, I've also seen mention of cursors, but don't quite understand what they are. I'm really, really new to Oracle and SQL in general, but am familiar with programming and shell scripts. I know more in depth searching might land me what I want, but I think my search syntax would be just as weak as my knowledge of the material. I'm just thinking this is something so basic and easy that my searches aren't using the right terms to catch a hit.

    Hi,
    Welcome to the forum!
    You can INSERT all the results of a query by substituting the query where you otherwise would have "VALUES (list)".
    For example:
    INSERT into TABLE_X
           (user_id,              name,  year)
    SELECT  user_id_seq.NEXTVAL,  name,  2009
    FROM    table_x
    WHERE   year = 2008;This assumes that the sequence user_id_seq exists and is ready to issue the correct value. (It's unclear if that's part of the problem.)
    Temporary tables and cursors (which are a way of getting query results in PL/SQL) are only useful for inserting in rare situations, where you have to do very odd, convoluted things. Think (at least) twice about how to do what you need to in SQL, and if you can't think of a way, then ask.
    Yes, basic things often are hard to search for, especially if you don't know the right terms.
    There are several good teach-yourself SQL books that explain this kind of thing. Getting one would be a good investment.
    [All the Oracle manuals|http://www.oracle.com/pls/db111/portal.all_books] are on line. There's an example of this in the SQL Reference manual, under THE INSERT command.
    Edited by: Frank Kulash on Nov 26, 2008 12:59 PM
    Clarified usefulness of cursors. They have a lot of good, common functions, but helping with INSERTs is not one of them.

  • Again a noob question about parameterizing

    Im setting up an insert() for a binary tree. when i try to actually preform the setLeft or setRight command i get an error. My code is posted below.
    my node class
    public class BTreeNode<T extends Comparable<T>> implements Position<T> {
         public BTreeNode<T> _left;
         public BTreeNode<T> _right;
         public BTreeNode<T> _parent;
         public T            _data;
         public T element() {
              return _data;
         public BTreeNode(T c) {
              _data = c;
              _parent = null;
              _left = _right = null;
         public void setLeft(BTreeNode<T> n) {
              _left = n;
              if (n!=null) n.setParent(this);
         public void setRight(BTreeNode<T> n) {
              _right = n;
              if (n!=null) n.setParent(this);
         }my binary tree class
    public class BasicBTree<T extends Comparable<T>> implements BinaryTree<T> {
         public void insert(T obj) {
         if (_root != null) {
              BTreeNode<T> runner;
              runner = _root;          
             if
                      (obj.compareTo (runner.element()) == 0){
                         System.out.println ("Object was found in tree and will not be inserted");
              else if     
                 ( obj.compareTo(runner.element()) < 0 ) {
                            if (runner.hasLeft() == true){
                                 runner = runner._left;
                                 return;}
                            else {
                                 runner.setLeft(obj); // ERROR IS HERE
              else if
                   ( obj.compareTo(runner.element()) > 0 )
                             if (runner.hasRight() == true){                   
                                      runner._right = runner;
                                      return;}
                            else {
                                 runner.setRight(obj); // ERROR IS HERE
         else{
              _root = new BTreeNode<T>(obj);
         return;}   
         the error i am getting says that
    "The method setRight(BTreeNode<T>) in the type BTreeNode<T> is not applicable for the
    arguments (T)"
    or "The method setLeft(BTreeNode<T>) in the type BTreeNode<T> is not applicable for the
    arguments (T)"
    I had a similar question before and someone showed me where i had forgotten to parameterize my runner variable. I am thinking that this will be along the same lines although i cant imagine what it could be. The runner is already said to be part of BTreeNode<T> and setLeft and setRight are defined in the BTreeNode class so i wouldnt think that would be the problem. Anyway thanks for the time hopefully someone can help me with this.
    -peter

    Im setting up an insert() for a binary tree. Ceci already posted a solution to your problem, but may I suggest a different approach to your insert method? Trees are made for recursion!
    public class BasicBTree< T extends Comparable <T> > implements BinaryTree<T> {
        private BTreeNode<T> root;
        public BasicBTree() {
            this.root = null;
        public void insert(T item) {
            BTreeNode<T> newNode = new BTreeNode<T>(item);
            if(root == null) {
                root = newNode;
            else {
                insert(root, item);
        // private "helper" method
        private void insert(BTreeNode<T> currentNode, T item) {
            int difference = currentNode._data.compareTo(item);
            if(difference < 0) {
                // IF 'currentNode' has a left node
                //    Recursively call this method using the
                //    left node of 'currentNode' and 'item'
                //    as parameters.
                // ELSE
                //    Set the left node of 'currentNode' here.
            else if(difference > 0) {
            else {
                System.out.println ("Object was found in tree and will not be inserted");
    }

  • Noob question about Airport

    I have one of the early G5 PowerMacs (single 1.6 gHz). It currently doesn't have an Airport card, but I'd like to install one or an equivalent. Here's my two questions:
    1.) Are all G5s compatible with Airport Extreme cards?
    2.) Are there good third party alternatives out there?
    I wish Apple would be clearer about what systems are "Airport Extreme Ready".
    Thanks in advance!

    The Airport "Extreme" card for your G5 is here
    http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore.woa/wo/1.RSLID?mco=3 93BD37&nplm=M8881LL%2FA
    An alternative here but no cheaper
    http://www.macwireless.com/html/products/11g11bcards/11gPCI.php

  • Noob question about HDR images

    hi everybody! i am reading this book about photoshop hoping to understand a lot more than i already know about pixels and colors and image dinamics and such..i got to the chapter about HDR images and here's what i dont get. as i understand, given a HDR image it has 32 bit depth meaning its file contains much more information about contrast and brightness than any existing monitor can output, so when u open it in photoshop u will never see its true quality. my question is( and i admit it may seem pointless to some, but i am committed to understand the cause and purpose), when converting it to 8 or 16 bit depth this window pops up asking me to tweak gamma, exposure, shadows and highlights, etc., but why is this linked to the conversion process? why not simply convert it, maintain the same appearance as before and then if needed manually adjust using all the image controls from the photoshop menus? i have CS6, if that matters.

    I don't know if this will help, but I've heard about HDR monitors (still very expensive), which supposedly very accurately display the HDR values. If you hang one on the wall in your house, people might think it's a window, since it is literally a source of light, in the same way a window to the outside world is.
    Possibly the most surprising use of HDR imagery is in 3D apps where global illumination models are used. HDR imagery literally is the only source of light for these images. There are no lights in the scene, only HDR imagery. This is because of the great dynamic range of HDR.
    A more practical (to me) use of HDR is when resurrecting antique images. If you scan multiple exposures from old prints, then create HDR, sculpting values in 16-bit becomes a very powerful tool, only due to the HDR value range.
    Photoshop, although it can edit very well in 16-bit, can only show 8-bit representations of HDR imagery, since almost all monitors are 8-bits per channel. Because of the monitors, we can only see a small part of what is actually present in the HDR file.
    I've never done it, but I imagine that if we all had HDR monitors, we'd need to wear protective glasses (like you wear driving in your car when the sun is out) most of the time to do our work.  :+)

  • A noob question about precedence...

    Ok, here's the question.
    let's say:
    int a=0;
    a=a++;
    when a is evaluated, 0 is returned.
    isn's that expression like this?
    a=a=0;
    a=a+1;
    apparently I'm wrong.
    so if i forced a parentheses on it
    a=(a++);
    but again, a is evaluated as 0,
    I know how ++a would work, but i'm really curious about the suffix one.
    can any one explain to me?

    i mean how no matter what u do to
    a=a++
    i know in this case that a is evaluated first b4 it is added to 1,
    but it's gona add that 1 eventually right? so the evaluation of
    a in the en should be 1.
    Ah, I'm so confused, help

  • Noob question about DIV tags

    Learning DW and CSS so patience is in order .
    I've being reading numerous posts here and on the web about avoiding tables for laying out web pages. I can see the advantages in terms of cleaner codes and easiness of updating and changing sites at a later time. So I started learning about DIV tags (although tables is very easy for me) and have practice a few times with fairly good results, love the absolute positioning with it. Having said that, for the love of me, can't find a way of centering horizontally a page designed with DIV tags (due to ignorance), for example, 1 column/three rows page, after defining styles, size and colors I enclosed everything in another DIV tag, wrapper I think is called, but have not found a way of centering it on the page, text-aligment on the DIV tag only centers the text not the DIV itself, how to go about this? Help is appreciated.

    love the absolute positioning with it.
    Get over it.  It's a trojan horse.  Absolute positioning is not a general layout method.
    To center ANY block (non-absolutely positioned) element, use CSS to give it a width and left/right margins of 'auto'.  For example -
    <div id="foo">...</div>
    That div will be centered with this CSS -
    #foo { width:300px; margin:0 auto; }
    I think you are on the wrong path already, though.  Stick with tables (which you say are very easy for you) UNTIL you a) understand CSS well enough to understand what absolute positioning is and why I say it's bad, and b) understand how to use float, margin, and padding to place things on the page.  Then you are ready to move away from tables.

  • [SOLVED Noob question about web server permissions

    Hi I have setup up succesfully my web server. Now I am having some permission's questions/problems.
    First of all, I want the /home/httpd/home folder not to be show to the other machine users and only to root.
    I have created a user www-data and I have conf the apache file.
    This is my settings:
    My server directory is: /home/httpd and the permissions I have set:
    home dir:
    ~edited because solved~
    I have set .htaccess to some folders. I don't know If the permissions are safe or not. Can you help me?
    I think that I have different permissions to files and different to the folders...
    Thank you!
    Edited:
    And an example of my permission (phpMyAdmin):
    ~edited because solved~
    Last edited by k3rn31 (2008-02-28 22:26:09)

    This is more of a chat item for me, if you feel like it you can find me most of the time here at http://zaxter.org/xmpp.html if you have flash you can join via a simple click on connect.
    Sorry I've not been of much help to you.

  • Question about variables in TEXTCOLUMNS !!!HELP

    Hi friends,
    can somebody tell me if it is possible to put varaibles in textcolumns(VARCHAR2)
    like 'Das Fondsvolumen des Fonds betrdgt <Fondsvolumen>' (Fondsvolumen ist the variable--> which is a column of another table in the DB)
    into the database which will be evaluated when you query the column with the text????
    Is that possible and if yes how????
    thanxx
    Schobbi

    Schobbi,
    You could use a view for the
    selection part to replace
    your variables with the concrete
    values. Write a function that returns
    those values/the whole string and use
    it in this view, if you like.
    Hope this helps,
    Karsten

  • Ultra-noob question about creating clips

    Sorry if this is answered elsewhere - I don't even know where to look.
    I'm working on a simple editing project. I've sucked in (I forget the proper term) an entire DV tape of material into one big file. Now I'm trying to pick out the good shots and save them as separate clips - about 50 of them. These clips will then be converted to a different format and reassembled using some special software outside of FCE to create an interactive web video.
    There seem to be about a gajillion ways of doing this. Master clips, independent clips, sub-clips. Right now I'm having a problem with clip names because of the master/associate business. I want to organize individual clips into folders (Folder A -> Clips A1, A2, A3, etc). But when I try to name a clip, ALL the names change. And no amount of setting the clip as Independent seems to affect it. Not only that, but I'm so green I still can't figure out what to highlight - the clip in the timeline or the clip in the folder or both.
    Can someone point me in the right direction? I don't even know what to ask.

    G'Day ap0110,
    Welcome aboard the FCE forum.
    Here is another method:
    Double click the long clip in the Browser and it opens in the Viewer.
    Mark an In and Out point in the Viewer. You will have two black triangles facing one-another in the Viewer scrubber bar when completed. Notice the bit in between the triangles is lighter in color than the rest. This bit can be made into a re-namable Sub-Clip.
    Go to Modify> Make Subclip. Command-U (keyboard shortcut).
    The modified clip now appears in the Browser ready to be re-named. Enter new name.
    Do this as many times as required.
    Right click in the Browser and a pop up appears with an option to create a _New Bin_.
    Drag the newly named Sub Clips into a Bin of your choice.
    Al

Maybe you are looking for

  • Problem in using AVTransmit2 and AVReceive2

    Hello, I am very new to JMF. I start to work on it and i teke sample example from http://java.sun.com/products/java-media/jmf/2.1.1/solutions/AVTransmit.html and http://java.sun.com/products/java-media/jmf/2.1.1/solutions/AVReceive.html. In AVTransmi

  • I Tunes5 iTunes has encountered a problem and needs to close

    I can't get my iTunes 5.0.1 to work I tried everything... but i still can't get it to work.. i'm so angry...now... i use NIS 2005.. and i referred to all other replies listed on the content.. somebody please...help me.... I installed and deleted like

  • Safari is on the fritz. Yosemite

    Hey there, I'm wondering if anyone else is experiencing the issues I am with safari. I was hoping the most recent security update would've helped. I've no extensions on it, and I've cleared my website data. Issues are as follows. 1) I get logged out

  • Flash player version 11.700

    Ever since I  have installed Flash Player 11.700, I cant hear the voice from video's, except for the first 10 seconds. Pause the video and start, again the voice is heard for 10 seconds and lost. Please advise a solution.

  • Updating to 9.2.1

    Hello mac people, updating my blue imac 350 mhz from 9.1 to 9.2.1 and confused about the updates..Do i choose international 9.2.1 or North American 9.2.1 ? I live in North America but just want to make sure i'm downloading the right update..Does it e