mcs set as invisible appear instead visible for a while

  • esse_bi
  • Novice
  • Novice
  • esse_bi
  • Posts: 15

Post 3+ Months Ago

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
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • esse_bi
  • Novice
  • Novice
  • esse_bi
  • Posts: 15

Post 3+ Months Ago

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
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

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
  • esse_bi
  • Novice
  • Novice
  • esse_bi
  • Posts: 15

Post 3+ Months Ago

yes,
that's how it is made
but nothing, they appear!
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

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;
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.  
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

That's going to require nulling that onEnterFrame event once the movie loads.
  • esse_bi
  • Novice
  • Novice
  • esse_bi
  • Posts: 15

Post 3+ Months Ago

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
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

something like this should work
Code: [ Select ]
delete this.onEnterFrame;
trace("done");
  1. delete this.onEnterFrame;
  2. trace("done");

Post Information

  • Total Posts in this topic: 10 posts
  • Users browsing this forum: No registered users and 22 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
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.