A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: handle multiple movie clip

  1. #1
    Member
    Join Date
    Feb 2007
    Location
    INDIA
    Posts
    64

    handle multiple movie clip

    Hello All,

    I have a flash template in which i have 10 buttons and i want to call different movie clip on different button and i have done it but main problem is that when i click on one button its movie play as i write my code like this

    on(release)
    {
    this.page.play();
    }

    but if click second time on it i run again so i want to remove this problem.

    2) when i click on another button the first movie clip still on that place and the second movie clip overwrites on just like this third one also overwrite on them and so on.

    Please tell me solution as soon as possible.

    Thanks

    Jamna

  2. #2
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    can you explain your problem again? I have no idea what you trying to say.

    "but main problem is that when i click on one button its movie play as i write my code like this "

    "but if click second time on it i run again so i want to remove this problem"

    'when i click on another button the first movie clip still on that place and the second movie clip overwrites on just like this third one also overwrite on them and so on."

    no idea what your saying..

    good luck

  3. #3
    Busy doing nothing Boris the Frog's Avatar
    Join Date
    Jan 2001
    Location
    Derby, UK
    Posts
    305
    ok - do you mean that
    1. on the first time you press a button a movie clip plays, BUT the second time that button is pressed it should NOT play that clip again?
    2. If every button is pressed, all the clips should be visible - ie. they should never overwrite another clip?

    If this is what you want to do it is quite simple.
    To stop them loading over the top of one another make sure to use different depths.
    To make sure they don't play twice you could:
    a. check to see if the clip is already loaded
    b. disable the button (button.enabled = false)
    c. increment a variable in the button every time it is pressed, when it exceeds the max number (1) then don't run the script
    --------------------------------------------------
    ‘There is no emoticon to express how I am feeling’ - Comic Book Guy
    There's an effective, simple solution to carbon sequestration... it's called 'coal', so leave it alone!
    There's an effective, simple solution to carbon capture....it's called 'trees', so plant some!

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