Welcome to GraphicForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

newbie variable problem with mc and scenes

 
   Graphic Forums (Home) -> Newbie Corner RSS
Next:  DataAssist and MySQL date format  
Author Message
city7

External


Since: Aug 29, 2006
Posts: 3



(Msg. 1) Posted: Tue Aug 29, 2006 11:39 am
Post subject: newbie variable problem with mc and scenes
Archived from groups: macromedia>flash (more info?)

Hello clever experts,

I've read the Flash tutorials and posts on variables, but I am stuck
in the fog on this one.

I have an mc with two frames that toggles a mask to reveal or hide
text in a different channel. How can I make the mc remember what frame
it was on in the previous scene instead of resetting, so that the user
does not have to keep clicking to show text in each new scene?

I've tried to solve this in a bunch of ways, including placing "on
(press)" script in each frame telling it to replicate the action in the
other named instances that are in the other scenes, but it doesn't
work, the mc resets anyway as soon as the scene changes.

Now I'm trying to make the mc frame 1 and 2 set a variable to true or
false, and in the first frame of each scene check the variable and send
the scene's mc instance to frame 1 or 2 depending on the variable.
Here is the code that is not working. Help?

on the mc button in frame 1:

on (press) {
set (textview, true);
// my variable that does not work
this.gotoAndStop(2);
// the text is hidden
}

on the mc button in frame 2:

on (press) {
set (textview, false);
// variable that does not work
this.gotoAndStop(1);
// now text shows
}

in the first frame of each scene:

if (textview == true) {
this.ani_chart.viewtext_chart.gotoAndStop(2);
}

ani_chart is the main scene mc, viewtext_chart is the instance of the
text toggle mc. I've also tried putting this script in the first frame
of the ani_chart mc with no result.

What am I doing wrong? It's driving me bonkers.

Any help would be most appreciated.

 >> Stay informed about: newbie variable problem with mc and scenes 
Back to top
Login to vote
city7

External


Since: Aug 29, 2006
Posts: 3



(Msg. 2) Posted: Tue Aug 29, 2006 1:36 pm
Post subject: Re: newbie variable problem with mc and scenes [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Oooh, I must be a clever expert. The solution is:

on the mc clip button in frame 1:

on (press) {
textview = true;
this.gotoAndStop(2);
}

in frame 2:

on (press) {
textview = false;
this.gotoAndStop(1);
}

at the beginning of the next scene:

if (textview = true) {
this.ani_screens.viewtext_start.gotoAndStop(2);
}

Now the mc checks the variable to see what frame it should be on in the
next scene.

apparently the set variable script disabled the variable after the mc
loaded, and there's no telling what vile bad manners == created to
offend Flash. However, better examples of different types of variable
scripting in the Flash help files would have been helpful.


city7.RemoveThis@yahoo.com wrote:
> Hello clever experts,
>
> I've read the Flash tutorials and posts on variables, but I am stuck
> in the fog on this one.
>
> I have an mc with two frames that toggles a mask to reveal or hide
> text in a different channel. How can I make the mc remember what frame
> it was on in the previous scene instead of resetting, so that the user
> does not have to keep clicking to show text in each new scene?
>
> I've tried to solve this in a bunch of ways, including placing "on
> (press)" script in each frame telling it to replicate the action in the
> other named instances that are in the other scenes, but it doesn't
> work, the mc resets anyway as soon as the scene changes.
>
> Now I'm trying to make the mc frame 1 and 2 set a variable to true or
> false, and in the first frame of each scene check the variable and send
> the scene's mc instance to frame 1 or 2 depending on the variable.
> Here is the code that is not working. Help?
>
> on the mc button in frame 1:
>
> on (press) {
> set (textview, true);
> // my variable that does not work
> this.gotoAndStop(2);
> // the text is hidden
> }
>
> on the mc button in frame 2:
>
> on (press) {
> set (textview, false);
> // variable that does not work
> this.gotoAndStop(1);
> // now text shows
> }
>
> in the first frame of each scene:
>
> if (textview == true) {
> this.ani_chart.viewtext_chart.gotoAndStop(2);
> }
>
> ani_chart is the main scene mc, viewtext_chart is the instance of the
> text toggle mc. I've also tried putting this script in the first frame
> of the ani_chart mc with no result.
>
> What am I doing wrong? It's driving me bonkers.
>
> Any help would be most appreciated.

 >> Stay informed about: newbie variable problem with mc and scenes 
Back to top
Login to vote
city7

External


Since: Aug 29, 2006
Posts: 3



(Msg. 3) Posted: Tue Aug 29, 2006 1:46 pm
Post subject: Re: newbie variable problem with mc and scenes [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Oops, I mean technically now the scene checks the variable (set by the
mc) in the first frame to see what frame to put the mc on.

Okay, no more posts.

city7 DeleteThis @yahoo.com wrote:
> Oooh, I must be a clever expert. The solution is:
>
> on the mc clip button in frame 1:
>
> on (press) {
> textview = true;
> this.gotoAndStop(2);
> }
>
> in frame 2:
>
> on (press) {
> textview = false;
> this.gotoAndStop(1);
> }
>
> at the beginning of the next scene:
>
> if (textview = true) {
> this.ani_screens.viewtext_start.gotoAndStop(2);
> }
>
> Now the mc checks the variable to see what frame it should be on in the
> next scene.
>
> apparently the set variable script disabled the variable after the mc
> loaded, and there's no telling what vile bad manners == created to
> offend Flash. However, better examples of different types of variable
> scripting in the Flash help files would have been helpful.
>
>
> city7 DeleteThis @yahoo.com wrote:
> > Hello clever experts,
> >
> > I've read the Flash tutorials and posts on variables, but I am stuck
> > in the fog on this one.
> >
> > I have an mc with two frames that toggles a mask to reveal or hide
> > text in a different channel. How can I make the mc remember what frame
> > it was on in the previous scene instead of resetting, so that the user
> > does not have to keep clicking to show text in each new scene?
> >
> > I've tried to solve this in a bunch of ways, including placing "on
> > (press)" script in each frame telling it to replicate the action in the
> > other named instances that are in the other scenes, but it doesn't
> > work, the mc resets anyway as soon as the scene changes.
> >
> > Now I'm trying to make the mc frame 1 and 2 set a variable to true or
> > false, and in the first frame of each scene check the variable and send
> > the scene's mc instance to frame 1 or 2 depending on the variable.
> > Here is the code that is not working. Help?
> >
> > on the mc button in frame 1:
> >
> > on (press) {
> > set (textview, true);
> > // my variable that does not work
> > this.gotoAndStop(2);
> > // the text is hidden
> > }
> >
> > on the mc button in frame 2:
> >
> > on (press) {
> > set (textview, false);
> > // variable that does not work
> > this.gotoAndStop(1);
> > // now text shows
> > }
> >
> > in the first frame of each scene:
> >
> > if (textview == true) {
> > this.ani_chart.viewtext_chart.gotoAndStop(2);
> > }
> >
> > ani_chart is the main scene mc, viewtext_chart is the instance of the
> > text toggle mc. I've also tried putting this script in the first frame
> > of the ani_chart mc with no result.
> >
> > What am I doing wrong? It's driving me bonkers.
> >
> > Any help would be most appreciated.
 >> Stay informed about: newbie variable problem with mc and scenes 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
FLV help for a newbie.. (MX2004PRO) - OK... After hours of trying, i out of ideas... I have 7-8 FLV's, first, none of can be imported to flash for no known reason. Second, using the media playback component, i have been unsucessful in playing video, from either a webserver, or a local..

Newbie: How to include download Flash Player - Greetings, I've got a rookie question: How do I include a "download Flash Player" option at the start of the Flash intro to my web site for those who don't have it? Thanks! Anna

A simple form!@#$ Sheesh! newbie - **NEWBIE ALERT** My boss wants a simple form in our Flash site that sends an email with this info: - Name - Email address - Phone - Fax - Message (NOTE: Many solutions simply mimic an email exactly. I need more than that, phone, fax and maybe more..

quizzes and levels - way newbie - I've been evaluating FlashMX 2004 and am slightly confused(directorUser) I've created a simple quiz from the templates and the quiz.swf works just fine, keeps score and everything. However when I try and simply pull it into a different movie..

Newbie question - Can a flash app be "installed"? - Hi, I am thinking about possibilities for a web application project coming up. HTML + JSF could work but was wondering if it were possible to use flash to create web forms and install them on some machines - so that they would not have to be..
   Graphic Forums (Home) -> Newbie Corner All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]