Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Empty Mc, Layer Problem



I have this strange problem thats probably and easy fix, but i cant fint it through a search...

I have 1 movie called site.swf
In this movie i create an empty mc on layer 1 called "interface"
"interface" calls on main.swf and loads my border and buttons.
in main.swf i have another empty mc, that when the buttons are clicked, loads the pages for my website. It calls on these files to be placed in layer 1 as well.
my problem is when i click to load these pages, it places the content above EVERYTHING in the main.swf movieclip, although its in a timeline layer below others with stuff that i would like to stay on top at all times.

how do i fix this?



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 03-15-2004, 02:27 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Empty Mc, Layer Problem
I have this strange problem thats probably and easy fix, but i cant fint it through a search...

I have 1 movie called site.swf
In this movie i create an empty mc on layer 1 called "interface"
"interface" calls on main.swf and loads my border and buttons.
in main.swf i have another empty mc, that when the buttons are clicked, loads the pages for my website. It calls on these files to be placed in layer 1 as well.
my problem is when i click to load these pages, it places the content above EVERYTHING in the main.swf movieclip, although its in a timeline layer below others with stuff that i would like to stay on top at all times.

how do i fix this?

Loading An Empty Movie Clip On A Different Layer?
G'day All!

ok I have a button, when I rollover it, it brings up a movie clip which is basically just an image fading in. when you roll off it fades away....

I have got an empty movie clip on the stage which I am loading into..

But it keeps loading ontop of all my layers, so how do I make it load say on layer 2???????????????




Im using the following code..

__________________________________________________ _________________

on (rollover) {
_root.attachMovie("rollover2","rolloverClip2",2);
_root["rolloverClip2"]._x = 391;
_root["rolloverClip2"]._y = 278;

}

on (rollOut) {
_root.attachMovie("rollover2_off","rolloverClip2", 2);
_root["rolloverClip2"]._x = 391;
_root["rolloverClip2"]._y = 278;

}

__________________________________________________ _________________

Create An Empty Movie Clip On A Certain Layer?
Just wondering if it's possible to specify what layer a new empty movie clip can be made on?

I have this code:

code:
function randomPoint(mc, r, x, y) {
var rotn = Math.random()*(Math.PI*2);
var size = random(r)
px = x+(Math.sin(rotn)*size);
py = y+(Math.cos(rotn)*size);
mc.moveTo(px-1,py-1);
mc.lineTo(px+1,py+1);
mc.moveTo(px+1,py-1);
mc.lineTo(px-1,py+1);
}
_root.createEmptyMovieClip("myEmptyMovieClip",1000 0);

myEmptyMovieClip.lineStyle(5,0x00FF00,100);


onEnterFrame = function() {
if (!prevTextVar) {
prevTextVar = text.text
}

if (int(text.text)-prevTextVar >=70) {
randomPoint(myEmptyMovieClip, 225, 299.4, 272.5);


}
prevTextVar = text.text
}


I want it do draw the points on a lower level, so then i can place images on top, then when they move, the dots appear!

Thanks alot,
Dave.

Grabbing The Empty Space Of An Empty Movie Clip
OK, so I've created an emptymovie clip and have attached clips to it, so that when I attach a drag action (actually, I did the drag through onPress and onRelease), the user can click and drag all the clips at once. However, it only detects when I click on one of the actual child clips...I'd like to be able to click on the space between the clips.

Here's the swf:
http://www.public.iastate.edu/~dnguy.../scrapbook.swf


The relevant code:

Code:
this.createEmptyMovieClip("mainclip", 1);

for(var i=0; i < nPics; i++){
var cclip = mainclip.createEmptyMovieClip("clip_"+fileNames[i], i);


myMCL.loadClip( gFolder + "/" +
fileNames[i],
cclip);

}

Code:
mainclip.onPress = function(){
this.xoff = this._xmouse;
this.yoff = this._ymouse;
this.onMouseMove = DragClip;

}

mainclip.onRelease = function(){
mainclip.onMouseMove = null;

}

function DragClip(){

this._x = _root._xmouse - this.xoff;
this._y = _root._ymouse - this.yoff;

}

Very Weird... Empty/non-empty Button Problem/bug
hey... i was just messing around when i had this code

ActionScript Code:
txt.autoSize = "left";btn.onRelease = function(){trace("it doesnt work!");}btn._width = txt._width;txt2.autoSize = "left";btn2.onRelease = function(){trace("it works!");}btn2._width = txt._width;


as you have read, the one does work and the other doesnt... that's quite weird because there almost the same buttons (not movieclips, buttons)... EXCEPT for this: the one that doesnt work is empty (only the hit tab is filled with a shape) and the other one has the up and hit area filled... i attached i fla to make it more clear

who has a good explanation for this problem(/bug)

Help With Loading Swf In To Layer 1 From Layer 0 And Nutrelizing Layer 0
I have my main movie- main.swf in level 0.
I need to load a movie - s1.swf to level one and disable level 0 - main.swf,
Then with a button click i need to goto main.swf - level o enable it & of course remove movie s1.swf.

Thank you for your help.

How To Check Is An Empty MovieClip Is Really Empty?
I'm creating an empty movieClip that will load a new .swf (from a _global variable) if the empty movieClip is really empty. Unfortunately, I'm not really sure how to check to see if it's empty. Any suggestions would be appreciated.

My code currently looks like this:

// Initialize variables
_global.sceneVar = "CiA_Master2.swf";
// creat empty movie clip
var container:MovieClip = createEmptyMovieClip("container", 2);
var mcLoader:MovieClipLoader = new MovieClipLoader();
//"IF" statement would go on this line, perhaps something like this (?): if(container = "") {
mcLoader.loadClip(sceneVar, container);
//end "IF" statement

I'm hoping to use this in a master .swf that will load other modular .swf files into it.

How Do I Empty An Empty Movie Clip
hello

how do I remove a movie clip off of the stage that I created using

createEmptyMovieClip

Thanks in advance

Erasing The Top Layer With A Line To Show The Layer Beneath It
I was curious if anyone would be able to help me out. I have a layer that is a menu with some buttons. When a button is hit, I'd like to do this: A line from above the menu will go down the page, and as it goes down it apperas to erase the menu layer and show the layer beneath it. So as it goes down, what is beneath the line is still the menu page but above the line is the information (movie clip) that should be shown to that corresponding button. Any one have any ideas?

Thanks
Have a Happy New Year
Ty

Creating A Delay/Pause, Frome Layer To Layer.
Hello,

I'v been having trouble with my newest project, i'm trying to create a pause from it going from 1 layer to the next without using frames.

If i use the frames my project just messes up, so im trying to create a pause of going from frame 1 to frame 2 to frame 3 up to 20.

If someone could help me i'll be really great full.

Layering Problem: McText (layer 1) Over McText2 (layer 2)
Hi,

Quickie: Have 12 layers. Base layer has some text (mcWelcome) and a popup on layer
8 with some text plays over it. When I do a a href link to bring up the next mcTextfield combination
on top of the layer 8 the new layer goes under all other layers even though its on layer 10 (it has an arrow and a textfield).
In Design mode it is on top but when it plays it (layer 10 mc) plays under even the first layer.
What am I doing wrong? No matter where I drag the layer containing that new movie clip it goes underneath. Made
a new layer and it does the same thing adding text with ActionScript.
I've even done the "bring to front" and it has no effect. Why is the new mcText alway below the other layers?
Any ideas?

Thanks,
Thanks,

Control Audio In Layer 0 From Movie In Layer 2
I have a sound (mySound) playing from a movie in layer0 (default movie). this movie has loaded another movie into layer 2 using loadmovienum.

I want to stop the sound from playing while in the layer 2 movie. I have tried using _layer and _root but I can't reference the sound.

Can someone tell me how to reference the sound and either stop it or set the volume to 0 from within layer 2 if the sound object is in layer 0?

thanks in advance

Can You Put A Guide Layer Inside A Masked Layer?
Here's the situation: I've got a flash animation in which one character is dreaming. I put a balloon over his head. I want to put a bicycle inside this balloon which comes into the balloon, circles around once and then exits the balloon. I've masked the ballloon so that the bike isn't seen before it enters the balloon, but now I want to put a guide layer above the bike layer so that the bike can circle around a bit before it exits.

I don't see any info on this in any of my Flash books. Is there any way to put a layer, with its guide layer above it, inside a masked layer?

Thanks for the help.

Behavior In One Layer Automatically Carries On To Any Layer
I hate to be a pain, but I am really trying to learn a lot by following tutorials and this problem is reoccuring with every tut I try...

I am following this tutorial: [L=http://www.entheosweb.com/Flash/preloader2.asp]

I am stuck on this (have redone it at least 17 times following verbatum but something isn't right):

Now come back to your bar layer, Push the rectangle to the left as shown below


Go to Frame 40, keeping playhead on frame 40, pull the rectangle onto the other side as shown below

My problem is that when I move it in frame one, it also moves in frame 40... and when I move it to the other side in frame 40 and go back to frame 1 it is no longer in the original position... I can't get my head around this!!! I am using Flash 8 Professional if that's any help!

I am inserting frames and not keyframes, just like the tutorial says...

_root.layer.layer? Simple Question
so im having some problems getting the right item targeted and feel that im writing the as wrong.. so here is what i have.. the stage. with a mc .. then inside that a button.. so wouldnt it be like this?

_root.mc.button

Guide Layer, And Mask Layer Problem
I have a small problem, and it might be possible i just been looking at things the wrong way.

I currently have a symbol on a guided layer, that follows a path when my movie is played. The symbol starts off small, and grows as it reaches the end of the path.

The problem i'm having is, the symbol is overlapping the outside border of my background layer. I'm trying to make the symbol look like its behind the border of my background layer.

I know this can achieved using a mask, but as the symbol is already on a guided layer..Flash won't let me apply it to a layer mask.

Is there any other way around this?

Thank you in advance for your replies.

Moving Background On 1st Layer Static On 2nd Layer
Hello I'm a beginner in flash, can someone please show an example code of how to have a smooth slow moving background (image), and then on top of that have a static image (that makes the border of the movie, like a picture frame) with the middle being transparent so you can see through the moving background.

Can this be done with the flash rectangle tool so I don't have to use an image for the border?

I managed to make the 1st layer have the moving picture in a loop with motion tween, but in the 2nd layer my "picture frame" does not even show when I test the movie.

Make Multiple Layer Under One Mask Layer?
Hi, there

I have four layers, with one mask layer on the top. What can I do to make the rest three layers under this one top mask?
Thank you very much!!!!!

Jenny

How To Make One Layer Loop And One Layer Static?

I have an interactive Flash application that prompts users and moves them backwards and forwards to different frames.

While this is happening can another layer loop? At a high level can someone please explain what I should be doing to achieve this?

~ Humour

How To Animate A Layer Mask With A Guide Layer
Whats the best way to animate a mask using a guide layer. I want the mask to follow a guide layer, but I want the background to not move.

Thanks,

Empty Frame Not Really Empty?
Hey,
Ok, this may be confusing but I'll do my best to explain it. I have a movie clip, we'll call it frustratingMC, with some code on it. This code draws something onto the stage (the parent of the movie clip) based on the movie clip's position. it's built this way because you are supposed to just be able to drag the movie clip onto the stage and be done with it. The thing is, if I put frustratingMC onto a keyframe on the stage, and a later keyframe does not have frustratingMC on it, I still get frustratingMC in the list when I run this code to see what's on the stage:

Code:
for(var a in _root) {
trace(a);
}
I've tried the same thing with a regular movie clip with no drawing code on it and that movie clip gets removed from the list like I would think it should. I could understand maybe if the drawn stuff didn't go away, but shouldn't frustratingMC go away? Thanks.
--dan

Guide Layer Under A Mask Layer
I can't seem to get a guide layer to exist under a mask layer.

I'm sure there's some workaround, or I'm just screwing up. Does anyone know what I'm talking about?

Thanks in advance for any help.

Mat

Guided Layer AND Mask Layer?
Is it possible to have a guided layer also be a mask layer?

I have a "trail" that I would like to appear so I want to have the mask guided so it will show the trail.

Any comments, suggestions, or tips are appreciated.

- Stephanie

A Mask Layer With A Guide Layer?
Hello everyone,

Does anyone know if it is possinle to give a mask a guide layer for a motion tween?

Thanks for your time
Tom

Transparent Layer Visible Over One Layer
Hello everyone. Just abit stumped about a problem I'm having. I'm trying to animate a transparent shadow passing over a layer, but I want it visible only on that layer. I don't want it visible on any layers beneath the one I want affected, is this possible?

Copy Layer Contents To 2nd Layer
Hi all,

I'm loading a few external .swfs as backgrounds, the swf in the background changes on each click of a button in the main swf.

But the backgrounds are kinda big and slow to load, so whenever a new one loads, theres a second of blank canvas showing (or the layer below the one that's accepting the loaded .swfs), then the next pic takes its place.

Is there a way so that when a new .swf loads, it also gets copied to the layer below it? So when another swf loads, and theres that pause of no swfs, it just shows the bottom-most layer which is holding the copied swf that loaded just before?

Moving Objects From Layer To Layer
Yes I knwo this is probably a very naive question but I'm learning Flash 8 here and it says nothing in the documentation about moving an object from one to layer to another. I'm sure in Flash 5 you selected the object and then simply clicked the layer which you wanted it on. This seems to have changed and Adobe/MM have forgotten to say how you do it now.

One Masked Layer And More Than One Mask Layer?
Hi all,

is there a way to get a layer masked by more than one mask layer?

I'm creating an animation where a mask will discover step-by-step the
bottom layer.
But the bottom layer is really complex so I created 5 more layer and
applyed the 'mask' property to them.

The problem is that only the first mask layer is applied on the movie,
while other mask layer are ignored.

Is there a solution to this problem?

TIA

tony

How Can I Duplicate Motion From Layer 2 Layer
If I take the time to create motion on layer one with the word "Hello", and now I want the same motion as that layer EXCEPT I want the word to say "World" when I copy the motion to a new layer it has the word Hello, I then edit that word to say world BUT it changes both layes (object) to the word World. I am trying to create several similar steps of animation kind of like a slideshow and simply want to change the words on the second slide, in effect saving time (hopefully). Is there a way to do this, or do I simply have to do every thing by hand each time?

Thanks!

Bob

Controlling Layer 0 Via Layer 1
I'm working in multiple layers for a presentation I'm doing... and i've completely forgot how to control the main layer (0) by layer (1).

I basically want a button to unload layer1 (which is working fine), but I want to "gotoAndStop" on layer 0?

Can someone help me with this?

Thanks!
- James

Layer React On Layer
Hello All,

I'm trying to duplicate a movieclip x-times and let them all react on the first layer. They all get instance names from blok0 to blok4. But i can't get this to work. blok0 is now scalling when i press key UP or key DOWN. But the others don't react. Does anyone has a solution for this?

Thanks in advance;


PHP Code:



_root.screenWidth     = 550;
_root.screenHeight     = 400;
//mc max number
_root.mcNr            = 4;
//zoom in out / speed the smaller the faster
_root.speed         = 5;
_root.zoomDist         = 100/_root.mcNr;
//zoom step
_root.zoomStep        = _root.mcNr;
//call function
dupMC();
//function
function dupMC(){
    for(i=0;i<=mcNr-1;i++){
         duplicateMovieClip(blok, "blok"+i, -i);
         _root["blok"+i]._x         = _root.screenWidth/2;
         _root["blok"+i]._y         = _root.screenHeight/2;
         _root["blok"+i]._alpha     = 50;
         //set first lyr
         if(i == 0){
             _root["blok"+i]._yscale = 100*(_root.screenHeight/_root["blok"+i]._height);
            _root["blok"+i]._xscale = _root["blok"+i]._yscale;
            //function
            _root["blok"+i].onEnterFrame = function() {
                if(_root.goUp == true){
                    //smooth motion zoom in
                    if(this._xscale < (_root.zoomStep*_root.zoomDist)-1){
                        this._xscale += ((_root.zoomStep*_root.zoomDist)-this._xscale) / (_root.speed * 1);
                        this._yscale = this._xscale;
                    }
                    else{
                        _root.goUp == false;
                    }
                }
                else if(_root.goDown == true){
                    //smooth motion zoom out
                    if(this._xscale > (_root.zoomStep*_root.zoomDist)+1){
                        this._xscale += ((_root.zoomStep*_root.zoomDist)-this._xscale) / (_root.speed * 1);
                        this._yscale = this._xscale;
                    }
                    else{
                        _root.goDown == false;
                    }
                } 
            }
         }
         //rest lyr react on first;
         else{
             _root["blok"+i].onEnterFrame = function() {
                _root["blok"+i]._xscale = (_root["blokk"+(i-1)]._xscale)-_root.zoomDist;
                _root["blok"+i]._yscale = _root["blok"+i]._xscale;
            }
         }
    }


I Cannot Understand, How To Put Mask Layer On A Text Layer To Do A Mask
it looks there is only one layer.
the code is here.
http://go3.163.com/qiukezhi/tutor/1tutor.fla
see the picture
http://888888882.tripod.com/onelayermask.jpg
does anyone know how to make it?
thanks.
[Edited by bluerabit on 02-10-2002 at 06:09 PM]

If Empty
I am trying to interface with a mySQL database via php and I want to know if there is an empty($var) style command in flash actionscript.

I need to check if current_page and limit are set to anything if not set them to 1 and 0 respecively then call the php and pass it those variables.

I also need to do the same with some buttonss. The php returns 5 questions and answers, however if there are only 4 then the 5th button still has the question from the last time the script was called, I either need to set it to nothing or hide the button if the question is empty.

Thanks for any help.

Empty MC's
I'm having trouble w/ external SWF's functions once loaded into empty mc's. I have my main stage w/ an empty movie clip sitting on the stage. I load external parts of the site into this clip. Now I have a swf which is the photo section. within that section I a empty clip sitting on that stage. I have buttons on that stage which call upon the external swf's which hold the main photos. When I preview the main photo swf everything works fine. When I load that onto the main stage of the site, nothing works. here is the code I'm using within the main photo section. The rollovers are not working either. I know it's a bit more info I need to add but not sure how to go about it.
on (rollOver, dragOver){
_root.thumbs.heart.gotoAndPlay(2);
}
on (rollOut, dragOut){
_root.thumbs.heart.gotoAndPlay(9);
}
on(release){
unloadMovie("_root.photoloader")

loadMovie("mary.swf","_root.photoloader");
}
Really need some advice or a point in the right direction w/ this.

Empty MC's
Hey there,
I have a question about empty clips. My site seems to run a bit slower when an external clip is loaded into the empty mc. Is there a way to dump that from memory or free it up to run a bit faster once the clip is loaded?
Thanks

Empty MC Help
Hey guys,
Was wondering if you could look at these files and help me w/ this small problem. They are Flash2004 files, but I can save them as MX and upload if neccessary. My problem is, I"m trying to load the file called WEB into THEWORK file. If you open "The work" file and click on "web/layout' link, it does load, but the scroller dosent' work. Now I do have to load this into one more file which is the main, but if I can get this working I can figure the other out.
Thanks
www.artofdavesilva.com/files.zip

Empty Mc?
Help me please
If got 1 main.swf whit buttons in it,now i want to load external swf in de main.swf.

Now i know that y must bild a Empty mc but i don't know how to do that.

But i want a preloader in it for all the extern swf.

But first the empty mc How must i do that?

Please help.

Greats Desmond

Empty
Ignore this.. a double post.





























Edited: 03/01/2007 at 10:43:11 AM by Ruth H

If Empty
I'm loading some info by an mysql database into flash. I created a variable for the web site
var Site:Object = this.Membre.Siteweb ... And It working perfectly. With that variable I'm able to load the web site and make some action. The only problem is there is not always a web site, when there is not a web site I would like to make an if/else and when the site is empty do thing but else thos some function (on release on a picture and on some text.)

How?

Thx
Xelaxa

Empty MC Help
Hey guys,
Was wondering if you could look at these files and help me w/ this small problem. They Flash2004 files, but I can save them as MX and upload if neccissary. My problem is, I"m trying to load the file called WEB into THEWORK file. If you open "The work" file and click on "web/layout' link, it does load, but the scroller dosent' work. Now I do have to load this into one more file which is the main, but if I can get this working I can figure the other out.
Thanks
www.artofdavesilva.com/files.zip

Empty MC's
Hey there,
I have a question about empty clips. My site seems to run a bit slower when an external clip is loaded into the empty mc. Is there a way to dump that from memory or free it up to run a bit faster once the clip is loaded?
Thanks

Empty MC's
Ok, since I have not gotten a response to my last question, let me rephrase. I'm having trouble w/ external SWF's functions once loaded into empty mc's.
Really need some advice or a point in the right direction w/ this.

Empty SWF?
Published SWF:s are empty..??

I can only see the content when I open the files direct from FlashMX and Explorer, but NOT by clicking on them..?

Anybody who could help me with this problem?

Moops

Empty Or Not
hi,

another problem... i have an mc that is at a position -x of the stage, inside that mc there are to dynamic text fields that retrive data form a xml file.
what i want to do is that the mc goes to a +x position if the text fields load the data.

the code to retrieve the xml:

Code:

var my_xml:XML = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success:Boolean) {
   _root.mc_putos.rapaz_txt.text = my_xml.firstChild.firstChild.childNodes;
   _root.mc_putos.rapariga_txt.text = my_xml.firstChild.firstChild.nextSibling.firstChild.nodeValue;
   _root.targXmc_putos = 370;
};
my_xml.load("putos.xml");

if (rapaz_txt.text == "") {
   trace("my_txt is empty");
} else {
   trace("my_txt is NOT empty");
}
if (rapariga_txt.text == "") {
   trace("my_txt is empty");
} else {
   trace("my_txt is NOT empty");
}

as you can see i created a trace action to see if the text field is empty or not, but it always says that is empty, even if the text is there.

this is the code to move the mc
Code:

onClipEvent (load) {
   _root.targXmc_putos = this._x;
   _root.targYmc_putos = this._y;
}
onClipEvent (enterFrame) {
   cXmc_putos = this._x;
   cYmc_putos = this._y;
   difXmc_putos = cXmc_putos-_root.targXmc_putos;
   difYmc_putos = cYmc_putos-_root.targYmc_putos;
   setProperty(this, _x, cXmc_putos-(difXmc_putos/3));
   setProperty(this, _y, cYmc_putos-(difYmc_putos/3));
}

please help me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1

EMPTY MOVIECLIPS
I'm in trouble recovering properties from movie clips that are created with a variable target:

createEmptyMovieClip(target(expression), level)


It seems to be possible to set movie clips properties as they are created with this method, by using the method:

with(target(expression)){
setProperty(target(expression), property, value)
}

but not recovering them with a simple:

getProperty(target(expression), property)

giving the expression different values, of course.

Any idea? thanks for advanced

Empty Text Fx Swf's
flash mx
mac osx 10.2.1

if I make a text effect with the online flash typer, or a text fx actionscript, the swf plays and looks fine

import the swf into an fla, and all i get are 20 or so empty frames

what am i doing wrong?

...kind of new to most of this

thanks in advance

Mikeh

Empty Level
Hi Ive loaded a mc in level 20

I can unload the movie sure..

BUT I want to make it global and EMPTY the level


pls...

:-) PAUK

Empty Level
Hi

Ive loaded a movie into level 20 ,

Later I want to EMPTY this level - instead
of unloading a specefic movei..

Is there a global - empty level

:-)

The Stage Is Empty
I've just opened three of my Flash files and nothing is on the stage. No box, no sliders, nothing.

All three of these files are contain similar material but were produced months apart.

(When I create new files or open a file I just created, the stage has a box and everything else is normal.)

Any ideas?

Copyright © 2005-08 www.BigResource.com, All rights reserved