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

  1. #1

    Default Swapping symbols

    Can you swap a symbol using script? I want to use the same timeline based animation over and over again and all I want to do is change the symbol each time using script.

    Thanks

    MC Frog Guest

  2. Similar Questions and Discussions

    1. need help with image swapping.
      hi all need help with image swapping. its perfectly working in my system offline as well as online. but its not showing the image in other...
    2. Second IMG not swapping
      Okay, I already have the layer floating properly that contains the two boxes and the first box is swapping the pictures properly. However, for some...
    3. Swapping images?
      Hello, this is more than likely a newb question, but non the less, I must ask. How does one have an image swap in a portion of a web page via a...
    4. Swapping sprites
      Is there an easy way to swap sprites? ie so two sprites end up swapping their sprite nums? I can't seem to find one, although I'm aware you could...
    5. swapping swf
      Hi, Does anyone have any scripts that will swap an swf on a page? Preferably it would use javascript, but anything will do. Even a tutorial would...
  3. #2

    Default Re: Swapping symbols

    Symbol swapping and register class are allowed at design time. You can try to
    actionscript
    the animation of your timeline and then extend the MovieClip object like this:

    MovieClip.prototype.yourAnimation = function () {

    }

    This way you have the behaviour encoded as a function which can be applied to
    every symbol
    which inherits from MovieClip.

    HTH,

    -c.

    CesareRocchi Guest

  4. #3

    Default Re: Swapping symbols

    My conclusion is that you cannot swap symbols using actionscript in the way I
    want, for the duration of the MC. You can, it appears, swap the MC until the
    next keyframe by using:

    deleteMovieClip();
    attachMovie("foo","foo2",0);

    But this means you have to place this in a ClipEvent for every keyframe and
    isn't the cleanest solution. So is there another way to do what I want?



    MC Frog Guest

  5. #4

    Default Re: Swapping symbols

    This is not swapping in the technical sense, this is substitution.
    Anyway, if you want you can go on with your solution but remember that
    remove/delete statements don't actually erase objects, they simply 'suggest'
    the player that
    it's time to clean the memory. If you have to do you trick many times, e.g.
    500, there could be
    problems with performance.

    btw 'deleteMovieClip()' is not a method in my Flash MX. r u using mw2004?

    HTH,

    -c.

    CesareRocchi 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