Classes and Movieclips question

Hey
I'm just wondering, how do I use/call (say... modify the y
coordinate) of a MovieClip that is placed on the stage, in a parent
class of the Document class?

Fuc*in kglad, I love you man. You ended a week long feud I
had with flash because I couldn't get this to work. I'm so happy
about this, it feels so nice to be able to work on my game again
and suddenly a huge part of flash just made sense.
I greatly appreciate your help. Thanks mate :).
For those who may have stumbled across this thread who have
the same problem (it really isn't a problem, but more of a lack of
knowledge of something specific), here is what you have to do:
In my document class I have this function:
[code]
public function CallBaseEngine():void {
helloPerson(player);
[/code]
Now in a parent class of the doucment class (meaning that the
document class "extends" to this class I have this:
[code]
public function helloPerson(player):void {
player.x = 999;
[/code]
player being simply the instance name of a movieclip I have
on the stage.
So what does this code mean for the n00bies? Well in the
first block of code I am simply calling a function called
helloPerson which is located in a parent class, remember children
can "access" their parents but parents can't "access" their
children so if I did the same thing but tried to call a function in
the child class I would get an error saying its not found. However,
you put "player" in the brackets which means that you want to bring
the movieclip with an instance name called player through with you
on your way to call the function helloPerson.
In the second block of code, I am quite simply modifying
where the player movieclip is along the x axis, this is to make
sure that I can access the movieclip called player and the code is
properly working. Bringing along doesn't mean we create a
"duplicate" or anything, it basically is bringing along the
permission to access player.
Thanks again kglad!

Similar Messages

  • Document Classes and other Questions

    Basically, i am working on an application that will eventually be deployed to the desktop as an AIR application.
    I am wanting to create an Analogue clock and Digital clock with a button that toggles the display between either one when pressed. As well as this, i will be wanting to display the Date below, i am having a number of issues however.
    I have the code sorted for three of the four components, i have not attempted to figure out the button thus far as i would be more than happy to have the digital clock, analogue clock and date all being displayed on a drag and drop desktop application first. When i say i have it sorted, i have a fully working analogue clock which i have managed to display on the desktop through air on its lonesome, however, i did not include the drag and drop function. For the digital clock and date components i am not sure how to configure them into document classes. The main issue i am having is i do not know if you can reference a dynamic text box within a movie clip to a document class.
    This is the code to show the date
    [code]{
    var currentTime:Date = new Date();
    var month:Array = new Array("January","February","March","April","May","June","July","August","September","Octo ber","November","December");
    var dayOfWeek:Array = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
    date_text.text = dayOfWeek[currentTime.getDay()] + " " + currentTime.getDate() + " " + month[currentTime.getMonth()] + " " + currentTime.getFullYear();
    [/code]
    I have put the actionscript frame inside the movie clip file, and i have given both the movie clip, and the dynamic text box within the movie clip the instance name "date_text".
    Basically, i am just struggling in how to put this code into a working document class, since the digital clock and date functions are both, some what similar, i feel the solution to one will more than likely lead to me discovering the solution for the other.
    The other problem i am having, i do not know how i will display all of the components on one air application. I am assuming, that you create one other document class file which links the other four together? i have tried to do this by just linking a new FLA file with the analogue clock, but it does not work. The code for that is below.
    [code]package
              import flash.events.Event;
              import flash.display.MovieClip;
              public class time1 extends MovieClip
                        public var now:Date;
                        public function time1()
                                  // Update screen every frame
                                  addEventListener(Event.ENTER_FRAME,enterFrameHandler);
                        // Event Handling:
                        function enterFrameHandler(event:Event):void
                                  now = new Date();
                                  // Rotate clock hands
                                  hourHand_mc.rotation = now.getHours()*30+(now.getMinutes()/2);
                                  minuteHand_mc.rotation = now.getMinutes()*6+(now.getSeconds()/10);
                                  secondHand_mc.rotation = now.getSeconds()*6;
    [/code]
    That is the original clock document class (3 Movie clips for the moving hands, and the clock face is a graphic, which i may have to reference somehow below)?
    [code]package
              import flash.display.MovieClip;
              public class main extends MovieClip
                        public var hourHand_mc:time1;
                        public var minuteHand_mc:time1;
                        public var secondHand_mc:time1;
                        public function main()
                                  hourHand_mc = new SecondHand();
                                  addChild(mySecondHand);
                                  hourHand_mc.x = 75;
                                  hourHand_mc.y = 75;
                                  minuteHand_mc = new SecondHand();
                                  addChild(mySecondHand);
                                  minuteHand_mc.x = 75;
                                  minuteHand_mc.y = 75;
                                  secondHand_mc = new SecondHand();
                                  addChild(mySecondHand);
                                  secondHand.x = 75;
                                  secondHand.y = 75;
    }[/code]
    This is my attempt at creating the main document class in a seperate FLA file to attempt to load the analogue clock, and later on the Digital Clock, Date Function and Toggle Display button in the same AIR application.
    Any help on this is much appreciated, i have been reading up a lot on it through tutorials and the like, but i can't seem to fully grasp it.

    why do you have code in a movieclip?
    if you want to follow best practice and use a document class you should remove almost all code from timelines.  the only timeline code that might be reasonably used would be a stop() on the first frame of multiframe movieclips.
    so, you should have a document class.  that could contain all your code but it would be better to just have your document class create your 2 clocks and date objects and possibly manage toggling between the two clocks.  you could have a separate class the tracks the time and date and that class is used by your two clock classes and your date class.

  • Recover informations between Class and MovieClip

    Hello,
    I have a page (MovieClip) which is charger and have a attribut a matrix (not the class). On this page, there is some cases (MovieClip) which receive value of the matrix.
    Each cases are managed by Class. It's a good option, because I can put a listener into the contructor of the class and not having 64 functions if I have 64 cases. This listener allows to change the value of the cases when it clicked.
    The problem is that I don't see how to know when a case is clicked in the page for changing the value of the matrix.
    Regards,

    I have a MovieClip called "Level" and I have created a Class "Level" and a Class "Matrice". The "Level" Class has an attribute mat:Matrice. The "Matrice" Class has a dimension and a 2 dimension array (If dimension = 2, you have a 2x2 matrix).
    On the Level MovieClip, you have several Case MovieCLip. I also created a "Case" Class for managing the listener.
    And when I clicked on a Case, the text value changed but I can not update the Matrice in the Level Class.

  • Classes and Methods question

    Hi
    I have a class called Users that i would like to use .... well to store users in the db, i would like to be able to call form the servlet:
    users.addUser(user); or users.deleteUser etc ...
    My question is:
    Do i need a new class eg. addUser that implements TransactionWorker for each method? Or can I do that directly from a method call?
    Regards
    ALex

    HI Alex,
    If you are storing a single record, normally you don't need to use a TransactionWorker, since auto-commit will be used implicitly.
    If you are storing multiple records per transaction, then the TransactionWorker will be at a higher level and will call multiple methods to add/modify/delete records.
    In any case, a TransactionWorker class per method is not normally the right approach.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Question about abstract classes and instances

    I have just read about abstract classes and have learned that they cannot be instantiated.
    I am doing some exercises and have done a class named "Person" and an abstract class named "Animal".
    I want to create a method in "Person" that makes it possible to set more animals to Person objects.
    So I wrote this method in class Person and compiled it and did not get any errors, but will this work later when I run the main-method?
    public void addAnimal(Animal newAnimal)
         animal.add(newAnimal);
    }Is newAnimal not an instance?

    Roxxor wrote:
    Ok, but why is it necessary with constructors in abstract classes if we don�t use them (because what I have understand, constructors are used to create objects)?Constructors don't create objects. The new operator creates objects. An object's c'tor is invoked after the object has already been created. The c'tors job is to initialize the newly-created object to a valid state. Whenever a child object is created, the parent's c'tor is run before the child's c'tor, so that by the time we're inside the child's c'tor, setting up the child's state, we know that the parent (or rather the "parent part" of the object we're initializing) is in a valid state.
    Constructor rules:
    1) Every class has at least one ctor.
    1.1) If you do not define an explicit constructor for your class, the compiler provides a implicit constructor that takes no args and simply calls super().
    1.2) If you do define one or more explicit constructors, regardless of whether they take args, then the compiler no longer provides the implicit no-arg ctor. In this case, you must explicitly define a public MyClass() {...} if you want one.
    1.3) Constructors are not inherited.
    2) The first statement in the body of any ctor is either a call to a superclass ctor super(...) or a call to another ctor of this class this(...) 2.1) If you do not explicitly put a call to super(...) or this(...) as the first statement in a ctor that you define, then the compiler implicitly inserts a call to super's no-arg ctor super() as the first call. The implicitly called ctor is always super's no-arg ctor, regardless of whether the currently running ctor takes args.
    2.2) There is always exactly one call to either super(...) or this(...) in each constructor, and it is always the first call. You can't put in more than one, and if you put one in, the compiler's implicitly provided one is removed.

  • Question about Classes, Abstract  Classes and Interfaces.

    I have been experimenting with Classes, Abstract Classes and Interfaces and wonder if anyone can explain this to me.
    I was looking for a way to assign a value to a variable and then keep it fixed for the session and have devised this.
    First I create an abstract class like this:
    public abstract class DatabaseConnection {
    private static String ServerName = null;
    public static void setServerName(String serverName) {
              ServerName = serverName;
         public static String getServerName() {
              return ServerName;
    }and then I created an interface
    public interface DatabaseAccess {
         String servername = DatabaseConnection.getServerName();
    }And finally the class itself with some test lines in it so I could see what was going on:
    public class CreateDatabase extends DatabaseConnection implements DatabaseAccess {
         public static void main (String args[]){
              new CreateDatabase();
         public CreateDatabase(){     
              setServerName("Server Name 1");
              System.out.println ("Before update ");
              System.out.println ("ServerName from Interface           = " + servername);
              System.out.println ("ServerName from Abstract Class = " + getServerName());
              System.out.println ("After update ");
              setServerName("Server Name 2");
              System.out.println ("ServerName from Interface           = " + servername);
              System.out.println ("ServerName from Abstract Class = " + getServerName());
              System.out.println ("==========================");
    }The output I get from the above is:
    Before update
    ServerName from Interface           = Server Name 1
    ServerName from Abstract Class = Server Name 1
    After update
    ServerName from Interface           = Server Name 1
    ServerName from Abstract Class = Server Name 2
    ==========================I also tried this in another class which calls the above class to see if I get the same effect
    public class CheckDatabaseAccess {
         public static void main (String args[]){
              new CreateDatabase();
              CreateDatabase.setServerName("Server 3");
              System.out.println("CreateDatabase "+CreateDatabase.servername);
              CreateDatabase.setServerName("Server 4");
              System.out.println("CreateDatabase "+CreateDatabase.servername);
              CreateDatabase.setServerName("Server 5");
              System.out.println("CreateDatabase "+CreateDatabase.servername);
    }The output of which is this:
    Before update
    ServerName from Interface           = Server Name 1
    ServerName from Abstract Class = Server Name 1
    After update
    ServerName from Interface           = Server Name 1
    ServerName from Abstract Class = Server Name 2
    ==========================
    CreateDatabase Server Name 1
    CreateDatabase Server Name 1
    CreateDatabase Server Name 1Can anyone explain why I appear to only be able to change or set the ServerName only the once?
    Is this the correct way to do it? If it is it's exactly what I am looking for, a way to set the value of variable once in a session and then prevent it being changed.
    Or is there a better way of doing this.
    What I want to use this for is for example, storing the accesses to a database on a server. I won't know what server the database will be stored on nor what the database is called so I create an INI file which stores this information in encrypted format, which is set by the database administrator. It occurs to me I can use this method to then retrieve that data once and once only from the INI file and use that throughout the life of the session to access the database.
    Any help appreciated
    Regards
    John

    Not gonna read all of it, but this jumps out:
    public abstract class DatabaseConnection {
    private static String ServerName = null;
    public interface DatabaseAccess {
         String servername = DatabaseConnection.getServerName();
    }You have two completely separate variables (with two different names, for that matter, since you were inconsistent in your capitalization, but it wouldn't make a difference if they did have the same name with the same case). And the one in the interface is implicitly public, static, and final.
    Anytime you refer to "servername" through a reference of type DatabaseAccess, it refers to the one declared in the interface.
    Anytime you refer to "ServerName" inside the DatabaseConnection class, it refers to the one declared in that class.

  • XML file in the form of .config file how to convert it to class and store it in single object

    Hi,
    I have a config file in which i have to convert it to class and get an object.
    example:
    <?xml version="1.0" encoding="utf-8" ?>
    <xyz xmlns="">
      <Container name ="Basic">
        <Connectivity user="" server="" protocol="udp"/>
        <Connectivity user="" server="" protocol="udp"/>
      </Container>
      <Container name ="Cp">
        <settings version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.counterpath.com/cps">
          <domain name="audio">
            <section name="headset">
              <setting name="audio_in_agc_enabled " value="1"/>
            </section>
            <section name="incoming">
              <setting name="use_agc" value="1"/>
            </section>
            <section name="vad">
            </section>
          </domain>
          <domain name="system">
            <section name="qos">
              <setting name="audio" value="tos 46"/>
            </section>
            <section name="dtmf">
              <setting name="force_send_in_band" value="0"/>
              <setting name="minimum_rfc2833_play_time" value="40"/>
            </section>
            <section name="network">
              <setting name="dtx_enabled" value="0"/>
            </section>
            <section name="diagnostics">
              <setting name="enable_logging" value="1"/>
              <setting name="log_level" value="Error"/>
            </section>
            <section name="general">
              <setting name="add_OS_version_to_user_agent_header" value="1"/>
            </section>
            <section name="indialog_notify">
              <setting name="enable_indialognotify" value="1"/>
            </section>
          </domain>
          <domain name="rtp">
            <section name="2833">
              <setting name="enabled" value="1"/>
              <setting name="packet_time_in_ms" value="60"/>
              <setting name="payload_number" value="101"/>
            </section>
            <section name="inactivity">
              <setting name="timer_enabled" value="0"/>
            </section>
          </domain>
          <domain name="proxies">
            <section name="proxy0">
            </section>
            <section name="proxy1">
            </section>
          </domain>
          <domain name="ggg">
            <section name="device">
              <setting name="use_headset" value="1"/>
              <setting name="rrr" value="1"/>
              <setting name="eee" value="480"/>
              <setting name="eme" value="hhh"/>
              <setting name="headset_name" value="vvv"/>
              <setting name="manual_audio_devices_configure" value="0"/>
              <setting name="audio_in_device" value=""/>
              <setting name="audio_out_device" value=""/>
              <setting name="ringer_device" value=""/>
            </section>
            <section name="system">
              <setting name="export_settings" value="EndpointSettings.xml"/>
              <setting name="enable_export_settings" value="0"/>
              <setting name="log_level_AbstractPhone" value="0"/>
              <setting name="log_level_Audio" value="0"/>
              <setting name="log_level_Auto Configuration" value="0"/>
              <setting name="log_level_CCM" value="0"/>
              <setting name="log_level_Conferencing" value="0"/>
              <setting name="log_level_Contacts" value="0"/>
              <setting name="log_level_DNS" value="0"/>
              <setting name="log_level_GUI" value="0"/>
              <setting name="log_level_Jitter" value="0"/>
              <setting name="log_level_Licensing" value="0"/>
              <setting name="log_level_Media" value="0"/>
              <setting name="log_level_Privacy" value="0"/>
              <setting name="log_level_RTP" value="0"/>
              <setting name="log_level_STUN" value="0"/>
              <setting name="log_level_Security" value="0"/>
              <setting name="log_level_Storage" value="0"/>
              <setting name="log_level_Transport" value="0"/>
              <setting name="log_level_USB Devices" value="Info"/>
              <setting name="log_level_Utilities" value="0"/>
              <setting name="log_level_Video" value="0"/>
              <setting name="log_level_Voice Quality" value="0"/>
              <setting name="log_level_XMPP" value="0"/>
              <setting name="log_level_Endpoint" value="6"/>
            </section>
            <section name="beeptone">
              <setting name="play_locally" value="0"/>
              <setting name="enable_beeptone" value="1"/>
              <setting name="beeptone_file" value="beep.wav"/>
              <setting name="beeptone_timeout" value="30000"/>
            </section>
            <section name="dtmf">
              <setting name="play_locally" value="1"/>
              <setting name="pause_start_stop_dtmf" value="100"/>
            </section>
            <section name="control">
              <setting name="auto_answer" value="0"/>
            </section>
            <section name="ctrol">
              <setting name="auto_ans" value="0"/>
            </section>
          </domain>
        </settings>
      </Container>
    </xyz>
    Please help me out in creating an object from it.
    Thanks,
    Hiranmayee

    It's one of those things you usually start from the other end.
    IE with a class and then serialise / deserialize to xml.
    Because you have a namespace in there:
    <settings version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.counterpath.com/cps">
    I think you will find linq to xml will have issues with that.
    You could still use xpath to pick data out of there and there's been a thread on the c# forum recently which is relevent:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/2dc0581e-f2fd-4fd3-89ee-e59280c398e6/read-xml?forum=csharpgeneral
    Why do you want to turn that into an object?
    By the way.
    This isn't a wpf question and you should probably have posted it on the c# forum.
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • Class override, how to create the child class and then the base class

    I started to write a program for a smart DMM, the problem is every version of the DMM the company change the communication commend.
    My idea is to write a child class for every DMM version and every SubVI of the child will override the base class SubVI.
    My problem is, i want first to create one child class and after i will see every thing is work,  start to create the base class. that way i will see if am thinking the right way.
    My question is
    How can i create a child class and then create the base class and configure the SubVi of the child class to be Override of the base class?
    I tried to search in the property of the class but i didn't see nothing.
    Thanks
    Solved!
    Go to Solution.

    This can be done and I've done it on occasion.
    You simply create the base class with the dynamic dispatch methods you require (connector panes need to be identical to thos of the child class).
    Then set the inheritance of the class to inherit from this base class.  If your method is defined as a dynamic dispatch method in the parent, you'll most likely now have some errors (unless your child method was already DD in which case you might just be OK already).
    To change the inheritance of a class, right-click the properties of the class in your project and select properties.  I believe the ineritance tree is at the lower end of the properties.  Click on the "change inheritance" (or something similar) to choose the class from which you now wish to inherit.
    Say hello to my little friend.
    RFC 2323 FHE-Compliant

  • I don't know what's wrong with my code. it's about class and object.

    * This is generic type of Person
    package myManagement;
    * @author roadorange
    public class Person {
    private String SS;
    private String firstName;
    private String lastName;
    private String middleName;
    private String phoneNumber;
    private String address;
    private String birthDay;
    public void setSS (String SS) {
    this.SS = SS;
    public String getSS() {
    return SS;
    public void setFirstName (String firstName) {
    this.firstName = firstName;
    public String getFirstName() {
    return firstName;
    public void setLastName (String lastName) {
    this.lastName = lastName;
    public String getLastName() {
    return firstName;
    public void setMiddleName (String middleName) {
    this.middleName = middleName;
    public String getMiddleName() {
    return middleName;
    public void setPhoneNumber (String phoneNumber) {
    this.phoneNumber = phoneNumber;
    public String getPhoneNumber() {
    return phoneNumber;
    public void setAddress (String address) {
    this.address = address;
    public String getAddress() {
    return address;
    public void setBirthDay (String birthDay) {
    this.birthDay = birthDay;
    public String getBirthDay() {
    return birthDay;
    public void Person() {
    SS = "1234567890";
    this.firstName = "abc"; //test the keyword "this"
    this.lastName = "xyz";
    middleName = "na";
    phoneNumber = "123456789";
    address = "11-11 22st dreamcity ny 11111";
    birthDay = "11-11-1980";
    public void print() {
    System.out.println("Display Database\n"
    + "Social Security Number: *********" + "\n"
    + "First Name: " + getFirstName() + "\n"
    + "Middle Name: " + getMiddleName() + "\n"
    + "Last Name: " + getLastName() + "\n"
    + "Phone Number: " + getPhoneNumber() + "\n"
    + "Address: " + getAddress() + "\n"
    + "getBirthDay: " + getBirthDay() );
    package myManagement;
    //this class is used to test other class or test other object
    public class testClass extends Person{
    public static void main(String[] args) {
    Person obj1 = new Person();
    obj1.print();
    System.out.println(obj1.getFirstName()); //test the object
    Result:
    Display Database
    Social Security Number: *********
    First Name: null
    Middle Name: null
    Last Name: null
    Phone Number: null
    Address: null
    getBirthDay: null
    null
    i don't know why it's all null. i assign something in the default constructor. it shouldn't be "null".
    does anyone know why?

    when you create 2 class using netbean editor, person.java and test.java
    i never compile person.java.
    when i finish typing these 2 class and i just right click test.java and run.
    my question is do i need to compile person.java before i run test.java directly??
    does Netbean compile it automatically when i run test.java first time?
    i add another constructor Person constuctor with one parameter in Person.java and create 2nd object to test the 2nd constuctor and run.
    All the codes work, so does the first default constructor. i don't why is that.
    Then i removed what i added and restore back to where it didn't work before and test again. it works.
    @_@. so weird.
    problem solved. thank you
    Edited by: roadorange on Feb 25, 2008 7:43 PM

  • What is the difference between document class and normal class

    Hi,
    Please let me know what is the difference between document class and normal class.
    And I have no idea which class should call as document class or call as an object.
    Thanks
    -Actionscript Developer

    the document class is invoked immediately when your swf opens.  the document class must subclass the sprite or movieclip class.
    all other classes are invoked explicitly with code and need not subclass any other class.

  • Class and it methods

    Hello Experts my name is latha I am new to abap objects can any one help me in detail how to implement a class and its methods

    Welcome to SDN Forum latha.
    Please read [Rules for Asking & Answering in the Forums|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement].
    The first thing to do is try to find through the search tool for "ABAP Objects", you'll find various interesting materials.
    Also take a look at [ABAP Objects Wiki|https://wiki.sdn.sap.com/wiki/x/o5k] section where you can see information, links and several examples from [beginner to advanced|https://wiki.sdn.sap.com/wiki/x/Aq].
    Don't forget to close this thread once your question be answered
    Greetings,
    Marcelo Ramos

  • Loading XML using a custom class and accessing it from other classes?

    I began with a class for a movie clip rollover function
    FigureRollOver. It works marvellously. Three things happen:
    1) it loads XML from a file "mod1_fig1.xml" and uses another
    class, XMLMember, to retool the scoping of the XML so that I can
    get at it
    2) an onload call inside of XMLMember calls the myOnLoad
    function and transfers the XML into an array.
    3) so long as the array is finished building, rolling over a
    movie clip attaches a new movie clip with the rollover text in it.
    But I don't want all those functions in one because I need it
    to be more dynamic, starting with being able to load any old xml
    file instead of just "mod1_fig1.xml", plus it seems like
    overbuilding to have all of that in one class, so I've separated
    out the loading of the XML and building of the array into its own
    class, FigureXMLLoader. FigureRollOver is then left to just attach
    the rollover with text in it, extracted from the array built by the
    new class.
    Problem is, though the array builds inside FigureXMLLoader, I
    can't figure out how to make it available outside the class. I know
    that I'm constructing things in the wrong order, and that the array
    needs to be somehow built inside the class function to be
    available, but I can't figure out how to do that. A cruddy
    work-around is to put a function call at the end of the building of
    the array, which calls yet ANOTHER function on the main timeline of
    my .swf to put the array I've just built into a new variable. This
    works, but it's messy. It seems like I should be able to have one
    line of script in the .swf that generates an array on the main
    timeline (or just a public array) which I can then access from my
    FigureRollOver class:
    var myRollOvers:Array = new FigureXMLLoader("mod1_fig1.xml");
    Here is FigureXMLLoader (see comments in the code for more
    details) which obviously does not return an array as it is, because
    of all the working around I've had to do. Note the "testing"
    variable, which can be traced from the main timeline of the .swf,
    but I will get "not what I want" because of course the array hasn't
    been built yet, and never will be, inside of the declaration as it
    is. How do I get it in there so I can return an array?
    Thanks!

    Suggest you ask this question in the Actionscript forum as
    this forum is
    more tuned to database integration questions.
    You can create arrays outside a class and pass them into it
    by reference and
    visa versa build arrays inside a class and pass out via
    reference.
    The preferred approach is to place the array in a class and
    not expose it.
    Then add methods to use the array or should we say to use the
    class.
    Lon Hosford
    www.lonhosford.com
    Flash, Actionscript and Flash Media Server examples:
    http://flashexamples.hosfordusa.com
    May many happy bits flow your way!
    "maija_g" <[email protected]> wrote in
    message
    news:ed4i43$9v0$[email protected]..
    > Update: I've now put this on the main timeline of the
    .swf:
    >
    > myRollOversLoaded = false;
    > var myRollOvers:Array;
    > var roll_content = new FigureXMLLoader("mod1_fig1.xml");
    >
    > And inside the "myOnLoad" function in FigureXMLLoader,
    just after the
    > while
    > loop I've put this:
    >
    > _root.myRollOversLoaded = true;
    > _root.myRollOvers = figure_arr;
    >
    > The movie clip rollover won't act until
    myRollOversLoaded is true. It
    > works,
    > but it still seems klugey. Any suggestions for a more
    elegant solution
    > would be
    > appreciated.
    >

  • Can I create a class and package for my inframe AS and access it global

    Ls,
    I made an app using only inframe actionscript in a .fla;
    transfrerring variables from frame 1 to frame 2 is unreliable.
    Some sources say the persist over frames but i found that not to be reliable.
    Arrays seem to be filled with the right values. Normal int vars declared in frame 1 fail some time.
    You should have used classes i hear you say,  and right you are.
    But I didnt.
    Now im using either reloading, re-initing and/or the sharedobject.
    Anyhoe..
    Question:
    If I declare a class for my main .fla file.,
    then declare, instantiate and load the globals i want in this main class,
    will I be able to acces these variables in my main .fla timeline script?
    If so, I could slowely reconstruct my .fla into smaller objects/classes and make it a real app.
    Just starting from scratch is. welll..i dont even want to think about that.
    Highest regards,
    Mac

    Yes! I got it to run as Mobile project.
    Now, how to test on my mobile thru USB.
    I'm more/only used to working from FLASH CS5.5
    Although I like the builder, it feels really flexible, it also seems more work(yeah still lazy).
    Is there an advantage to using the builder over Flash CS?
    Thank you.. again...again
    Mac

  • General class and setting properties vs specific inner class

    This is a general question for discussion. I am curious to know how people differentiate between instantiating a standard class and making property adjustments within a method versus defining a new inner class with the property adjustments defined within.
    For example, when laying out a screen do you:
    - instantiate all the objects, set properties, and define the layout all within a method
    - create an inner class that defines the details of the layout (may reference other inner classes if complex) that is then just instantiated within a method
    - use some combination of the two depending on size and complexity.
    - use some other strategy
    Obviously, by breaking the work up into smaller classes you are simplifying the structure since each class is taking on less responsibility, as well as hiding the details of the implementaion from higher level classes. On the other hand, if you are just instantiating an object and making some SET calls is creating an inner class overkill.
    Is there a general consensus for an approach? I am curious to hear the approach of others.

    it's depends on your design..
    usually, if the application is simple and is not expected to be maintain (update..etc..) than I just have all the building of the gui within the same class (usually..the main class that extends JFrame).
    if the application follows the MVC pattern, than I would have a seperate class that build the GUI for a particular View. I would create another class to handle the ActionEvent, and other event (Controller)
    I rarely use inner class...and only use them to implements the Listerner interface (but only for simple application)..

  • Problem importing classes and beans

    Hey there. Im having one major fustrating problem! When I code supporting classes and beans for my JSPs I get a code 500 internal server error when trying to import (via <%@ page import="class" %> and <jsp:useBean/>) Im storing my classes and beans in the WEB-INF folder and the calling JSPs are located in /ROOT/tests/8/jsp.jsp. Im using the following to import a class or bean:
    <%@ import="aClass" %>
    Seen as tho its in the WEB-INF folder I won't have to explicitly refer to where the class is located, just the class name.
    I never had this problem when I was using my hosting service. Its only on my localhost server in which I get the Internal Server error.
    Help appreciated, thx.
    PS: Im quite new to JSP/Java Servlet.

    import (via <%@ page import="class" %> and
    <jsp:useBean/>) Im storing my classes and beans in the
    WEB-INF folder try put your class file in WEB-INF/classes.
    or first put bean in the package, like WEB-INF/classes/packagename/beanclass
    in jsp page:
    <jsp:useBean id="Mybean" class="packagename.beanclass" scope="request" />
    Question: is /ROOT a context entry in your server.xml?
    Which JSP Container (version) you use? Maybe your localhost server's set up is different with your hosting.

Maybe you are looking for

  • Oracle Designer and Oracle Server 8.0.4

    Perhaps some wise person can enlighten me with the answer to this little question that has caused trouble for myself. Does anybody know which version of Designer works with Oracle 8.0.4????? And if you know the answer to this question, then is it pos

  • K7N2G and XP 2400+ (cpu speed wrong)

    Can someone tell me how to get the K7N2G Board to display the correct processor speed? I have a AMD XP 2400+ that the board shows on post as an XP 1800+ I've updated the bios to the most recent, but anytime I changed the Jumper on the board or try to

  • Score Print too small!

    Hi together, anyone has an idea how to print out an instrument score in a readable format? the problem is that if id like to print, the fonts of the printout is so small. even on the preview. any idea how to adjust the score font in garageband? i am

  • Osx 10.6.8 freezes

    imac 5 osx 10.6.8 After about 5 minutes it just freezes where it is and I have to just switch it off? Any fixes?

  • Incoming connections now at start-up

    I am now all of a sudden (after a couple of years of never seeing it) being asked to allow/deny Incoming connections for several items: -krb5kdc -qmasterd -qmasterqd -compressord and a few others. Why all of a sudden?