Class has be instantiated in document class but having issue..HELP

Guys,
I am making my way with AS3 in little steps and have hit a
road block. This is what I have:
I have a document class called "Document Class"
I have a custom class called "Game"
I have instantiated an object of "Game" class and I am able
to trace a class method which return a simple "HELLO".
within my Game class, I have a variable(type Array) called
"questions" as instance variable.
I would like to add questions to "questions" array by using
"Mutator" method, or count the current elements with the questions
array and return the total number of questions. I am unable to add
or access elements to the questions array.
Any help would highly be appreciated, please.

First thing: you need to set the functions you're calling to
public, so that you have access to them outside of your class.
Second: you are initializing 'questions' to null. I made some
changes and it seems to work for me:
//////////////Game
Class///////////////////////////////////////////////
public function Game()
//this.questions = null;
this.correctAnswers = null;
this.userAnswers = null;
// SETQUESTION FUNCTION CAN ADD QUESTIONS TO THE QUESTION
ARRAY;
public function myArr():void
trace(questions.length);
public function AddQuestions(val:String)
this.questions.push(val);
trace(val);
}

Similar Messages

  • I am trying to update my RSS via sound cloud to iTunes but having issues... please help

    I am trying to update my RSS via sound cloud to iTunes but having issues.
    I currently have my podcast working on iTunes but I have decided to change where I have them hosted.  I moved my podcasts over to Soundcloud and currently have the rss feed but I would like to update my iTunes podcast with this so that all my podcasts showing up on sound cloud will sync up and automatically update.
    here is my rss feed:
    feed://feeds.soundcloud.com/users/48458062-the-collective-podcast/tracks
    Podcast via Soundcloud:
    http://soundcloud.com/the-collective-podcast
    my podcast on iTunes:
    https://itunes.apple.com/us/podcast/the-collective-podcast/id662393388
    Any help would be greatly appreciated!
    Thanks!

    The feed in use by iTunes is http://thecollectivepodcast.podomatic.com/rss2.xml , not the one you list. It has one episode, whose media file URL is
    http://thecollectivepodcast.podomatic.com/enclosure/2013-06-14T16_06_53-07_00.mp 3
    Your feed at http://feeds.soundcloud.com/users/48458062-the-collective-podcast/tracks has no episodes.
    You will obviously need to get this sorted out before you can proceed. Once you have the soundcloud feed working properly you will need to add a special tag to the original feed in order to transfer the Store to using the new feed. The method is decribed here:
    http://www.wilmut.webspace.virginmedia.com/notes/podcast.html#move
    Please make sure you are completely clear about it before proceeding, and check that the new feed works by subscribing manually in iTunes before you try moving the Store to it.

  • I know this has been posted before. - Deleted but it dosnt help me.

    Hi there guys
    In a flurry of activity my GF deleted my isync while we are on holiday,
    I am a bit stuck I know there is a way to get Isync to work using pacifist and the install DVD. However my phone is pretty trashed and looking like it is gonna pack up any day, I should have sorted it before we left but now im a 1000 miles away and need to get Isync back ? is there anywhere i can download it? even an old pack?
    Thanks

    iSync is not downloadable separately for Mac OS X 10.4 and later.
    If you download the latest Mac OS X 10.4.11 Combo Updater from Apple (the huge one), you might be able to extract and install the latest iSync from that using Pacifist.
    This is not guaranteed to work, because OS X Updates don't always include all files needed to completely restore an application, but you may be lucky as iSync was updated from v2.0 to v2.4 during the 10.4 to 10.4.11 updates.

  • ICloud Keychain - Works with iOS devices but having issues with Mavericks

    Has anyone had an issue where the iCloud keychain will sync normally to iOS devices but not in Mavericks? It worked fine up until a day or two ago when I was forced to recreate my user profile. (a completely seperate issue forced it) Since then I've been rebuilding my profile but did not use the original Library files so as to avoid a reoccurance of the other problem.
    Have tried multiple things including a complete reset (saving my keychain locally on an iPhone) and then reactivating. All passwords and CC information will sync normally to one of my other Macs and my iPad but my MacBook Air (with the new profile) won't cooperate. There are no errors or alerts and takes my security code to activate it. However, when I look in Safari it only pulls a few 'old' autofill passwords and no CC information.
    Actually just tried loading my iCloud settings (including keychain) in the Admin account on the computer and it worked fine. So the issue appears to be limited to my new profile. Wondering if there's a keychain/preference file associated with Safari that's intereing with it receiving a clean sync from the Cloud. Ideas?

    Just tried resetting my login.keychain and that did not fix the issue either.

  • I have a iMac I recently loaded Mavericks and Safari is very buggy.  My MacBook pro has been doing great.  Anyone else having issues with safari?

    Safari just hangs up and has to be restarted.  My Macbook Pro has been doing great.  Just iMac.

    Log into your Guest user and test Safari.

  • For the last 2 days, my battery has been draining rapidy.  Anyone else having issues?  How can I fix it.

    I've had my iPhone 4S for over a year now and have had no issues.  All of a sudden, two or three days ago, my battery has been draining rapidly.  I am on IOS 6.01 and have been for about a month.  I have now turned everything off, including iCloud backup.  Appreciate knowing if anyone else is having sudden battery draining.

    A rogue app can sometimes drain resources when it has a background process running. Usually this can be cleared with a simple soft reset. Have you tried that? If so, have you installed any new apps recently? You might want to try uninstalling the last new app or two you added to see if that makes any difference.

  • I've created a home page HTML5 animation for a client site but having issues getting it to work in IE.  It won't even load the poster image in place of the animation.  Can anybody help?

    Here's the link to the test site.
    http://www.pointblankstudio.com/test-sites/CS2015-Website/index.html

    You are using Edge Animate 1.5 therefore it doesn't run with Internet Explorer 11.
    You have to customize your html page (index.html) using Notepad (Microsoft) or TextEdit (Apple).
    You copy and paste: <meta http-equiv="X-UA-Compatible" content="IE=10">
    to the head tag.
    Moreover, you can also add: <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

  • Why IE5 could not find applet class but Netscape can ?

    Hi,
    I have an applet which is running fine on Netscripts6,
    But not on IE5.
    <APPLET codebase="http://10.1.1.1/demo/" code="ClientApplet.class" HEIGHT=300 WIDTH=300>
    <PARAM NAME="relay" VALUE="1">
    I have all class files under demo directory(the same directory as html file).
    IE5.0 still could not find applet class but Netscript can.

    are you sure its failing to load your classes or is it failing to load a class you are using?
    Remember IE only uses things from 1.1 so simple things like component.getHeight() does not work you have to use size().height
    Its woth enabling the java console and viewing the exact problem.

  • When using quick edit for compressed CSS, edge code does not jump to the particular class but displays the whole thing. This destroys the whole purpose. Does anyone know a fix or extension for that.

    When using quick edit for compressed CSS, edge code does not jump to the particular class but displays the whole thing. This destroys the whole purpose. Does anyone know a fix or extension for that.

    I suspect that beautify doesn't touch CSS that it is not aware  of (e.g. new properties/syntaxes, vendor-prefixes). See if there's a newer version available.
    Which compressed CSS are you using? Most CSS libraries come with both compressed and original stylesheets, so use the original one during development/debugging, and switch to the compressed one for deployment.
    Randy

  • Windowlistener on a main class but listening to subclasses

    hi
    is it possible to have a windowlistener in a main class
    but listen to jframes(opened by the following method "show()") in subclasses
    theres a few reasons why i want to do it this way, rather than have each subclass with its own WindowListener
    1. less code to write for each class
    2. i have methods inside the Main class that i want to use such as (.setCursor)
    thanks for your time:)

    nicchick wrote:
    thanks for reply one last question
    do you make reference to the subclass itself?I don't understand your question.
    When you ask a question try to give as much details as possible.
    The way you handle each event is up to you.

  • I am trying to attend an online class, but can't get to it.  i called the instructor and she told me to turn off the popup blocker.  do i have one of those?

    I am trying to attend an online class, but can't get to it.  i called the instructor and she told me to turn off the popup blocker.  do i have one of those?

    You didn't mention what web browser you are using so it's hard to say.
    One quick thing you can try if you need to log into the class right now is to download a different browser. Assuming you're using Safari, some possible alternatives include Firefox by Mozilla, and Chrome by Google.
    If you continue to experience problems please provide more information about the iMac, version of the Mac OS, and which browser version you are using. Most browsers have the ability to block pop-up windows. You just need to check your options. Here's what it looks like in the current version of Safari.

  • Hi can anyone help me im using my iphone to make a call to a number that has been changed two days ago but it automatically says 'called failed' why? please help!

    hi can anyone help me im using my iphone to make a call to a number that has been changed two days ago but it automatically says 'called failed' why? please help!

    Here's a nifty agorithm to fill an array of primes, using a forever loop with a labeled continue statement, from Horton's Beginining Java:public class MorePrimes
      public static void main(String[] args)
        long[] primes = new long[20];    // Array to store primes
        primes[0] = 2;                   // Seed the first prime
        primes[1] = 3;                   // and the second
        int count = 2;                   // Count of primes found - up to now,
                                         // which is also the array index
        long number = 5;                 // Next integer to be tested
        outer:
        for( ; count < primes.length; number += 2)
          // The maximum divisor we need to try is square root of number
          long limit = (long)Math.ceil(Math.sqrt((double)number));
          // Divide by all the primes we have up to limit
          for(int i = 1; i < count && primes[i] <= limit; i++)
            if(number%primes[i] == 0)             // Is it an exact divisor?
              continue outer;              // yes, try the next number
          primes[count++] = number;               // We got one!
        for(int i=0; i < primes.length; i++)
          System.out.println(primes); // Output all the primes

  • When I open Pages, it opens all previous documents. But I cannot close them:if I try, the program crashes

    Hello everyone.
    Since middle february, Pages has not been working properly.
    When I start the program, it opens by default a blank page. That was fine until recently. I would simply close it and open my desired document. But now I cannot close the blank document: if I do it, the program crashes.
    I have bypassed the problem by simply minimizing the blank one and going along with my own documents... Unfortunately now the problem has increased, as it will not close any document.
    Therefore when I start the program, it will re-open all the documents and it will crash all the time I try to close them.
    Also, It will not let me save them or turn themm to PDF.
    What can I do ?
    I have also removed the previous software and I bought (again) Pages on the App Store last week... results: NONE!! it still won't work.
    HEEEELLLPPPPP
    thank you
    jack

    Hello
    I was warned of your problem by Jerrold.
    As I'm really besy this evening, I didn't read carefully the available message.
    What you get is a Lion's feature named "Resume".
    If you dislike me (as I do but I don't feel useful to rant against it) there are several ways to get rid of it.
    (1) In theory, it's sufficient to uncheck a box in the General System PrefPane.
    I wrote « in theory » because, at least in the French version this feature is broken.
    (2) Some third party tools are delivered to rule the feature's behavior for each application.
    Here are two free ones :
    Lion Tweaks ( http://ifredrik.com/applications/ )
    TinkerTool ( http://www.bresink.com/osx/TinkerTool.html )
    (3) As none of them apply on my French System, I designed a home made brute force tool.
    --{code}
    --[SCRIPT don't resume]
    if my parle_Anglais() then
              display dialog "What to do ?" buttons {"Cancel", "Restart", "Shutdown"} default button 3 cancel button 1
              set |éteindre| to (button returned of result) is "Shutdown"
    else
              display dialog "Que faire ?" buttons {"Annuler", "Redémarrer", "Éteindre"} default button 3 cancel button 1
              set |éteindre| to (button returned of result) is "Éteindre"
    end if
    (path to library folder from user domain as text)
    tell application "System Events"
              delete every folder of folder (result & "Saved Application State")
              if |éteindre| then
      shut down
              else
      restart
              end if
    end tell
    --=====
    on parle_Anglais()
              return (do shell script "defaults read 'Apple Global Domain' AppleLocale") does not start with "fr_"
    end parle_Anglais
    --=====
    --[/SCRIPT]
    --{code}
    Save this script as as Script and store it in the folder :
    <startupVolume>:Users:<yourAccount>:Library:Scripts:
    On my machine, thanks to FastScripts, I attached a shortcut to this script.
    So, when I press cmd +option + ctrl + Q I get this dialog :
    On an English System, the buttons are :
    Cancel, Restart, Shutdown.
    When we trigger the last two, the folder storing the dats required by the system to apply « Resume » is emptied so when we restart the machine no extraneous window is opened.
    I didn't described the way to reach the folder named Scripts.
    I'm sur that Jerrold will do that with a better English.
    Yvan KOENIG (VALLAURIS, France) mardi 17 avril 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.3
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

  • FTP using Runtime class ...Please Help ??

    Hi,
    I am trying to ftp a file programatically.
    I am trying to use Runtime class but facing problems
    in it.This is what I am trying to do :
    Runtime rr = Runtime.getRuntime();
    String[] cmds = new String[2];
    cmds[0]="username=rahmed";
    cmds[1]="password=prpas";
    try{
    Process p = rr.exec("ftp 192.168.1.18",cmds);     
    rr.exec("put vv.txt");
    This does not work ??
    Is there any way to make it work ? Or is there any
    other way to ftp a file programatically ??
    Thanks in adavance..
    Regards
    Rais

    Under Linux/Unix at least, it is good to use the switches -n and -i with the ftp client acually meant for intercative usage.
    -i Turns off interactive prompting during multiple file transfers.
    -n Restrains ftp from attempting ``auto-login'' upon initial connection.
    I do "user <myuser> <mypassword>" then from the script.
    I am happily using ftp this way from shell-scripts in my projects.
    scp is however better than ftp: it does not send plain text passwords over the net, it support key-based login, its encrypts the data.

  • MS Word documents open but aren't visible

    I've suddenly started having a very strange problem in Word and can't find a post describing a similar problem on either the Apple or the Microsoft Word support discussion fora.
    I can open documents, either within Word or directly from my Documents folder, but when they open they aren't visible. I know that they are open because they appear on the list of open windows, both on the menu bar and from the dock. Once I've closed the documents down, they also appear on my Recent Items list under the Apple menu. Worse still, the problem has now spread to my MacBook Pro, so I'm wondering if the problem was caused by a recent software or security update.
    I've tried everything that I can think of to fix this problem (changing the document view, using the arrange documents command under the Windows menu tab), short of reinstalling Office. I don't think that the documents are corrupted, as I get this problem with every Word document that I open (and they open fine in Pages).
    Any suggestions to try and fix this problem would be gratefully received.

    I had a problem with windows disappearing in Word and other applications. I found the problem was the System Preferences “Expose/Spaces.”
    I tried Spaces after I installed Leopard and decided I wouldn’t use it, so I unchecked the Enable box. But Spaces mysteriously re-enabled itself. It would show the application menu bar but no window, even though the file was listed in the Windows menu.
    When it happens, you can try cycling through Spaces by using the Control-arrow or Control-1,2,3 or 4 keys. If you ever tried Spaces and then thought you disabled it, this may be happening to you also.
    To completely disable Spaces, go to the System Preferences, click the Expose/Spaces icon, click on the Spaces tab, check the Enable Spaces box, and select the applications in the spaces. Then click on the minus button at the bottom of the window. After removing all the applications, uncheck the Enable box again.
    I don’t know if this is the problem with your computer or not. It seems unlikely it is a virus, as others suggested and from what you have replied. Checking the Spaces System Preferences and trying what I did to remove the applications from the Spaces function couldn’t hurt, unless you really want to use Spaces. In that case, try using the Control-arrow or Control-1, 2, or 3 key combinations when it doesn’t show the document window.
    This method worked for some others:
    http://discussions.apple.com/message.jspa?messageID=6202441#6202441
    http://discussions.apple.com/message.jspa?messageID=6183939#6183939

Maybe you are looking for

  • [TOPLINK-7027] The sequence named X is setup incorrectly.  Its inc

    I am testing a SOA composite application, that with a DB adapter performs an INSERT against an Oracle DB 11g and I'm getting this exception, on which I am bit confused since on my opinion the sequence definition looks fine. ps: from sqlplus works fin

  • Which displays to get?

    Okay, I am stuck between 2 20" and 2 23" displays... They will be hooked up to a Mac Pro w/ the ATI Radeon card...unless anyone has better suggestions for me as far as the video card goes.. Which would you guys recommend? I currently have a 20" iMac

  • Version of Windows OS not supported

    Downloaded Adobe Reader 70. When opening desktop message comes up this version of Windows OS not supported. What do I do?

  • App store shows "download" when already installed.

    Why does the app store show mountain lion ready to "download" when I have already installed mountain lion? Do i need to download and reinstall?

  • Firefox update now browser opens pages I don't adk for

    Today my desktop update to Firefox 37.0.2. Since this happened each time I look pages up on the Internet they start to open but then automatically change to other pages such as gambling or other random stuff that I wasn't looking for. When I go to cl