A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Variables problem!!!

  1. #1
    Junior Member
    Join Date
    May 2002
    I am a relative newbie to MX, so go easy on me. =)

    I have a list of cities that I am loading into MX from a cfm file. I use these in various text dynamic text fields around the stage. No problem.

    However, I have another variable/value that is the sum of all the cities. cityCount.

    I don't want to use this in a textfield (although when I do it works), but instead, I want to use it in an actionscript.

    I want to do something like:

    onClipEvent(load) {
    cityList._y = cityCount;

    When I hard code a number in there, like 50, it works EXACTLY how I want. When I just plop "cityCount" in there, it doesn't work. I have tried _root.cityCount, this.cityCount, with no luck.

    Please help!

  2. #2
    Senior Member
    Join Date
    Jul 2000
    Hi there,

    It sounds as though, either your variable isn't being loaded into your movie, or you are loading it into somewhere other than root, and are trying to reference it incorrectly.

    I would suggest adding breakpoints to the actionscript where your variables are loaded into the movie, and running the movie in debug mode 1 line at a time.

    This will enable you to see when the vars are loaded and what they contain.

    I hope this helps.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center