|
-
[RESOLVED] Pulling hair out over swapping MCs!
Hey everyone. I have a HUGE hurdle here. I am making a sort of pick and choose thingy. don't ask, LOL
Anyway even though my codes are hilarious to look at, they do work. I have a "point system" set up to tell the movie whixh frame to go to based on which MCs have been chosen.
My problem is that I can NOT for the life of me find anything that will help me swap MCs from one frame to another.
For an example here is what I have on one of my MCs:
Code:
on(rollOver){
_root.whatis = "Domino";
}
on(rollOut) {
_root.whatis="";
}
on (release) {
if (_root.qNum == 8){
domino.enabled = false;
}
else if (_root.qNum <= 8){
tellTarget ("_root.domino") {
_visible = false;}
_root.points = 2;
_root.score = _root.score + _root.points;
_root.qNum = _root.qNum + 1;
}
if (_root.qNum >= 1) {
_root.bonus = _root.bonus + 1;
}
}
As you can see, I have made the MC "disappear" once clicked, unless 8 other MCs have been clicked first.
ALL I WANT is to have this MC disappear from Frame 3 like it does now and APPEAR on Frame 4 in a certain spot.
So let's say the "domino" is the object in question.
on Frame 3 of the swf:
The player will click on the domino FIRST. (domino instance name "domino")
The domino disappears from view.
The player clicks "View Board" button that takes them to Frame 4
on Frame 4 of the swf:
The MC instance name "domino_small" has replaced the MC instance name "hit1" at X-35 Y-169
The player clicks the "Return" Button to make 7 more choices.
Seems simple, based on MC clicked, instance of small mc appears on another frame, and place holder on that other frame is gone, or replaced.
If you need visual clarifications, the fla is right here (MX Pro 2004)
Thanks for any help!
~MoN
If I am wrong, please just correct me and move on.. there is no need for all that pointing and laughing! ~MoN
-
lemon juice hurts your eyes
Just a quick try, hope it won't make your AS even more messed up .
When the "domino" is clicked set a variable, e.g. "domino_value" and make it equal 1 (or something).
When the player passes to the board, make sure every item is there, alfa-values = 0 (do this on the main timeline).
Make the AS check for the value of the variable:
if(domino_value == 1){
domino._alfa = 100;
}
Work that way for every item, and maybe, it will work, if not, then this was a waste of your and my time 
And if this code is very crappy, well sorry for trying
Florian Vanthuyne
WAR AGAINST SOLVED THREADS
mark yours as Resolved under Thread Tools!
-
THANKS!
I will give it a go! I have altered the movie workings just a bit since I posted the fla above. Some slight changes (and less code) so this might just do the trick!
I will try it out and post back to let you know!
variables...hmmm NEVER a waste of time when you see something new!
MUCH APPRECIATED!
~MoN
If I am wrong, please just correct me and move on.. there is no need for all that pointing and laughing! ~MoN
-
It did the trick! Perfect workings at last! I have only spent about 2 months on this tiny project.
I had to alter the code a bit, adding _root. here and there and some >= <= etc, as I have 24 object to make appear or disappear in 8 different spots.
But it was pretty simple after I got one to show up and disappear as I wanted!
Thanks again!
~MoN
If I am wrong, please just correct me and move on.. there is no need for all that pointing and laughing! ~MoN
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|