A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: manipulating a duplicated instance

  1. #1
    Senior Member
    Join Date
    Jun 2001
    Posts
    250

    manipulating a duplicated instance

    In the past I have singled ot and manipulated a generated duplicated instance - for example clip3._xscale =150 which owuld result in a single clip being identified amonst the duplicates.

    However, in the code below I'm unable to target a clip.

    Does anyone know if this may have something to do with usting the Math functions?

    for(i=0;i<nrc;i++){
    duplicateMovieClip("clip2","orbit"+i,i);

    orbit23._xscale=600; // this has no effect????????

    mymath = _parent.clip1["orbit"+i]._xscale = 300*Math.cos(Math.PI/-180*nrc*i+Math.PI*cnt*step/300); ///45width,circum

  2. #2
    Senior Member
    Join Date
    Jan 2004
    Posts
    141
    It worked fine for me, so long as you have a MC on the stage with 'clip2' as it's instance name, and nrc = 24 or more..... I'm no expert but I didn't think you could have an expression like 'mymath = something = somethingelse'.....

  3. #3
    Senior Member
    Join Date
    Jan 2004
    Posts
    141
    oooh, just tried the mymath = something = something else and it did work....

  4. #4
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    you can have an expression like that as it evaluates moving from right to left:

    PHP Code:
    greeting hi "hello";

    trace(greeting);
    trace(hi); 
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center