3 Replies Latest reply on May 9, 2006 8:53 PM by kglad

    .click question

    Level 7
      This is a multi-part message in MIME format.

      ------=_NextPart_000_0008_01C6737B.3B4EF600
      Content-Type: text/plain;
      charset="iso-8859-1"
      Content-Transfer-Encoding: quoted-printable

      In delphi I can use Button1.click to make a button click and execute the =
      code behind it. How do i do this in actionscript.


      Cheers


      ------=_NextPart_000_0008_01C6737B.3B4EF600
      Content-Type: text/html;
      charset="iso-8859-1"
      Content-Transfer-Encoding: quoted-printable

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      <HTML><HEAD>
      <META http-equiv=3DContent-Type content=3D"text/html; =
      charset=3Diso-8859-1">
      <META content=3D"MSHTML 6.00.2900.2873" name=3DGENERATOR>
      <STYLE></STYLE>
      </HEAD>
      <BODY bgColor=3D#ffffff>
      <DIV><FONT face=3DArial size=3D2>In delphi I can use Button1.click to =
      make a button=20
      click and execute the code behind it. How do i do this in=20
      actionscript.</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
      <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
      <DIV><FONT face=3DArial size=3D2>Cheers</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
      <DIV> </DIV></BODY></HTML>

      ------=_NextPart_000_0008_01C6737B.3B4EF600--

        • 1. Re: .click question
          kglad Adobe Community Professional & MVP
          use the onPress method unless you are using a button component.
          • 2. Re: .click question
            Level 7
            I have the following code on a button called DISCOSHOP

            on (release) {

            var leveli;
            var intro2:MovieClip = this.attachMovie("signal_mc", "signal_mc"+leveli,
            leveli,{_x:65, _y:291});
            var hitcount:Number = _level0.hitcount;
            leveli = leveli + 1;
            }

            I need to run this code from within another movie at a certain time. I tried
            DISCOSHOP.click but nothing happens.

            When I right click DISCOSHOP and select linkage and click export for action
            script I get the following errors:

            If I call the identifier wee I get :

            **Warning** The linkage identifier 'wee' was already assigned to the symbol
            'DISCOSHOP', and cannot be assigned to the symbol 'DISCOSHOP', since linkage
            identifiers must be unique.


            If I call the identifier DISCOSHOP I get

            **Warning** The linkage identifier 'DISCOSHOP' was already assigned to the
            symbol 'DISCOSHOP', and cannot be assigned to the symbol 'DISCOSHOP', since
            linkage identifiers must be unique.


            Any help appreciated.


            Cheers


            • 3. Re: .click question
              kglad Adobe Community Professional & MVP
              you can't cause the execution of code that's in an on(release) handler to execute via actionscript. you can put that code in a funciton and call that function with an on(release) handler and "...within another movie at a certain time".

              those compiler errors are pointing out a name collision. there are several possiblities, none of which are diagnosable without looking at your fla. you could try deleting movieclips from the library until you no longer get that error. that would allow you to narrow the movieclips causing the name collision.