A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Keep value .selected for checkbox between frames?

  1. #1
    Member
    Join Date
    Jan 2004
    Posts
    87

    Keep value .selected for checkbox between frames?

    Hi
    I have worked hard on my project and i am stucked at the end.
    How come this allways happens to me?

    Here is my problem maybe someone will have a clue on how to fix it:
    i have a mc and inside i have some animation with some checkboxes.
    The checkboxes ar at frames 10 ,20 and 30(they are allway in the same pozition but diferent checkBoxes) so for example if i am at frame 10 and i select some checkboxes and then go to frame 20 and return back to frame 10 the checkboxes i selected r not selected anymore.

    Anyone knows how to make the selected state for checkbox remain between frames?

    Thank You Very Much

    P.S i'm using Fmx 04

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Store their values in _global variables and use the _global variables to set them each time the playhead hits that frame.

  3. #3
    Member
    Join Date
    Jan 2004
    Posts
    87
    oh i forgot to tell that i'm a beginer in action script
    I have 60 checkboxes manualy put on stage.
    I have make an _global array with all the checkboxes names for check all and uncheck all.
    But i dont have any idea how to save the value of checkboxes in a _global variable .One variable for each checkbox?
    I have to put some actions for each checkbox ? or one action on frame 10 that will set the value for all the checkboxes?

    Can u please explain more, for me to have an idea on how to start?

    Thank You

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Are these MX AS1.0 checkboxes or MX2004 AS2.0 ones?

  5. #5
    Member
    Join Date
    Jan 2004
    Posts
    87
    Sorry for forgoten to mention, they are im flash mx 2004.
    i used this property,
    .selected = true;
    i think AS2

  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Well I'm on MX only. Can't be of any further help to you! Sorry!

  7. #7
    Member
    Join Date
    Jan 2004
    Posts
    87
    Thanks for the replays, i hope i will fiind some modality to solve my problem.

    If not i will have to make the page again in mx and i relly don't want that becouse i worked a week and i'am allready over the deathline.

    Thanks again.

  8. #8
    Member
    Join Date
    Jan 2004
    Posts
    87
    YES!!!!
    I found a workaround to soleve my problem .
    I put the mc1 with checkboxes for example -from frame 10 in all the frames of the main mc, so in frames 20 - 30 i have made the mc1 alpha 0 (same with mc2 and mc3 from frames 20 and 30) this did't work becouse the checkboxes could still be pressed and they overlap eachother but the selected value for the checkboxes remain when played between frames.
    i used mc property: _visible = false; to dezactivate the mcs with checkboxes from frame 20 and 30 so now they cant be pressed.

    I tryed to explain my problem , maybe someone will have the same problem and want to use this metod.

    P.S please excuse my english

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