Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default Declaring methods

    I'm an old school C++ programmer that switched to CF development years back.
    Now with AS3 I've decided to branch out and learn Flex3 and AS3.


    I've been working with the sample code in a few books and all have been having
    similar issues. It looks like a method needs to be declared before calling it
    which makes total sense to my C++ days. Take the sample code as an example.
    If I try to run it I get an error in the flexbuilder stating: "Call to a
    possibly undefined method Play through a reference with a static type of
    mx.effects:Move." on the line "<mx:Button label="Button"
    click="transMoveTestIn.Play()"/>"

    Can anyone shed light on why this is happening? I can't seem to find anything
    on declaring methods. I see that I can declare functions in AS3 scripts...

    TIA!


    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">

    <mx:Move id="transMoveTestIn"
    target="{frmTest}"
    xFrom="502"
    xTo="600"
    duration="1500"/>
    <mx:Form x="502" y="104" width="261" height="361" id="frmTest">
    <mx:Text text="Test Form" width="157" fontWeight="bold"/>
    <mx:Text text="Test text" />
    </mx:Form>
    <mx:Form x="163" y="104" width="261" height="361">
    <mx:Text text="Move Form"/>
    <mx:Button label="Button" click="transMoveTestIn.Play()"/>
    </mx:Form>

    </mx:Application>

    SEJ-69 Guest

  2. Similar Questions and Discussions

    1. Declaring Web Services in AS
      Hi, I know I can declare/initiate new WS using <mx:WebService> im my MXML code. I was wondering if it's possible to declare these services using...
    2. Declaring the name of a grid
      How can I declare the name of a grid, then use it to bind it to the datasource? I have 3 grids, each with different id's. dgOne, dgTwo, dgThree....
    3. Declaring a Variable
      When I "test movie" a long Flash movie whose first three lines are //--- Number of Questions-- var my_totalquestions:Number = 20...
    4. #26350 [NEW]: Inherited methods can't access private methods
      From: forseti at oak dot rpg dot pl Operating system: Windows 98 SE PHP version: 5.0.0b2 (beta2) PHP Bug Type: Zend Engine 2...
    5. Aliased setter methods behave differently than other methods?
      Here's another question... I am aliasing and redefining certain methods, determined at runtime. Normal methods work fine, but methods ending in '='...
  3. #2

    Default Re: Declaring methods

    bump
    SEJ-69 Guest

  4. #3

    Default Re: Declaring methods

    bump
    SEJ-69 Guest

  5. #4

    Default Re: Declaring methods

    AS is case sensitive, so

    .... click="transMoveTestIn.play()...

    and not

    .... click="transMoveTestIn.Play()

    TS
    VarioPegged Guest

  6. #5

    Default Re: Declaring methods

    Hmm... It already is a 'P'... I verified the case is identical and it is...
    SEJ-69 Guest

  7. #6

    Default Re: Declaring methods

    Oh, nevermind! It should be a lower case 'p'.. DOH. Thanks!!!
    SEJ-69 Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139