Ant tests: undefined method runWithFlexUnit4Runner?

Hi all!
I am trying to automate AIR tests that run successfully via Adobe Flash Builder 4.
I get the following error:
  Error: Call to a possibly undefined method runWithFlexUnit4Runner through a reference with static type flexunit.flexui:FlexUnitTestRunnerUI.
    [mxmlc]
    [mxmlc]                 testRunner.runWithFlexUnit4Runner(currentRunTestSuite(), "unit_tests");
when I run the tests from command line via: ant -v clean package.
The part of the build.xml responsible for this is:
<target name="test" depends="compile">
<!-- Execute FlexUnit tests and publish reports -->
         <mxmlc
            file="${test.src.loc}/FlexUnitApplication.mxml"
            output="${bin.loc}/FlexUnitApplication.swf"
            actionscript-file-encoding="UTF-8"
            keep-generated-actionscript="true"
            incremental="false"
        >
           <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
           <source-path path-element="${FLEX_HOME}/frameworks"/>
           <compiler.source-path path-element="${test.src.loc}"/>
           <compiler.include-libraries dir="${lib.loc}" append="true">
            <include name="pb3dlib.swc" />
            <include name="airframework.swc" />
            <include name="airglobal.swc" />
            <include name="airspark.swc" />
            <include name="applicationupdater_ui3.swc" />
            <include name="automation_airspark.swc" />
            <include name="automation_spark.swc" />
            <include name="flexunit_0.9.swc" />
            <include name="flexunit-aircilistener-4.1.0.swc" />
            <include name="flexunit-cilistener-4.1.0.swc" />
            <include name="flexunit-core-flex-4.0.0.2-sdk3.5.0.12683.swc" />
            <include name="flexunit-core-flex-4.1.0.swc" />
            <include name="flexunit-uilistener-4.1.0.swc" />
            <include name="flexunitextended.swc" />
            <include name="hamcrest-1.0.2.swc" />
            <include name="spark.swc" />
            <include name="utilities.swc" />
            <include name="flexunit.swc" />
            <include name="FlexUnitOptional.swc" />
            <include name="FlexUnitTestRunner_rb.swc" />
           </compiler.include-libraries>
        </mxmlc>
What swc do I need to include?
Thanks,
--Andreea

Andreea,
The actual tests created by Flash Builder are fine, it is really just the main application file they create. They don't ship the source, so modifying it is difficult.
You can, however do something like this example:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
      xmlns:mx="http://www.adobe.com/2006/mxml"
      creationComplete="runMe()" >
<mx:Script>
  <![CDATA[
    import compilationSuite.SuitesToRun;
    import org.flexunit.listeners.CIListener;
    import org.flexunit.runner.FlexUnitCore;
    import org.flexunit.runner.notification.async.XMLListener;
    private var core:FlexUnitCore;
    public function runMe():void {
        core = new FlexUnitCore();
        //Put this line in if you want to write the XML to disk for use in reporting or a CI server
        core.addListener(new CIListener());
        //Leaving this one in allows you to see the results in Flash Builder as well if it is open
        //Else, it will just fail and go on. The name in the quotes below is your project name
        core.addListener(new XMLListener("unit_tests"));
        //Finally, pass what you want to run to the core.run() method. This could be the result of your currentRunTestSuite() from the
        //previous code you pasted
        core.run( compilationSuite.SuitesToRun );
]]>
</mx:Script>
</mx:Application>

Similar Messages

  • Call to a possibly undefined method displays when using static function in Unit Test

    Hello!
    This has been driving me nuts. I am setting up unit tests for a static class which manages a collection of songs. This is how my unit test class looks:
    //START CODE
    package flexUnitTests {
              import com.myapp.managers.MusicManager;
              import flash.utils.Dictionary;
              import flexunit.framework.Assert;
              public class MyAppManagerTest {
                        [Before]
                        public function setUp():void {
                                  var songData:Dictionary = new Dictionary();
                                  songData["mn0012345"] = new Dictionary();
                                  songData["mn0012345"]["title"] = "All the Pretty Little Horses";
                                  songData["mn0012345"]["description"] = "by: American Traditional | Voice, Piano | 3 pages";
                                  MusicManager.setSongData(songData);
                        [Test]
                        public function test_getAuthorsBySKU():void {
                                  var expected:String = "American Traditional";
                                  var given:String = MusicManager.getAuthorsBySKU("mn0012345");
                                  Assert.assertEquals(expected, given);
    //END OF CODE
    You will notice two calls in red above. When I leave them in the code I see a variety of errors which look like this:
    "Call to a possibly undefined method '' through a reference with a static type com.myapp..."
    And
    "Access of possible undefined property '' through a reference with static type com.myapp..."
    Then, when I comment out the two lines in red above, these errors go away. Flash Builder seems really flakey to me. Often I notice that the error list varies, how can it just no longer be an error? Where did this new access error come from, in a no related part of the code, by adding or removing a function call to a static class which remains in the import statement.
    Note that the MusicManager contains no references to any of the UI mxml that is throwing these errors. It just simply loads data into a few globals and allows you to grab info.
    How is my usage of this function making foreign objects inaccessible?
    Please help!!! I am really hoping there is an answer but I have a bad feeling the answer is just that Flash Builder is flakey.

    I did some more work on the issue above. There are functions with in the MusicManager that call the UserManager to get a user's ID. When I comment out these calls then the access errors go away. Well the user manager has some calls back to mxml that tell the class that changes where made. My best guess is this is where it stems into the code that is randomly throwing errors. But, it compiles fine and runs fine on a device. Is there something with test cases which doesn't invoke the UI?

  • Undefined method error in custom package even with proper import

    I edited the title of this thread to be a little more descriptive about the help I need.
    The background: I have a multi-file Flash application that allows users to navigate through multiple pages (similar to a website). I realized yesterday that with each mouse click, I'm loading a page into memory, but not unloading it. After navigating through several pages, my memory really starts to take a hit. So, I want to define a custom package that loads each page and unloads the previous page.
    I've gotten as far as defining the pageLoad function, but I keep getting an error that doesn't make sense to me (unless I'm importing the wrong flash packages).
    When I test the Flash, I consistently get the following error:
    dtutils.as – 1180: Call to a possibly undefined method addChild. – addChild(pageLoader);
    Everything I have found indicates that to import the addChild method, I need to import flash.display.Sprite, which I'm doing, but I am still getting the error.
    You'll have to forgive me as I'm not extremely familiar with objects or actionscript. I'm more of a hacker, but I grasp things quickly and can build on what I've already learned. This might be obvious to others, but I can't find anything that indicates that I'm doing anything wrong with my code, so any help you can give is greatly appreciated!!
    My package code:
    package com.clientname.demo
        import flash.display.Sprite;
        import flash.display.Loader;
        import flash.events.MouseEvent;
        import flash.net.URLRequest;
        public class dtutils
            //Properties
            public var pageLoader:Loader = new Loader();
            public var pagePath:URLRequest;
            //Constructor
            public function loadPage(url:String)
                pagePath = new URLRequest(url);
                pageLoader.load(pagePath);
                addChild(pageLoader);
    I've also attempted to replace the four import lines in my package with the following 3 import lines, but I still get the same error message:
    import flash.display.*;
    import flash.events.*;
    import flash.net.*;
    The code I'm using to import my package and call the function in my flash file is:
    import com.clientname.demo.dtutils;
    dtutils.loadPage("../filepath/filename.swf");
    I appreciate any help anyone can give me.

    Thanks for the feedback. Being fairly new with actionscript (and an object approach, in general), and not being a real developer, I often struggle with naming conventions. Didn't even realize there was a specific convention for what is considered a utility and what isn't. However, I appreciate your feedback and will rename my package so that it isn't confusing to any other real developers that may need to do something with this code in the future.
    Thanks!

  • Image + 1180 error + possibly undefined method

    Below is a piece of code I've written and getting an "1180: Call to possibly undefined method test".
    <mx:Script>
    <![CDATA[
    public function testDC(): void {
        Alert.show("Testing");
    ]]>
    </mx:Script>
    <mx:Panel id='Test' title = 'Test' width = '100%' height = '100%' creationPolicy="all" backgroundColor="white" backgroundAlpha=".01">
    <mx:VBox label = 'Topology View' showEffect = '{wipe_left}' width='100%' height='100%'
    cornerRadius="5" paddingBottom="15" paddingLeft="5" paddingRight="5" paddingTop="15" clipContent="true">
                <adobe:SpringGraph id="springgraph" width="100%" height="95%" bottom="0" top="40"
                right="0" left="0" clipContent="true">
                <adobe:itemRenderer>
                <mx:Component>
                <mx:Image width="24" height="24"
                                    source="{(data.id==null)?'': (data.id.search('\\.') > 0) ? 'assets/icons/teacher.png' : 'assets/icons/student.png'}"
                                    toolTip="{data.data}" doubleClickEnabled="true" doubleClick="testDC()"/>
                </mx:Component>
                </adobe:itemRenderer>
    </adobe:SpringGraph>
    </mx:VBox>
    </mx:Panel>
    If I do not call the method, I don't get the error, but I need to perform some operations on the clicking the image.
    1. I've also tried to use icon, but with no success.
    2. I've tried to remove the <adobe:itemRenderer> and the <mx:Component> tags, in this case the images don't get loaded and the screen looks bad.
    Any help?

    I put the script tag within the image tag and it worked.

  • Call to possible undefined method

    This is the code I have
    I have a actionScript class called Test.
    import com.xxxx.com.Test;
    var testData : com.xxxx.com.Test = new Test();
    testData.setBookName("Java 5");
    I get the following errors
    1046: Type was not found or was not a compile-time constant:
    1180: Call to a possibly undefined method.

    This:
    testData.setBookName("Java 5");
    MUST be done inside a function and not in the declaration
    section. The variable does not exist yet. Create an init function()
    and call that from the initialize or creationComplete events. Do
    the assignment in that function.
    Tracy

  • Ruby SAPRFC: undefined method pack

    Hi
    executing the following call
    rfc = SAP::Rfc.new(:ashost => "iwdf3018.wdf.sap.corp" , :sysnr => "50" ,:lang => "EN" , :client => "800" , :user => "++" , :passwd => "++" , :trace => "0" )
    iface = rfc.discover("BAPI_BUPA_ADDRESSES_GET")
    iface.BUSINESSPARTNER.value = "0000002036"
    rfc.call(iface)
    I am getting the following error:
    .../saprfc-0.35-mswin32/lib/SAP/rfc.rb:729:in `discover': undefined method `pack' for #<SAP::Rfc:0x2c8c8d8> (NoMethodError)
    from .../saprfc-0.35-mswin32/lib/SAP/rfc.rb:664:in `each'
    from .../saprfc-0.35-mswin32/lib/SAP/rfc.rb:664:in `discover'
    Am I missing a detail? What does it try to tell me? And how can I handle this issue?
    Regards,
    Stefan

    Hi -
    This is a bug- that has never been put to the test.  Can you change line 729 of Rfc.rb  which should look like this:
                default = pack("H*", default)
    to:
                default = [default].pack("H*")
    Cheers.

  • Access of undefined method/property through reference with a static type Class

    I get the following error: (it's not word for word but you get the idea)
    Error: Access of undefined method getStatus through reference with a static type Class.
    Here's what's happening in the code. I'm trying to create a User class that is instantiated at the start of my app. I want the User class to have properties like mainStatus, with helper methods like setStatus etc. Pretty simple.
    so on my HardDisk I have my flash_working folder with all my flash projects. I created my class file/package under the directory com.mypackage
    package com.mypackage
        import flash.display.*;
        public class User extends Sprite
            public var mainStatus:int;
            public function User()
                trace("User Created!");
                mainStatus = 0;
            public function setStatus(status:int):void
             mainStatus = status;
        public function getStatus():int
            return mainStatus;
    Ok, so far so good.
    now I created a new .fla file under the root of /flash_working/. The class file is in /com/mypackage/User.as
    in my .fla file I have:
    import com.mypackage.User;
    var myUser:User = new User();
    var i = User.getStatus();
    trace(i);
    That's all the code I have. Could someone please explain why it's giving me that error?
    If I try to access the public var mainStatus through user.mainStatus that gives a similar error saying:
    Error: Access of undefined property mainStatus through reference with a static type Class.
    Thanks for any help!
    jef3189

    the public getStatus() function that you created needs to be referred to through an instance of the class.
    So:
    import com.mypackage.User;
    var myUser:User = new User();
    var i = myUser.getStatus();
    trace(i);
    Also, an aside. You can create a getter/setter for status, to avoid having to do the function as such.
    package com.mypackage
        import flash.display.*;
        public class User extends Sprite
            public var mainStatus:int;
            public function get status():int
                return mainStatus;
            public function set status(value:int):void
                 mainStatus = value as int;
              public function User()
                trace("User Created!");
                mainStatus = 0;
    And then, you can call it as:
    import com.mypackage.User;
    var myUser:User = new User();
    trace(myUser.status);
    EDIT
    I just noticed that you made the variable public as well, which means you can access it without getter/setter or function.
    import com.mypackage.User;
    var myUser:User = new User();
    trace(myUser.mainStatus);

  • Call to a possibly undefined method setPropertyIsEnumerable?

    Hi,
      I am trying to accomplish using doubleClick events on dateChoosers. Below is the code that is working:
         <mx:VBox>
                  <mx:Label text="Simple DateChooser control."/>
                  <mx:DateChooser id="dateChooser1" doubleClickEnabled="true"
                      doubleClick="displayDate2()"
                      change="displayDate(DateChooser(event.target).selectedDate)"/>
                  <mx:Label id="selection"  color="blue" text="Date selected:"/>
              </mx:VBox>
      I tried putting in doubleClickEnabled as true in Actionscript, and then call the event, and this is the syntax I used:
         //enable the double Click Enabled Property
                        dch.setPropertyIsEnumerable("doubleClickEnabled",true);
                       dch.addEventListener("doubleClick", useDate2);
      This did not work, and I got this error instead: 1061: Call to a possibly undefined method setPropertyIsEnumerable through a reference with static type mx.controls:DateChooser.   
      I tried to find a suitable import statement to insert in my code, but I am not sure what to put there. Could anyone please give me a hint what to do here to get my code to accept the method?
    Thanks in advance.
    Alice

    Hi, Ryan:
      Thanks, I got that to work, but it seems like the doubleClick does not allow me to use it on the dateChooser. Here is the code:
        The MXML:
               <mx:VBox id="box2">
                <mx:DateChooser id="dch" doubleClickEnabled="true"
                      doubleClick="displayDate2()"
                      change="displayDate(DateChooser(event.target).selectedDate)"/>
             </mx:VBox>
        The same thing in Actionscript, but not working:
         dch = new DateChooser();
         dch.addEventListener("change", displayDate);
         dch.doubleClickEnabled = true;
        dch.addEventListener("doubleClick",displayDate2);
      //Got an error saying TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::MouseEvent@20112769 to     
      //mx.events.CalendarLayoutChangeEvent.
         box2.addChild(dch);
       Could you give me some pointers on what I have wrong here?
    Thanks for your help.
    Alice

  • Call to a possibly undefined method getClipboardContents through a reference with static type flashx.textLayout.edit:ISelectionManager.

    Hi Guys,
    As i am using the nigtly build of TLF 4.0.0.11073.
    I want to copy some text from the TLF, by copy operation. I am getting this type of Error.
    - Call to a possibly undefined method getClipboardContents through a reference with static type flashx.textLayout.edit:ISelectionManager.
    In the previous build, i dont use to get this type of error, but in this nightly builds i am getting this type of error.
    Can anyone help me to fix the same or any workaound.
    Thanks in advance.
    Krishna

    This functionality is still available, but it has moved. It's now in a TextClipboard class, in the same flashx.textLayout.edit package. So you should replace calls to getClipboardFormat() with TextClipboard.getContents().
    Hope this helps,
    - robin

  • Call to a possibly undefined method

    I am having a real problem with using two different Tile Lists in one movieClip I keep getting:
    call to a possibly undefined method trousers1
    call to a possibly undefined method trousers2
    call to a possibly undefined method trousers3
    call to a possibly undefined method trousers4
    call to a possibly undefined method trousers5
    package
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import fl.controls.Slider;
    import fl.events.SliderEvent;
    import fl.controls.Label;
    import fl.controls.NumericStepper;
    import flash.events.Event;
    import fl.controls.TileList;
    import flash.display.DisplayObject;
    import fl.events.ListEvent;
    import flash.utils.getDefinitionByName;
    import flash.events.EventDispatcher;
    import fl.controls.SelectableList;
    public class Main extends MovieClip
       //Variables
       var startPage:StartPage;
       var tutorialPage:TutorialPage;
       var maleSizePage:MaleSizePage;
       var femaleSizePage:FemaleSizePage;
       var maleDragDropPage:MaleDragDropPage;
       var femaleDragDropPage:FemaleDragDropPage;
       var objTShirt:Object={};
       var objTrouser:Object={};
       //clothes variables
       var tshirt1:tShirt1;
       var tshirt2:tShirt2;
       var tshirt3:tShirt3;
       var tshirt4:tShirt4;
       var trousers1:Trousers1;
       var trousers2:Trousers2;
       var trousers3:Trousers3;
       var trousers4:Trousers4;
       var trousers5:Trousers5;
       var _isDragging:Boolean;
       public function Main()
        //Pages
        startPage = new StartPage;
        tutorialPage = new TutorialPage;
        maleSizePage = new MaleSizePage;
        femaleSizePage = new FemaleSizePage;
        maleDragDropPage = new MaleDragDropPage;
        femaleDragDropPage = new FemaleDragDropPage;
        objTShirt[0+"_"+0] = new tShirt1;
        objTShirt[1+"_"+0] = new tShirt2;
        objTShirt[2+"_"+0] = new tShirt3;
        objTShirt[3+"_"+0] = new tShirt4;
        objTrouser[0+"_"+0] = new trousers1;
        objTrouser[1+"_"+0] = new trousers2;
        objTrouser[2+"_"+0] = new trousers3;
        objTrouser[3+"_"+0] = new trousers4;
        objTrouser[4+"_"+0] = new trousers5;
        _isDragging = false;
        addChild(startPage);
        //Event Listeners Buttons
        startPage.startButton.addEventListener(MouseEvent.CLICK,startButtonClick);
        tutorialPage.continueButton.addEventListener(MouseEvent.CLICK,tutorialContinueButtonClick);
        maleSizePage.continueButton.addEventListener(MouseEvent.CLICK,maleSizeContinueButtonClick);
        femaleSizePage.continueButton.addEventListener(MouseEvent.CLICK,femaleSizeContinueButtonClick);
        //Size Page Event Listeners
        maleSizePage.heightSlider.addEventListener(SliderEvent.CHANGE,heightSlChange_M);
        maleSizePage.neckSlider.addEventListener(SliderEvent.CHANGE,neckSlChange_M);
        maleSizePage.chestSlider.addEventListener(SliderEvent.CHANGE,chestSlChange_M);
        maleSizePage.waistSlider.addEventListener(SliderEvent.CHANGE,waistSlChange_M);
        maleSizePage.armSlider.addEventListener(SliderEvent.CHANGE,armSlChange_M);
        maleSizePage.legSlider.addEventListener(SliderEvent.CHANGE,legSlChange_M);
        maleSizePage.heightValue.addEventListener(Event.CHANGE,heightVChange_M);
        maleSizePage.neckValue.addEventListener(Event.CHANGE,neckVChange_M);
        maleSizePage.chestValue.addEventListener(Event.CHANGE,chestVChange_M);
        maleSizePage.waistValue.addEventListener(Event.CHANGE,waistVChange_M);
        maleSizePage.armValue.addEventListener(Event.CHANGE,armVChange_M);
        maleSizePage.legValue.addEventListener(Event.CHANGE,legVChange_M);
        femaleSizePage.heightSlider.addEventListener(SliderEvent.CHANGE,heightSlChange_F);
        femaleSizePage.bustSlider.addEventListener(SliderEvent.CHANGE,bustSlChange_F);
        femaleSizePage.hipSlider.addEventListener(SliderEvent.CHANGE,hipSlChange_F);
        femaleSizePage.armSlider.addEventListener(SliderEvent.CHANGE,armSlChange_F);
        femaleSizePage.waistSlider.addEventListener(SliderEvent.CHANGE,waistSlChange_F);
        femaleSizePage.legSlider.addEventListener(SliderEvent.CHANGE,legSlChange_F);
        //Drag and Drop page Listeners
        maleDragDropPage.menuBar.stop();
        femaleDragDropPage.menuBar.stop();
        maleDragDropPage.menuBar.topsButton.addEventListener(MouseEvent.MOUSE_DOWN,topsMenuShow_M);
        maleDragDropPage.menuBar.trousersButton.addEventListener(MouseEvent.MOUSE_DOWN,trousersMenuShow_M);
        maleDragDropPage.menuBar.shoesButton.addEventListener(MouseEvent.MOUSE_DOWN,shoesMenuShow_M);
       //Event Button handlers
       function startButtonClick(event:MouseEvent):void
        addChild(tutorialPage);
       function tutorialContinueButtonClick(event:MouseEvent):void
        if (startPage.maleSelection.selected == true)
         addChild(maleSizePage);
         removeChild(startPage);
         removeChild(tutorialPage);
        if (startPage.femaleSelection.selected == true)
         addChild(femaleSizePage);
         removeChild(startPage);
         removeChild(tutorialPage);
       function maleSizeContinueButtonClick(event:MouseEvent):void
        addChild(maleDragDropPage)
        removeChild(maleSizePage)
       function femaleSizeContinueButtonClick(event:MouseEvent):void
        addChild(femaleDragDropPage)
        removeChild(femaleSizePage)
       // slider handlers
       function heightSlChange_M(event:SliderEvent):void
        maleSizePage.heightValue.value = maleSizePage.heightSlider.value;
        maleSizePage.maleCharacter.height = maleSizePage.heightSlider.value + 280;
       function neckSlChange_M(event:SliderEvent):void
        maleSizePage.neckValue.value = maleSizePage.neckSlider.value;
        maleSizePage.maleCharacter.neck.width = maleSizePage.neckSlider.value + 40;
       function chestSlChange_M(event:SliderEvent):void
        maleSizePage.chestValue.value = maleSizePage.chestSlider.value;
        maleSizePage.maleCharacter.chest.width = maleSizePage.chestSlider.value + 141;
       function waistSlChange_M(event:SliderEvent):void
        maleSizePage.waistValue.value = maleSizePage.waistSlider.value;
        maleSizePage.maleCharacter.waist.width = maleSizePage.waistSlider.value + 140;
       function armSlChange_M(event:SliderEvent):void
        maleSizePage.armValue.value = maleSizePage.armSlider.value;
        maleSizePage.maleCharacter.leftArm.height = maleSizePage.armSlider.value + 180;
        maleSizePage.maleCharacter.rightArm.height = maleSizePage.armSlider.value + 180;
       function legSlChange_M(event:SliderEvent):void
        maleSizePage.legValue.value = maleSizePage.legSlider.value;
        maleSizePage.maleCharacter.rightLeg.height = maleSizePage.legSlider.value + 250;
        maleSizePage.maleCharacter.leftLeg.height = maleSizePage.legSlider.value +250;
       function heightVChange_M(e:Event):void
        maleSizePage.heightSlider.value = maleSizePage.heightValue.value;
        maleSizePage.maleCharacter.height = maleSizePage.heightValue.value + 280;
       function neckVChange_M(e:Event):void
        maleSizePage.neckSlider.value = maleSizePage.neckValue.value;
        maleSizePage.maleCharacter.neck.width = maleSizePage.neckValue.value + 40;
       function chestVChange_M(e:Event):void
        maleSizePage.chestSlider.value = maleSizePage.chestValue.value;
        maleSizePage.maleCharacter.chest.width = maleSizePage.chestValue.value + 141;
       function waistVChange_M(e:Event):void
        maleSizePage.waistSlider.value = maleSizePage.waistValue.value;
        maleSizePage.maleCharacter.waist.width = maleSizePage.waistValue.value + 140
       function armVChange_M(e:Event):void
        maleSizePage.armSlider.value = maleSizePage.armValue.value;
        maleSizePage.maleCharacter.leftArm.height = maleSizePage.armValue.value + 180;
        maleSizePage.maleCharacter.rightArm.height = maleSizePage.armValue.value + 180;
       function legVChange_M(e:Event):void
        maleSizePage.legSlider.value = maleSizePage.legValue.value;
        maleSizePage.maleCharacter.leftLeg.height = maleSizePage.legValue.value + 240;
        maleSizePage.maleCharacter.rightLeg.height = maleSizePage.legValue.value + 240;
       function heightSlChange_F(e:Event):void
        femaleSizePage.heightValue.value = femaleSizePage.heightSlider.value;
        femaleSizePage.femaleCharacter.height = femaleSizePage.heightSlider.value + 250;
       function bustSlChange_F(e:Event):void
        femaleSizePage.bustValue.value = femaleSizePage.bustSlider.value;
        femaleSizePage.femaleCharacter.chest.width = femaleSizePage.bustSlider.value + 150;
       function waistSlChange_F(event:SliderEvent):void
        femaleSizePage.waistValue.value = femaleSizePage.waistSlider.value;
        femaleSizePage.femaleCharacter.waist.width = femaleSizePage.waistSlider.value + 140;
       function armSlChange_F(event:SliderEvent):void
        femaleSizePage.armValue.value = femaleSizePage.armSlider.value;
        femaleSizePage.femaleCharacter.leftArm.height = femaleSizePage.armSlider.value + 180;
        femaleSizePage.femaleCharacter.rightArm.height = femaleSizePage.armSlider.value + 180;
       function legSlChange_F(event:SliderEvent):void
        femaleSizePage.legValue.value = femaleSizePage.legSlider.value;
        femaleSizePage.femaleCharacter.rightLeg.height = femaleSizePage.legSlider.value + 250;
        femaleSizePage.femaleCharacter.leftLeg.height = femaleSizePage.legSlider.value +250;
       function hipSlChange_F(event:SliderEvent):void
        femaleSizePage.hipValue.value = femaleSizePage.hipSlider.value;
        femaleSizePage.femaleCharacter.hips.width = femaleSizePage.hipSlider.value + 160;
       function heightVChange_F(e:Event):void
        femaleSizePage.heightSlider.value = femaleSizePage.heightValue.value;
        femaleSizePage.femaleCharacter.height = femaleSizePage.heightValue.value + 280;
       function bustVChange_F(e:Event):void
        femaleSizePage.bustSlider.value = femaleSizePage.bustValue.value;
        femaleSizePage.femaleCharacter.chest.width = femaleSizePage.bustValue.value + 150;
       function hipsVChange_F(e:Event):void
        femaleSizePage.hipSlider.value = femaleSizePage.hipValue.value;
       function waistVChange_F(e:Event):void
        femaleSizePage.waistSlider.value = femaleSizePage.waistValue.value;
        femaleSizePage.femaleCharacter.waist.width = femaleSizePage.waistValue.value + 140;
       function armVChange_F(e:Event):void
        femaleSizePage.armSlider.value = femaleSizePage.armValue.value;
        femaleSizePage.femaleCharacter.leftArm.height = femaleSizePage.armValue.value + 180;
        femaleSizePage.femaleCharacter.rightArm.height = femaleSizePage.armValue.value + 180
       function legVChange_F(e:Event):void
        femaleSizePage.legSlider.value = femaleSizePage.legValue.value;
        femaleSizePage.femaleCharacter.rightLeg.height = femaleSizePage.legValue.value + 250;
        femaleSizePage.femaleCharacter.leftLeg.height = femaleSizePage.legValue.value +250;
       //Drag and Drop handlers
       function topsMenuShow_M(event:MouseEvent):void
        maleDragDropPage.menuBar.gotoAndStop(2);
        maleDragDropPage.menuBar.maleTops.addEventListener(ListEvent.ITEM_CLICK,addTshirt1_M)
       function trousersMenuShow_M(event:MouseEvent):void
        maleDragDropPage.menuBar.gotoAndStop(3);
        maleDragDropPage.menuBar.maleTrousers.addEventListener(ListEvent.ITEM_CLICK,addTrousers1_M)
       function shoesMenuShow_M(event:MouseEvent):void
        maleDragDropPage.menuBar.gotoAndStop(4);
       function addTshirt1_M(event:ListEvent):void
        trace(event.rowIndex,event.columnIndex)
        if (contains(objTShirt[0+"_"+0]))
         removeChild(objTShirt[0+"_"+0]);
        if (contains(objTShirt[1+"_"+0]))
         removeChild(objTShirt[1+"_"+0]);
        if (contains(objTShirt[2+"_"+0]))
         removeChild(objTShirt[2+"_"+0]);
        if (contains(objTShirt[3+"_"+0]))
         removeChild(objTShirt[3+"_"+0]);
        addChild(objTShirt[event.rowIndex+"_"+event.columnIndex] as DisplayObject).addEventListener(MouseEvent.MOUSE_DOWN,tShirtDragPickup);
       function tShirtDragPickup(event:Event):void
        var currentDragObject:MovieClip = event.currentTarget as MovieClip;
        currentDragObject.startDrag();
        setChildIndex(currentDragObject, numChildren-1);
        _isDragging = true;
        currentDragObject.addEventListener(MouseEvent.MOUSE_UP, tShirtDragDrop);
       function tShirtDragDrop(event:Event):void
        var currentDragObject:MovieClip = event.currentTarget as MovieClip;
        currentDragObject.stopDrag();
        _isDragging = false;
        currentDragObject.removeEventListener(MouseEvent.MOUSE_UP, tShirtDragDrop);
       function tShirtTarget(event:Event):void
        if (maleDragDropPage.objTShirt[0+"_"+0].hitTestObject(maleDragDropPage.maleCharacter.chest))
         if (! _isDragging)
          maleDragDropPage.objTShirt[0+"_"+0].x = maleDragDropPage.maleCharacter.chest.x;
          maleDragDropPage.objTShirt[0+"_"+0].y = maleDragDropPage.maleCharacter.chest.y;
        if (maleDragDropPage.objTShirt[1+"_"+0].hitTestObject(maleDragDropPage.maleCharacter.chest))
         if (! _isDragging)
          maleDragDropPage.objTShirt[1+"_"+0].x = maleDragDropPage.maleCharacter.chest.x;
          maleDragDropPage.objTShirt[1+"_"+0].y = maleDragDropPage.maleCharacter.chest.y;
        if (maleDragDropPage.objTShirt[2+"_"+0].hitTestObject(maleDragDropPage.maleCharacter.chest))
         if (! _isDragging)
          maleDragDropPage.objTShirt[2+"_"+0].x = maleDragDropPage.maleCharacter.chest.x;
          maleDragDropPage.objTShirt[2+"_"+0].y = maleDragDropPage.maleCharacter.chest.y;
        if (maleDragDropPage.objTShirt[3+"_"+0].hitTestObject(maleDragDropPage.maleCharacter.chest))
         if (! _isDragging)
          maleDragDropPage.objTShirt[3+"_"+0].x = maleDragDropPage.maleCharacter.chest.x;
          maleDragDropPage.objTShirt[3+"_"+0].y = maleDragDropPage.maleCharacter.chest.y;
       function addTrousers1_M(event:ListEvent):void
        trace(event.rowIndex,event.columnIndex)
        if (contains(objTrouser[0+"t"+0]))
         removeChild(objTrouser[0+"t"+0]);
        if (contains(objTrouser[1+"t"+0]))
         removeChild(objTrouser[1+"t"+0]);
        if (contains(objTrouser[2+"t"+0]))
         removeChild(objTrouser[2+"t"+0]);
        if (contains(objTrouser[3+"t"+0]))
         removeChild(objTrouser[3+"t"+0]);
        if (contains(objTrouser[4+"t"+0]))
         removeChild(objTrouser[4+"t"+0]);
        addChild(objTrouser[event.rowIndex+"t"+event.columnIndex] as DisplayObject).addEventListener(MouseEvent.MOUSE_DOWN,trouserDragPickup);
       function trouserDragPickup(event:Event):void
        var currentDragObject:MovieClip = event.currentTarget as MovieClip;
        currentDragObject.startDrag();
        setChildIndex(currentDragObject, numChildren-1);
        _isDragging = true;
        currentDragObject.addEventListener(MouseEvent.MOUSE_UP, trouserDragDrop);
       function trouserDragDrop(event:Event):void
        var currentDragObject:MovieClip = event.currentTarget as MovieClip;
        currentDragObject.stopDrag();
        _isDragging = false;
        currentDragObject.removeEventListener(MouseEvent.MOUSE_UP, trouserDragDrop);
       function trouserTarget(event:Event):void
        if (maleDragDropPage.objTrouser[0+"_"+0].hitTestObject(maleDragDropPage.maleCharacter.waist))
         if (! _isDragging)
          maleDragDropPage.objTrouser[0+"_"+0].x = maleDragDropPage.maleCharacter.waist.x;
          maleDragDropPage.objTrouser[0+"_"+0].y = maleDragDropPage.maleCharacter.waist.y;
        if (maleDragDropPage.objTrouser[1+"_"+0].hitTestObject(maleDragDropPage.maleCharacter.waist))
         if (! _isDragging)
          maleDragDropPage.objTrouser[1+"_"+0].x = maleDragDropPage.maleCharacter.waist.x;
          maleDragDropPage.objTrouser[1+"_"+0].y = maleDragDropPage.maleCharacter.waist.y;
        if (maleDragDropPage.objTrouser[2+"_"+0].hitTestObject(maleDragDropPage.maleCharacter.chest))
         if (! _isDragging)
          maleDragDropPage.objTrouser[2+"_"+0].x = maleDragDropPage.maleCharacter.chest.x;
          maleDragDropPage.objTrouser[2+"_"+0].y = maleDragDropPage.maleCharacter.chest.y;
        if (maleDragDropPage.objTShirt[3+"_"+0].hitTestObject(maleDragDropPage.maleCharacter.chest))
         if (! _isDragging)
          maleDragDropPage.objTrouser[3+"_"+0].x = maleDragDropPage.maleCharacter.chest.x;
          maleDragDropPage.objTrouser[3+"_"+0].y = maleDragDropPage.maleCharacter.chest.y;

    You are trying to assign undefined instances of class objects rather than define them...
        objTrouser[0+"_"+0] = new trousers1;
        objTrouser[1+"_"+0] = new trousers2;
        objTrouser[2+"_"+0] = new trousers3;
        objTrouser[3+"_"+0] = new trousers4;
        objTrouser[4+"_"+0] = new trousers5;
    should be
        objTrouser[0+"_"+0] = new Trousers1();
        objTrouser[1+"_"+0] = new Trousers2();
        objTrouser[2+"_"+0] = new Trousers3();
        objTrouser[3+"_"+0] = new Trousers4();
        objTrouser[4+"_"+0] = new Trousers5();
    and I didn't look deeper to see why you aren't creating the instances you declared (trousers1, etc) instead of objTrouser[0+"_"+0] etc.

  • Undefined method callLater

    I'm getting the following error:
    1180: Call to a possibly undefined method callLater.
    for this function and am at a loss how to solve it.
    private function ch(event:Event):void{
    callLater(ChangeHandler,[event]);
    (The above code actually comes from the flex team itself from
    their Autocomplete demo.)
    I've tried import mx.core.UIComponent; and everything else I
    can think of.
    Can anyone help?

    What class does your class, the one in which function ch is a
    member, extend? It must extend a class where callLater is
    defined.

  • Call to possibly undefined method addChild

    when i use addChild method in my class I got this message . Why it shows error "Call to possibly undefined method addChild"

    ok that is the reasoning, add that and the import for movieClip to your class..
    when you dont extend from any preexisting class.. object is used which does not contain an addChild method, therefore that method does not exist.
    import flash.display.MovieClip;
    extends MovieClip..
    add those two things to your class and try again.

  • Flex problem - undefined method

    Hello!
    I was following the tutorial posted at http://www.adobe.com/devnet/livecycle/articles/lcdses2_mdd_quickstart.html but I'm getting an error just after I add the form. 
    I'm getting the following error message: 
    "1061: Call to a possibly undefined method commitRequiredOn through a reference with static type mx.data:DataService. ProductForm.mxml /FiberTest/src/FiberTest/forms line 89 Flex Problem" 
    This is in the code for ProductForm.mxml, and the same goes for lines 171, 178, 184 and 191. 
    Could anybody help me here?
    Thanks!!
    Marcos

    Hi saisri2k2,
    I'm using Flash Builder 4 Standard, build 272416.
    Thank you!
    Marcos

  • Undefined method addEventlistener

    ERRORS ON LINE 10 AND 11
    1061: Call to a possibly undefined method
    addEventlistener through a reference with static
    type FunButton.
    package
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    public class FunButton extends MovieClip
    public function FunButton ()
    this.addEventlistener (MouseEvent.ROLL_OVER, grow);
    this.addEventlistener (MouseEvent.ROLL_OUT, shrink);
    private function grow (event:MouseEvent):void
    this.scaleX = 1.5;
    this.scaleY = 1.5;
    private function shrink (event:MouseEvent):void
    this.scaleX = 1;
    this.scaleY = 1;

    use:
    addEventListener

  • 1180: Call to a possibly undefined method getDefinitionByName

    1180: Call to a possibly undefined method getDefinitionByName.   << i have this error
    i want to draw coins.
    so in library i have playerCoins100 and playerCoins200 movie clips with classes like name and base class: flash.display.MovieClip
    separated code:
    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                   //show points in user bag
                   var classNames:Array = ["playerCoins100", "playerCoins200"];
                   var boxesList:Array = [];
                   var ClassRef:Class;
                   for (var i:int = 0; i < classNames.length ; i++)
                        ClassRef = Class(getDefinitionByName(classNames[i]));
                        boxesList[i] = new ClassRef();
                        addChild(boxesList[i]);
                   var currentBox:MovieClip;
                   var numCol:int = 3;
                   for (var columnIterator:int = 0; columnIterator < boxesList.length; columnIterator++)
                        var column:int = columnIterator % numCol;
                        var row:int = int(columnIterator / numCol);
                        currentBox = boxesList[columnIterator];
                        currentBox.x = currentBox.width * column;
                        currentBox.y = currentBox.height * row;
                   //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    any ideas?

    how i can put this array to point with coordinate x=200 and y=300 ?
    need create mc and put elements to this mc? or how?

Maybe you are looking for

  • My Language Bar isn't showing up when I have Firefox active, although it shows up fine in other applications and my desktop. Any ideas?

    I noticed a couple days ago that my language bar wasn't showing up when I had Firefox active. At first I thought it was the bar in its entirety, but when I'm on the desktop, or even in AIM, the language bar still shows. I'm constantly switching betwe

  • How to refer MessageID in email receiver adapter

    Hi All, We are using module configuration in Receiver Mail adapter to send emails. Below is my configuration. (We are using SAP PI 7.11). Emails are being sent. However I am trying to include messageID in the email body however I could not. I have de

  • How to know oracle client or oracle server installed in m/c ?

    Hi all, Could any one tell me how to know whether oracle 10.1 s/w installed in my machine is client version or server . Is there any easy method..?? Thanks in advance.

  • Charts problem

    Hi hope somebody can help:- I have created a chart which accepts 2 date parameters. The chart works fine when there is data to display, but when there is no data (TOTAL_REQUESTS in the example below) I get an untidy SVG chart error:- SVG Chart error:

  • Mac OS X Flash Player Issues

    Mac OS X 10.4.11 Firefox 3.6.22 Safari 3.0.4 Flash Player 10.3 Shockwave Player 11 I didn't have this problem a few days. Since  then firefox automatically updated itself, as it usually does. It also  suggested that I update my adobe flash player, an