mcs set as invisible appear instead visible for a while

  • esse_bi
  • Novice
  • Novice
  • No Avatar
  • Joined: Sep 19, 2008
  • Posts: 15
  • Status: Offline

Post September 19th, 2008, 6:24 am

Hi everyone
I've four mcs on my root and I've set them as not visible except one.
If I try the swf it works fine, but if I publish it, I see all of the four mcs for a while then the three tha have to be invisible disappear, why are they visible in the beginning?
thx a lot :?:
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post September 19th, 2008, 6:24 am

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post September 19th, 2008, 7:15 am

How are you making them "invisible"? Are you simply clicking the "eye" on the respective layer to hide them? If so that won't work. That's only for ease of editing. When publishing they'll still show up. If you are doing it with ActionScript then post your code.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • esse_bi
  • Novice
  • Novice
  • No Avatar
  • Joined: Sep 19, 2008
  • Posts: 15
  • Status: Offline

Post September 19th, 2008, 7:24 am

Hi,
thx for your answer.
I've a code in the first frame where I make them invisible
_root.mymc1._visible=true
_root.mymc2._visible=false
_root.mymc3._visible=false
_root.mymc4._visible=false


then I've a movieclip that change the values of 4 variables using hittest
then a mc as controller that onCLipEvent(enterFrame) reads the value of the variables and set the mcs visible or not according to it.
Everything works, except that my mcs appears for a while on startup ! :hmm:
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post September 19th, 2008, 7:37 am

try inserting a frame at the beginning and set the visibility there.
i.e. instead of beginning your movie on frame one, insert a keyframe which would become frame 1, establish your visibility, and begin your movie on frame 2
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • esse_bi
  • Novice
  • Novice
  • No Avatar
  • Joined: Sep 19, 2008
  • Posts: 15
  • Status: Offline

Post September 19th, 2008, 8:18 am

yes,
that's how it is made
but nothing, they appear!
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post September 19th, 2008, 8:29 am

It's been awhile since I've done anything with Flash, but don't MovieClips have a properties panel in the IDE where you can set the default _visibility ?

If not, set the _visible property on the MovieClips themselves. The player should come across that faster than anywhere else.
Code: [ Select ]
this._visible = false;
Strong with this one, the sudo is.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post September 19th, 2008, 8:37 am

Give this a shot if Joe's suggestion doesn't work :

Code: [ Select ]
this.onEnterFrame = function () {
_root.mymc1._visible=true;
_root.mymc2._visible=false;
_root.mymc3._visible=false;
_root.mymc4._visible=false;
}
 
  1. this.onEnterFrame = function () {
  2. _root.mymc1._visible=true;
  3. _root.mymc2._visible=false;
  4. _root.mymc3._visible=false;
  5. _root.mymc4._visible=false;
  6. }
  7.  
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post September 19th, 2008, 8:41 am

That's going to require nulling that onEnterFrame event once the movie loads.
Strong with this one, the sudo is.
  • esse_bi
  • Novice
  • Novice
  • No Avatar
  • Joined: Sep 19, 2008
  • Posts: 15
  • Status: Offline

Post September 19th, 2008, 8:49 am

thx a lot
I've set the alpha property of the movieclips to 0
then I set their alpha to 100
instead of turning on visibility

now it works!

:)
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post September 19th, 2008, 8:50 am

something like this should work
Code: [ Select ]
delete this.onEnterFrame;
trace("done");
  1. delete this.onEnterFrame;
  2. trace("done");
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.

Post Information

  • Total Posts in this topic: 10 posts
  • Users browsing this forum: No registered users and 43 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.