dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: $_inheritance_$ (the movieclip variety)

  1. #1
    Senior Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    135

    $_inheritance_$ (the movieclip variety)

    Hi there,

    I am making a presentation with a collection of animated charts in it.

    I have a movieclip "mainScreen_mc" and inside it this are two instances ("plot1" and "plot2") of another moveieclip
    "plotScreen_mc".
    I want to insert a series of frames (bitmap images depicting a chart) into the "plot1" and a different set of images into "plot2".
    both animations can then play at the same time, and I hope to expand the project to have up to 10 diferent animated charts.

    I am doing all this with the manual controls rather than actionscript.

    My problem, which is probably very basic, is that when I open up "plot1" and insert an image it apears in both the instances "plot1" and "plot2".

    How do I keep the inherited attributes of the movieclip "plotScreen_mc" and still have indipendent controle over each instance of that movie clip.

    I hope you can help,

    many thanks,

    Tim
    For solutions to climate change visit www.gci.org.uk

  2. #2
    Senior Member
    Join Date
    Aug 2003
    Posts
    163
    You can't without using components or dynamic variables, you will have to make a separate MC for each of your plots.Although this seems cumbersome, what you could do is drag your plot1 onto the stage hit ctrl+b then hit f8 and name the new MC plot2.

  3. #3
    Senior Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    135
    Thanks Treylok,
    That worked a treat.

    If I could ask you one more question.

    I am making multiple instances of the movieclip "screenPlot_mc", plot1, plot2, plot3 etc.
    Within the movieclip screenPlot_mc are two other movie clips "past_mc" and "future_mc". I use one to load in an image for the first half of my chart (dates1800-1999) and I use the other to load the second image (2000-2200).

    I would like to make the sizes of these internal movie clips adjust themselves acording to the size of the parent. So for example if I create an instance of "screenPlot_mc" called "plot4" and I drag it to be realy wide, then the two internal movie clips will also become wide.

    I have been trying to use the .x and .y functions but nothing is happening.

    Any bright ideas would be welcome.

    Cheers,

    Tim.
    For solutions to climate change visit www.gci.org.uk

  4. #4
    Senior Member
    Join Date
    Aug 2003
    Posts
    163
    try _xscale and _yscale or _width and _height

    so for instance in each sub movie you would have:

    onClipEvent(load [or enterFrame]){
    _width = _parent._width /2
    _height = _parent._height
    _x = [set up xlocation here, could be _parent._x +_width/2]
    _y = _parent._y
    }

    It might work, give it a try.

  5. #5
    Senior Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    135
    Treylok,
    that worked perfectly. Thank you.
    For solutions to climate change visit www.gci.org.uk

  6. #6
    Senior Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    135
    Ah, actualy, I have beffuddled myself here a bit.

    Is there any chance someone can write a few lines for me and post it as a .fla

    What I want to do is the following:

    Have a movieclip on stage ("main_mc" 600x300pixels)
    This contains several instances of a second movieclip ("plotArea_mc" 250x100). I can resize and reposition these instances individually.
    The movie clip "plotArea_mc" contains two further movie clips "past_mc" and "future_mc" (100x100 each and positioned side by side).

    I have several series of bitmaps.
    past_A_01.bmp, past_A_02.bmp, past_A_03.bmp etc.
    past_B_01.bmp, past_B_02.bmp, past_B_03.bmp etc.
    etc.
    etc.

    future_A_01.bmp, future_A_02.bmp, future_A_03.bmp etc.
    future_A_01.bmp, future_A_02.bmp, future_A_03.bmp etc.
    etc.
    etc.

    I want to use these bitmaps as frames for diferent animations. I want to house my animations in pairs (one past animation and one future animation) in the variouse instances of the "plotArea_mc" movieclip.

    So the individual animations are actualy housed in the various instances of the "past_mc" and "future_mc".

    If you think this is doable, could you build this structure of movie clips and post it. This probably sounds very cheaky, but I have been banging my head against this problem all night.

    Thank you in advance.

    Tim.
    For solutions to climate change visit www.gci.org.uk

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