[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 224
  • Last Modified:

Do masks affect code?

Hello,

I have the same simple code working for a different project, but can't get it to work for this one. I am using lots of masks for this project but not for the other one. I have stepped through the code and after a movieclip with a mask plays sometimes the remainder of the code never gets executed. Would masks affect the code in any way? I can't think of anything else that might be the problem. I hope you can help!!

Thank you,
Vicky27
0
Vicky27
Asked:
Vicky27
  • 5
  • 5
  • 2
  • +1
1 Solution
 
cimburCommented:
Make sure you don't have a frame on your mask layer that has stop(); in it or do a global search for stop() to find if you have some actionscript hidden in a symbol somewhere.

cimbur
0
 
blue-genieCommented:
Hi Vicky, I would say no, a mask cant' affect your code.

check from where the code doesn't get executed - are there conditions that are tested for that aren't true, use trace actions to check.

You say sometimes the code never gets executed, - if it only happens sometimes, could it be that your movie is freezing somewhere along the line - do you get any messages in the output window, if you leave it for a while - does anything happen?

blu.
0
 
Vicky27Author Commented:
Hi Cimbur,

Thanks for your answer; I checked and I dont have any stops on any of my masks. Btw how do you do a global search? The only kind of search that I can do is per symbol, or frame or layer, all individually.

Thanks,

Vicky
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Vicky27Author Commented:
Hi Blu,

Thanks for letting me know that masks dont affect code. I dont have any conditions on my code that would prevent it from been executed. Also the movie clips are runnig fine; no freezing. If anything, sometimes some of them keep running all the time, even though I do have a stop at the end of them.

Vicky
0
 
blue-genieCommented:
vicky, i suggest you post your fla somewhere so we can have a look

no obvious problem jumps out.
I think what cimbur means by _global.search is using the movie explorer, there's no other global search that i'm aware of (unless there's something new in 2004 pro).

blu.
0
 
cimburCommented:
Hi Vicky,

Under the Edit menu you will find a "Find and Replace" item (MX pro 2004).  There are a lot of search options but make sure you select "current document" and "actionscript".

I have all the checkboxes on the right hand side selected and the search works really great.  It goes through every component and frame in the document.

I hope you'll be able to find some hidden code to help you solve your problem.

cimbur
0
 
PlamodoCommented:
Thank you Cimbur!!
0
 
Vicky27Author Commented:
Blu,

Can I email you my fla?

Vicky
0
 
blue-genieCommented:
i'll give it a bang
blue-genie(at)bigfoot(dot)com
0
 
blue-genieCommented:
Hey Vicky, got your file today, can you explain to me what its supposed to do?

ie. if i click on gallery a whole bunch of green lines are moving around - what else is supposed to happen.

I havent' been through it with a fine tooth comb but so far all i see is a whole lot of stops(), a couple of functions - but I don't see where they're called.

Can  you save me some time and explain what must happen when, and when exactly does the code not execute.

thanks.
blu.
0
 
Vicky27Author Commented:
Hi Blu,
Thanks for taking a look..
 
The words on the screen act as buttons.  The lines move when a button is clicked to create space for pictures or text (which I will add later).  In the click event for each button, code calls the exitpanel() function, which plays a movie clip to reset the screen to its 'home' state.  This movie clip is specific to the current state of the screen.  The last frame of these movie clips has code that calls NewPanel() which plays a movie clip associated with the button clicked and setting the screen to a new state.  
 
For example, if you are currently viewing 'About Mark', and you click 'Profile', the lines need to first change from the 'about mark' state, to the 'home' state, and then change again to the 'profile' state.  To do so, the 'About Mark' exit movie clip has to be played, followed by the 'Profile' movie clip.
 
I'm not sure if I've explained this very well.  Please let me know if you need further explanations.

Vicky
0
 
blue-genieCommented:
Vicky - i'm highly confused,

first of all, you movie setup seems rather odd,
upon multiple clicking, I see the problem as it starts playing over and over again.

1st problem, you've got some variable conflicts.
in the first frame you declare
_root.FirstMC = "aboutMarkREVERSE_frame";
_root.SecondMC = "";

in the last keyframe
var FirstMC = "";
var SecondMC = "";

are they one in the same? or they supposed to be different.
then in the same locations, you've repeated your functions - why?

now for example, let's say you click About Mark first  - your About Mark buttons has the following code on it:

on (release) {
      _root.SecondMC = "aboutMark_frame";
      _root.ExitPanel();
      _root.FirstMC = "aboutMarkREVERSE_frame";
}

here's my problem with this:

you set a the variable SecondMC at this point - then call the ExitPanel function, which is
function ExitPanel() {
      gotoAndStop(FirstMC);
}
at this point, FirstMC will be "aboutMarkREVERSE_frame" because that's what its set to at the first frame, but then you reset it again here, after the function call - why? You also don't call the newPanel() function.....

I'm hoping here that the comments I'm making will make sense to you and you get a light bulb moment, cause I'm thinking I don't get the logic behind your whole setup.
I would've rather created each animation as a separate mc and done it that way.

i see your gallery reverse mc which calls the newpanel function, but I don't see it anywhere else.

i'll have a look throughout today as i get a gap, but I'd like you to have a think about my comments and give me some feedback so I can get into your head as to what you were thinking in terms of the architecture logic.

ta.
blu.
0
 
Vicky27Author Commented:
Hi blu,

I just want to let you know that  I haven't forgotten about this; it just has been a couple hectic weeks for  me. I will go over my code again I should be able to reply to you soon.

Thanks,
Vicky
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 5
  • 5
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now