Noob question very basic understanding of creating classes

After learing some scripts procedure that I have just begun to understand OBJECT oriented programming and have a problem with a basic like this stuff. Why my Try.as below does not work when I type Try (1); in the main file. Exit says: has no Type constraint: cannot convert 1 in Try

package {}
public class Try {}
public void Try(some:Number) {}
some += 1;
trace (a little);
}
}
}

use:

var s:Try = new Try (3);

Tags: Adobe Animate

Similar Questions

  • Very basic noob question on the foundations of the class

    I'm looking at this line of code:

    import flash.display. MovieClip;

    and realized that I have not seen anything else used instead of the word Flash in these lines. It made me wonder what it means. Are there any other alternatives? If so, what would it be? If not, why it should be included all the time when it is obviously the only choice?

    Sorry for noobish but question if there must be a quick explanation I really appreciate it.

    Thank you.

    This is the path to the class MovieClip (relative to the default path).  and Yes, there are other initial paths like fl (check the videoevent class).

  • Noob question - help to understand what variables public and private?

    As far as I understand public variable can be used in other classes. But how? I try this without a success:

    Create a class:

    package {}
    public class MyClass {}
    public var myVariable:Number = 5;
    public function MyClass() {}
    trace (myVariable);
    }
    }
    }

    Then, create another class:

    package {}
    public class TryThis {}
    public var myResult:Number = $myvariable;
    public void TryThis() {}
    trace (myResult);
    }
    }
    }

    and I got an error "undefined property myVariable" using this in the Flash file:

    var niceTry:TryThis = new TryThis();

    You will greatly appreciate your help.

    use:

    package {}
    public class myClass {}
    public var myVariable:Number = 5;
    public function myClass() {}
    trace (myVariable);
    }
    }
    }

    Then, create another class:

    package {}

    Import myClass;
    public class TryThis {}
    public var myResult:Number;
    public void TryThis() {}

    var mc:myClass = new myClass();

    Ditto = mc.myVariable;

    trace (myResult);
    }
    }
    }

  • Very Basic Primer on creating chapters

    I would like to receive recommendations as to what others have found the only clear explanation and simple most how to create some chapter headings in a book. I spent reviewed several sources on this, but constantly faced with questions...

    Owen,

    Luca

    Once you get straightened with styles, a unique style, named for the chapter titles and subtitles, used only for these two types of paragraphs, should allow you to implement running header variables based on the first occurrence of each of the styles. Search the current page ID, then back, until it finds the style in question, so that your head stays constant until one or the other model is repeated in the file.

  • FTP question; very basic

    I don't know how to configure FTP file transfer to start a Web download.

    Where can I get the information to fill in the fields?

    Help, please

    Screen shot 2009-12-08 at 1.57.27 AM.png

    It is another way to follow is SmugMug or Zenfolio. In fact my site has its own gallery, but connects also with my Smugmug Gallery for sales. Either way Lightroom has plugins that make it very convenient to download images SmugMug and Zenfolio:

    http://regex.info/blog/Lightroom-goodies

  • Scripting Question - very basic

    Hello, I use the trial version of InDesign and wonder if because it's the trial version that I can't load Adobe custom scripts?  I downloaded and installed a custom calendar script [I can see the files extracted in/on my PC] but the app apparently doesn't see it.  Any help you offer is greatly appreciated.  Thank you

    Do you have script thew somewhere that InDesign uses scripts? See How to install scripts in InDesign | InDesignSecrets

  • Entities does not Contribution - very basic question

    Hi guys,.

    My apologies for this very basic question: I am very new to Hyperion, with just one week of training! Anyway, I'm building a basic model and have noticed that my features are not in the dimension value roll altogether the [Contribution]. This means that entities do not roll upwards!

    It was suggested that problem was that I needed a Sub consolidate in the rules, but I put the attribute 'ConsolidationRules' = n. In the documentation it is defined as "N to use the consolidation by default and eliminations".

    I was wondering is there anything else that is needed to use default groups, or do I need to create rules?

    Thank you
    G

    Why do you think that's not driving? If your building rules are set to "n" you don't need rules.

    Make sure that your presentation was made to IsConsoldiate. Make sure that you're displaying a "Parent.Child" to total Contribution.

  • A very basic newbie question, sorry: where is the documentation for the presets?

    Hello

    I am writing some ExtendScript to do some tasks fairly banal export and, so far, it makes a lot of sense... but...

    I keep on having spend loads of time googling for names of constant classes with the relevant presets.

    Y at - it a correct, indexed and searchable reference of InDesign scripting library, somewhere? PLEASE, I BEG YOU!

    Thank you

    G

    Where everyone was as frustrated by what I was, and I know that this exposes my ignorance but...

    1. in ExtendScript, F1 to open help.

    2. Select the product you are developing against in the help panel.

    3. Google what you want to do and, if you're lucky, you will find an object type or method name for try the search against

    (4 use the search help and I hope to whatever you hold dear that has you) corresponds to something useful and b) do not match too (both cases will cause absolutely no useful data)

    This will give you some (but very basic) syntax searchable guides... Buyer beware...

    Syntax guides do not, for example, distinguish (or provide details of) the difference between the IDS server or Office IDS and method signatures are different...

    Incomplete, awkward and a little difficult to use, but at least it is the documentation...

    G

  • Very basic question I think?

    Hi im very new to flash, but I'm looking to learn more about it, I tried to use the pre-built Flash components and I was just wondering where and how you can retrieve the values in the boxes checked

    I know how to check using the 1 box

    If (instancename.value = true) {}
    trace ("box has been checked");
    }

    but I want to run through a series of 5 boxes and retrieve all the labels in a first time, I can probably work on verification, if they are checked, but all the I get filament is not set which, I guess, no value.

    This is the code I used to try to recover all the labels of each box at the press of a button

    We (Release)
    {
    trace ("clicked");
    var i = 1;

    While (I < 5) {}
    trace ("Running while");
    i ++ ;
    trace ( check box. Label);
    trace (i);


    }

    }

    It would be more appreciated if someone could point me in the right direction for tutorials very basic on the flash components that I could find only the macromedia livedocs that I have not found a lot of help as his technique to speak which I am not yet familiar with...

    Thank you Pinky

    Hmm, I hate these sensitive submit buttons when they take too long to process your response if you click it again and it deals twice so it seems you spamming the forums: S lol

  • D.I. box noob question

    Hi all

    Sorry for the noob question, but I need something clear up if possible. I was about to buy a box for injection and then had a query on them, and if I actually could benefit in this scenario...


    Fig 1. is how I currently record.

    Fig 2. is how I would do it with di direct box

    diag.jpg

    My question is... in this configuration, the d.i. box would make a difference to the signal? or he would only make a difference if I was going to live guitar to box, the sound card?

    Thank you for all your help.

    In my opinion you have basically three alternatives for the recording of the guitar:

    1. get an amp excellent sound, recording with a microphone, or more, in a room of good survey.

    Challenges: you'll probably need a studio proper, or at least no neighbours, because it could become LOUD. It takes time and experience of mike a good amp and even microphones expensive (several). Result depends on the acoustics of the room more than you think.

    Another way here, is to get/build an isolation area around your amp, which will be a kind of micro studio for it, allowing you to play hard and with a good tone, but in a more controlled environment. Many advantages for this make. Unfortunately, the expense can also be 'pro' - but I don't know there are DIY solutions.

    2. record of the amp 'dry' via either its line (send FX will also) or use a ' soaking power allowing you to put the amp (some sounds so much better AMPS), but with a low volume in the room. You can connect the device of soaking directly, or give the speaker the "tame" signal and mike the amp without disturbing the neighbors that it now. Good power soaks don't come cheap (?). Dry recording, for example by not using mike, often sounds like this: dry. It depends on your style of music, but an electric guitar should probably be considered an acoustic instrument. Instead of a diaphragm in wood, it has a speaker. The sound, often, we want to achieve is an amp of good sounding in a good room, which is an acoustic sound. You simply cannot get to an exit row or direct to a soaking of output power (not president). He needs treatment.

    3 use a program like GuitarRig, Amplitube etc. No installation required, regardless of the size of the room and acoustic sound (except that the acoustics of the room always will affect listening!) or mike. The software simulates the amps, effects and even mic configurations; added the "airplane" that you will not get a direct connection. Once again, according to your style. If I were Bill Frisell or Jim Hall, i.e. anyone with an as most of their music very "naked" guitar sound, I probably does (but these guys have access to the great engineers too...), but in a pop idom / mixed rock with other instruments and certainly to do demos, that's actually what I would recommend. Especially for us space challenged who have neighbors and an infinite time either. No, you will not look like 'all the world'; It's garbage in French - garbage out as always (many are disappointed by the present, but some are happy, it is always the case)

    All you need is a sound card with an instrument of entry. If you have a * good * sound card already who is not entered instrument, you can consider a DI box. Otherwise I'd say it's redundant.

  • Question very, very based on QML...

    I'm new to BB10 development and I have read on the provided tutorials and reference materials. As the title of my post, I have a very basic question for QML who may have a not so fundamental response:

    Just what exaclty QML can be used for? Literature in the documentation seems to suggest in places that QML is used for user interface elements scripts, while behind the scenes is done by code written in C++. Other documentation seems to hint that an application can be written in QML although the only examples I've seen of this apps that really only window UI elements.

    I guess that a shorter question would be: can I write a useful application entirely in QML without ever touching the C/C++?

    On a related note, when someone says that they wrote the app in "cascades", what are they referring to? Is the sequel to stunt development? It is referring to the use of QML / C + c++ / QT?

    You can think of as an extension of Qt which allows a more sophisticated user interface specially design for phones BB10 Cascades.

    QML we can consider, at its simplest, as a way to describe how you want to place controls on the screen.

    Where it gets complicated is the ability to use JavaScript in the QML himself file.

    So yes, it is possible to write completely competent applications entirely in QML/JavaScript and do not write any C++.

    A good starting point is the free to download the book of development...

    http://supportforums.BlackBerry.com/T5/social-lounge/free-BlackBerry-10-development-eBook/TD-p/28358...

  • Noob question: Playbooks all have the same performance?

    I know... noob question. I am to complete my first game PlayBook and before I submit the app store I wanted to make sure that hardware performance will be the same on all the playbook or will it be something because of the performance issues on a per-device basis? I hope that this will be similar to a console where you can expect stable performance. THX.

    All devices (currently) work the same in the same conditions.

    That does not mean, however, that you can treat it as a console.  A console runs only a game and nothing else (in general).

    The PlayBook can run multiple applications, and among other things, a user can 'Behavior of the Application' setting configuration Mode Showcase, default, or standby, what determines if your application runs or stops when it is idle.  If they are in window mode, they may have other things at the same time.

    To a first approximation, however, "even in the world" is probably correct, for now.  Don't forget there will be different tablets in the future, with specification different but compatible with your app... not quite like a console there where many games is basically orphaned (or requires a port) when a new generation comes out.

  • Noob question: autonomous AIR .bar files?

    Sorry for the noob question, yet to learn these things from the air. When we create a .bar file, it is the only file position, does it include the runtime air, flash, etc, etc, or is it always require an accumulation of air / flash runtimes on the device? THX.

    The .bar file does not include the time of execution because the runtime is already preinstalled on the Playbook.

    Air is really integrated into the PlayBook so you don see the difference between a native app or an Air application.

  • [noob question] I want to fold a 3D object to the inside

    Hello!
    I'm fairly new to Illustrator and I won't use it much, but I tried to do this for hours now.
    Google is not really help me, especially because I don't really know what I'm looking for.

    So I want to bend to this object a little half-moon.
    I drew a few beautiful black lines to show what I mean.
    You want to guide me with a link or just a quick explanation?

    You do not have to post a full-on guide that takes you a long time to write, is really just a hint in the right direction! :-)

    http://postimg.org/image/5l4aukip3/

    Illustrator is a 2D drafting software. It's 3D effect is just a very basic and limited.

    3D effect can extrusions straight and circular turns (turns). It cannot create the desired shape by extrusion of pipeline (scanning of rectangular section on a track in U-shape). So, start with a U-shaped path (closed, filled, outline) and then make a right extrusion on it.

    JET

  • As a beginner, it's very basic, I imported my address book apparently ok, but I'm having a problem trying to address an e-mail to the address book in

    As a newbie it is very basic, I imported my address book apparently ok, but I'm having a problem trying to address an e-mail to the address book in the address field, I'm a right click, left click, but no list of addresses appearing or contact component which I should be able to see all the entries in my address book. What am I doing wrong please?

    Open a window of writing and press F9 to activate the touch pane.

Maybe you are looking for