This must be a common problem, but I haven't found information on how to deal with it. I have a quiz stack with different substacks for each section of the quiz. Each card within a substack shares three different background groups. For the most part, this works well. If I add a card to a substack, it matches the other cards. If I modify the layout for one of the groups in a substack, all the cards reflect the changes, and remain consistent.
My problem is dealing with the final card of each substack. It needs slightly different behavior from the other cards. In my stack, the only difference needed is to have my "nextCard" button jump to a different substack, instead of the next card in the current substack. I just need to modify a single line of a single script. However, I can imagine needing more complex variations on the last card of a substack.
Is there a way to modify, on a single card, the behavior of a background group, or of an object within a background group? Is there a better way to approach this?
The only thing that I have figured out so far is to remove all the groups from the last card, then create similar-looking objects that are not grouped, and copy all the scripts from the grouped objects into them. Then I modify the script for my "nextCard" button. Not only is this very tedious to do even once, but every subsequent change to the substack groups requires separate modification of the final card. And if I want to add an additional card to the stack after my current, ungrouped last card, then I have another round of manual editing to do.
There has got to be a better way. I'm using Revolution Studio 2.7.4 no Mac OS 10.4.9. What do you suggest?
Derek
Changing background group behavior on one card
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Changing background group behavior on one card
Derek Roff
Language Learning Center
University of New Mexico
Language Learning Center
University of New Mexico
Hi derek,
does a simple:
in the script of that namely button work for you?
This way you could use the same group on every card and the button still does what you want.
At least that's how I understand your problem...
Regards
Klaus
does a simple:
Code: Select all
...
if the num of this cd = the num of cds then
## now you are on the LAST card of the stack!
go stack "name of substack here"
## or whatever...
else
## there IS a next card in the stack...
go next cd
end if
...
This way you could use the same group on every card and the button still does what you want.
At least that's how I understand your problem...
Regards
Klaus
Thanks, Klaus. Your suggestion will solve my current problem, and is much easier than anything I had thought of.
Is there a good way to tackle the more general problem of single-card modifications to group behaviors? In a more complex situation, it seems like I might have half a dozen "if statements" in different scripts, all evaluating "last card" status on every card, just to affect the behavior of a single card.
And if I also want to modify the group behavior on another card or two in a stack, which aren't the last card, then my "if statements" become increasingly complex. Probably Revolution doesn't address this directly.
Derek
Is there a good way to tackle the more general problem of single-card modifications to group behaviors? In a more complex situation, it seems like I might have half a dozen "if statements" in different scripts, all evaluating "last card" status on every card, just to affect the behavior of a single card.
And if I also want to modify the group behavior on another card or two in a stack, which aren't the last card, then my "if statements" become increasingly complex. Probably Revolution doesn't address this directly.
Derek
Derek Roff
Language Learning Center
University of New Mexico
Language Learning Center
University of New Mexico
I'm sure you will handle the small increase in complexity Note that it's better to use a switch control structure in this case.derek wrote: "if statements" become increasingly complex.
Code: Select all
on mouseUp
switch the name of this card
case "SpecialBehaviour1"
-- behviour for a special card
break
case "SpecialBehaviour2"
-- behviour for another special card
break
case "LastCard"
-- behviour for last card
break
default
-- behviour in all other cards of the group
end switch
end mouseUp