To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 05-02-2006, 05:16 PM   #1
MasterofNothing
Eternal Newbie
 
Join Date: Apr 2006
Location: Bitter cold Hell of the crappy NW
Posts: 384
[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
MasterofNothing is offline   Reply With Quote
Old 05-02-2006, 05:35 PM   #2
florianvanthuyn
lemon juice hurts your eyes
 
florianvanthuyn's Avatar
 
Join Date: Jul 2005
Location: Merelbeke, Belgium
Posts: 546
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!
florianvanthuyn is offline   Reply With Quote
Old 05-02-2006, 06:14 PM   #3
MasterofNothing
Eternal Newbie
 
Join Date: Apr 2006
Location: Bitter cold Hell of the crappy NW
Posts: 384
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
MasterofNothing is offline   Reply With Quote
Old 05-03-2006, 12:04 AM   #4
MasterofNothing
Eternal Newbie
 
Join Date: Apr 2006
Location: Bitter cold Hell of the crappy NW
Posts: 384
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
MasterofNothing is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash Newbies

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:52 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.