Problem accessing movieclip properties (Actionscript2 newbie)

Ask a Question related to Macromedia Flash, Design and Development.

  1. #1

    Default Problem accessing movieclip properties (Actionscript2 newbie)

    I am placing an instance of a movieclip onto the _root of my movie using
    createEmptyMovieClip(...) and then attachMovie(...).

    It all works fine - it appears and I can set and trace things like _x and _y
    with no problem.

    BUT

    When I trace movieinstance._totalframes I get 1 when there are actually 64.
    It also means that movieclip.gotoAndPlay has no effect.

    Why are some of the properties what they should be but some not?

    TIA
    Mark.


    MARK Guest

  2. Similar Questions and Discussions

    1. Accessing COM properties that take arguments
      sorry if this has been covered before, but I have an external COM object which has properties that require arguments... e.g. to write a property I...
    2. accessing textfield inside movieclip
      I want to create textfields dynamically and then be able to click on these textboxes to perform different actions depending on the value of the...
    3. MovieClip Properties
      I am trying to load an external .swf into a movieClip "dropZone". I want to control the size of the dropZone so that the external .swf fits into the...
    4. Accessing text fields within movieclip
      Fairly simple: var s = your_mc_name.your_textfield_name.text; trace(s);
    5. Accessing custom control properties
      Hello, I've created a custom control and want to set properties in the aspx page. <%@ Page language="c#" Codebehind="test_control2.aspx.cs"...
  3. #2

    Default Re: Problem accessing movieclip properties (Actionscript2 newbie)

    without seeing the actual file I am just guessing here, so please bear
    with me if I am covering redundant info.

    Are you trying to find the total number of frames before or after the
    movieclip is created? You may want to try checking this a frame later
    (but with the movieclip still existing on the stage) and see if that
    corrects your problem.
    Also, where are you using the code movieinstance._totalframes? Is it on
    the main timeline or in the movieclip itself? If it is in the movieclip
    try moving it out to the timeline that contains the movieclip.


    --
    Brandon Bradley
    Macromedia Certified Instructor
    [url]http://www.attconline.org/[/url]
    Brandon Bradley Guest

  4. #3

    Default Re: Problem accessing movieclip properties (Actionscript2 newbie)

    "Brandon Bradley" <brandonbradley@cox.net> wrote in message
    news:8K2Vd.157$3z.66@okepread03...
    > without seeing the actual file I am just guessing here, so please bear
    > with me if I am covering redundant info.
    >
    > Are you trying to find the total number of frames before or after the
    > movieclip is created? You may want to try checking this a frame later (but
    > with the movieclip still existing on the stage) and see if that corrects
    > your problem.
    > Also, where are you using the code movieinstance._totalframes? Is it on
    > the main timeline or in the movieclip itself? If it is in the movieclip
    > try moving it out to the timeline that contains the movieclip.
    >
    >
    > --
    > Brandon Bradley
    > Macromedia Certified Instructor
    > [url]http://www.attconline.org/[/url]
    The movieClips are created in external class files. They are then referred
    to from other class files. It just seems strange that some of the porperties
    seem to be as they should but some - like _totalframes are not.

    I've posted the code to:

    [url]http://www1.highburyquadrant.islington.sch.uk/flashoop/[/url]

    It's my first try at Flash OOP so please be kind!

    Thanks :)


    Mark 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