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.
Ultrashock Forums > Flash > Flash Professional
Posted on: 2004-07-04
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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)
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.
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
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 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?
LoadMovie In Empty Mc
When I load a movie (swf) into an empty mc all the buttons of the loaded movie are 'overwritten'. Playing the loaded movie seperately works fine, but inside another movie all functions seem to be cancelled by the empty mc.
How do I solve this?
Help With Preloader For Empty Mc
HI!
i am trying to make a preloader for .swf's that only contain music loops in to a empty move clip when pressed by a button.
when the button is clicked the .swf's load fine with out the preloader. i only want the %loaded of the swfs displayed. i have looked for a script to do this and the ones i have found i can't seem to make work.
any help would be appreciated.
thanks
Empty Movie
Hi:
I have an MC with an empty movie that i load a MC in. This MC i load in is has a .xml file it reads.
it works ok when alone but when i load it into my main MC on the empty MC you dont get the .xml file????
Sizing Empty _mc?
How can you size a empty mc?
i tried the info panel, but it stays at 0.
i'm thinking that the empty mc sizes it self to what ever you put in it, but what do i know, i can't even publish a movie correctly.
Empty Movie Within Empty Movie
Hi everyone! I have a main movie inside which there's an empty movie clip (emptyA) that loads an external swf (ext1.swf). Inside ext1.swf, there's also an empty movie clip (emptyB) that loads some other external swf files(ext2, ext3, ext4.swf). Everything loads fine except ext2, ext3 & ext4.swf woudln't show up when they are loaded through emptyB through ext1 through emptyA inside the main movie.
I then just open ext1.swf by itself and try to see if ext2,3,4 would load through emptyB and they do.
SO now, my question is if it's possible to load external swf to an empty movie clip that's within the other external swf that is loaded by the other empty movie clip. I hope I have made myself clear. Any suggestions would be appreciated. Thank you.
.loadMovie In Empty Mc's QT
I'm trying to load a movie into an empty mc, then tell it to play the 2nd frame from the same line of code. My code looks like this...
_root.empty_mcA.loadMovie("rooster.swf", 2);
stop();
this however doesn't work. What should be written instead? Thanks!
Check If Mc Is Empty
I'm connecting to a mySQL db using PHP to return a set of results for an events listing. The results, returned in a 2 dimensional array, populate a series of text areas and a blank mc for each row of results. The blank mc has an external jpg loaded into it. For each mc i have hard coded an invisible button, placed over the mc, that when clicked launches a popup with the image from the mc loaded inside it. The problem is this though, not all of the mc's will contain images, how can i make it so that if the mc underneath (img4Clip for example) is empty, the button(popBtn4 for example) is disabled so that it cannot launch a popup to a empty path?
I tried a test that checked the width of the mc as it should be blank and therefore with a width of 0, if not it is not empty and therefore .enabled would be true but i could not make this work.
This is how the txt fields and mc's are populated. The popups are launched by basic getURL that uses the value from the data array.
Code:
temp = new LoadVars();
temp.onLoad = function() {
data = this.myarray.split("|");
for (var i = 0; i<data.length-1; i++) {
data[i] = data[i].split("`");
}
trace(data[0][0]);
//ROW 1///////////////////////////////
_root.eventsMC.textClip.txt1.text = data[0][0];
_root.eventsMC.textClip.txt2.text = data[0][1];
_root.eventsMC.textClip.txt3.text = data[0][2];
_root.eventsMC.textClip.txt4.text = data[0][3];
_root.eventsMC.textClip.img1Clip.loadMovie("images/" + data[0][4]);
//ROW 2///////////////////////////////
_root.eventsMC.textClip.txt12.text = data[1][0];
_root.eventsMC.textClip.txt22.text = data[1][1];
_root.eventsMC.textClip.txt32.text = data[1][2];
_root.eventsMC.textClip.txt42.text = data[1][3];
_root.eventsMC.textClip.img2Clip.loadMovie("images/" + data[1][4]);
//ROW 3////////////////////////////////
_root.eventsMC.textClip.txt13.text = data[2][0];
_root.eventsMC.textClip.txt23.text = data[2][1];
_root.eventsMC.textClip.txt33.text = data[2][2];
_root.eventsMC.textClip.txt43.text = data[2][3];
_root.eventsMC.textClip.img3Clip.loadMovie("images/" + data[2][4]);
//row 4/////////////////////////////////
_root.eventsMC.textClip.txt14.text = data[3][0];
_root.eventsMC.textClip.txt24.text = data[3][1];
_root.eventsMC.textClip.txt34.text = data[3][2];
_root.eventsMC.textClip.txt44.text = data[3][3];
_root.eventsMC.textClip.img4Clip.loadMovie("images/" + data[3][4]);
//ROW 5/////////////////////////////////
_root.eventsMC.textClip.txt15.text = data[4][0];
_root.eventsMC.textClip.txt25.text = data[4][1];
_root.eventsMC.textClip.txt35.text = data[4][2];
_root.eventsMC.textClip.txt45.text = data[4][3];
_root.eventsMC.textClip.img5Clip.loadMovie("images/" + data[4][4]);
//ROW 6//////////////////////////////////////////
_root.eventsMC.textClip.txt16.text = data[5][0];
_root.eventsMC.textClip.txt26.text = data[5][1];
_root.eventsMC.textClip.txt36.text = data[5][2];
_root.eventsMC.textClip.txt46.text = data[5][3];
_root.eventsMC.textClip.img6Clip.loadMovie("images/" + data[5][4]);
//ROW 7//////////////////////////////////////////
_root.eventsMC.textClip.txt17.text = data[6][0];
_root.eventsMC.textClip.txt27.text = data[6][1];
_root.eventsMC.textClip.txt37.text = data[6][2];
_root.eventsMC.textClip.txt47.text = data[6][3];
_root.eventsMC.textClip.img7Clip.loadMovie("images/" + data[6][4]);
};
temp.load("http://localhost/public/timbuk2/query.php");
stop();
Thanks.
Empty Movieclips
I’m currently putting together a website in flash 5 where each section loads on the main stage within an empty movie clip and so far this works really well. However one of the movies contains a text scroller which I‘ve tested outside of this site and works perfectly well but when it‘s loaded onto main stage is static even though the arrows which control it highlight up like buttons.
The script is quite simple for example here is the script for the up arrow on the 1st frame:
on (rollOver) {
tellTarget ("_root.scrollingtext") {
prevFrame ();
}
gotoAndStop ("up2");
}
and this is the script for up button on the 2nd frame:
on (rollOver) {
tellTarget ("_root.scrollingtext") {
prevFrame ();
}
gotoAndPlay ("up1");
}
These basically control the text (which is a movieclip under a mask). Can anybody help?
Empty Mc Question
i have an empty MC, then i add some text inside of it, how do i turn off the Selectable option?
code:
_root.createEmptyMovieClip('txt', 1);
txt.createTextField('my_txt', 1, 10, 10, 200, 50);
txt.my_txt.setNewTextFormat(new TextFormat('Courier New', 24, 0xffffff, true));
txt.my_txt.text = txt_move;
Preloader Empty
Hi everyone. I have a .fla file with 3 scenes - Preloader, Animation and Site. The preloader scene used to work fine but now, that the site is bigger, the begin doesn´t show anything, it´s empty. After few seconds, it works again and show the preloader at 40% already. I think while the .fla become bigger, more empty seconds i will have. Why is it happen? How could i fix that?
The sintax is pretty simple, like:
Code:
if ( getBytesLoaded()/getBytesTotal() ) gotoAndPlay("Animation", 1);
Thank you.
Sorry my poor english again
Load Second Swf Into Empty Mc
I have movie that loads 2 separate swfs into level1. I use loadMovieNum("movieName.swf",1);
on each frame I want to load the movies.
My first movie was 200 frames long so on my main movie I just loaded the second movie at frame 201 so it loads at the same time my first movie ends.
But now I added preloaders to my external swfs so now it screws up my timing.
So I was thinking I would load the first swf on frame one, add a stop action. Then load the second swf on frame 2 and label it "two"
So can add an action to the last frame of my first swf that will advance my main movie so it moves to frame 2 labeled "two"? So instead of looking for a frame labled "two" on its own main timeline it advances the main movie?
Or am I going about this all wrong?
Thanks
Getting Rid Of An Empty Movie
I've got an empty movie clip that draws lines and makes the mouse hidden. In actionscript, how can I get it to ignore this script because there is a point where another movie clip plays and I want the user to see his mouse. I've already tried to use Mouse.show in the actual movie clip and that doesn't seem to work. Thank you.
How To Empty An Array?
Is there a way to empty the contents of an array, so that when a new xml file is loaded, there are no entries left in it from a previous xml file?
Thanks
How To Detec Empty TXT ?
Please. How can I detec if informations from loaed TXT are realy loaded ?
What is wrong on this code ?
PHP Code:
loadText.load("example.txt");
loadText = new LoadVars();
loadText.onLoad = function(success) {
if (success) {
trace("loaded 1 text");
information1.html = true;
information1.htmlText = this.info1;
information2.html = true;
information2.htmlText = this.info2;
//detection..
if (information1.htmlText == "") {
trace("but information1 is empty");
}else {
trace("information1 is loaded");
}
if (information2.htmlText == "") {
trace("but information2 is empty");
}else {
trace("information2 is loaded");
}
}
}
Positioning Empty Mc
i have a movieclip of a bitmap image that is used as a frame for the content that is to be loaded. The registration point for this mc is in the middle, so that the mc stays in the center of the stage and expands outward according to the size set in a variable to match whatever movie/image is being loaded. The problem occurs with the positioning of the empty mc that content is loaded into. If i put the empty mc inside the frame mc in the top left corner, the content is distorted when it's loaded. How can i position the empty mc to be positioned at the top left corner of the frame mc, depending on what size the frame mc is tweened to. i hope all of that makes sense.
thanks in advance.
Loading Swf Into Empty Mc
I want to load swf's into an empty mc. On the root timeline I have an empty mc (instance name - swfholder) and on one of my buttons I have my AS
on (release) {
_root.swfholder.loadMovie("gallery.swf",10);
}
which I want to load in gallery.swf, However nothing happens any idaes please
BitmapData Empty
I have some code that continually requires redrawing the BitmapData to present onscreen. However, I can't find anyway to make the existing BitmapData to wipe itself clean to an empty state so that I can use copyPixels() on it like a new BitmapData should.
My current method is to reassign the variable to a new BitmapData, which just plains leaves a lot of BitmapData's floating around for the garbage collector. So, is there anyway to empty an existing filled BitmapData? Thank you in advance.
[F8] Combo Box Empty
In flash, my combo box appears normally on the stage, with the label and arrow.
When tested, it's just an empty box! No arrow even!
Help?
[F8] Loading SWF Into Empty MC
Hey there,
Quick question: I need to load an external SWF into my main movie. The SWF to be loaded has smaller dimensions than the main movie and needs to placed at specific x/y co-ordinates. I have used the following:-
createEmptyMovieClip("container", 1);
loadMovie("loaded.swf", "container");
container._x = 70 ;
container._y = 0 ;
This is working, only the BG color of the loaded SWF is not displaying.
Can anyone suggest what I need to do/ adjust please ?
Many thanks
Q.
Resizing Empty MC
Hi. I am loading a swf into another swf and need to size it correctly. I have an empty mc with the instance name 'box'. I am using this code to load in my movie.
Code:
loadMovie("gallery.swf", "box");
box._x=10;
box._y=10;
The x and y works great but how do I now size the box?
Thank you!
[CS3] How Do I Load An FLV And A SWF Into The Same Empty Mc?
Hi...actionscript noob here.
So I have a menu with several buttons that bring up different projects (flv videos & swf projects) by loading them into an empty mc (named dropZone). But it's not working properly. I can click on btn1 and then btn2 fine, but I can't go back to btn1.
btn1.onPress = function()
{
// "flv_mc" is an mc of the FLVPlayback component
_root.dropZone.attachMovie( "flv_mc", "flv_mc", 10 );
}
btn2.onPress = function()
{
var loader_mc:MovieClipLoader = new MovieClipLoader();
loader_mc.loadClip("projects/myProj2.swf", "dropZone");
}
Obviously, there's something wrong with attaching two different ways to the dropZone. Can anybody tell me the usual way people do this? Any insight is greatly appreciated.
Output Empty ?
this is the first time i've tried to apply actionscript to a video and everytime i test it the output shows up empty and of course the script doesn't work. whats goin on?
[CS3] Detecting An Empty URL
Hey guys,
I need to find out how to detect the existence of a file when Flash looks it up.
I'm creating a flash that's meant to load variables from a text file.
E.g. loadVariables(course+"/"+student+"/"+"info.txt", "");
I load variables from "&course/&student/info.txt", where the &course and &student are variables. I need a code that does something like this
loadVariables(course+"/"+student+"/"+"info.txt", "");
if (course+"/"+student+"/"+"info.txt" does not exist) {
trace("your info.txt doesn't exist!")
}
Thanks for reading!
Please Help With Empty Container
Hi im trying to open a .swf into a empty container using this code, "danni" is my button opening up the container
Code:
people.danni.onPress = function () {
_root.createEmptyMovieClip("container", 1);
loadMovie("danni.swf", "container");
container._x = 150 ;
container._y = 20 ;
}
but after i click the button to get into places, it doesnt work....
if i put a button inside the "people" clip on the first frame, so i dont have to click the "people" button to go the second frame to make it play, that is to say its inside the clip, then it works fine.
Hope you understand what i mean
could anyone please tell me what im doing wrong
Width Of Empty Mc?
i am creating a xml photo gallery. the actionscript loads the image into an empty movie clip using this:
Code:
drop_mc.loadMovie(ppath);
where drop_mc is my empty movie clip and ppath is the variable that contains the path to the image i want to load.
the problem is that i want the gallery to display images of different sizes, and i want them to be centered on the page. to do this, i have to know their width and height, but every time i try
Code:
trace(drop_mc._width)
trace(drop_mc._height)
all i get is two zeros, which i am assuming is because i'm loading the pictures into an empty mc, and instead of measuring the pictures its just measuring the mc itself, which is 0 by 0. is there a way to find the dimensions of the images in actionscript? the only way i've been able to figure out is to put the widths and heights in the xml, but it's a pain. i would far prefer if i could get flash to do it by itself.
thank you very much for any help!
will brown
Empty Text Box
I'm having trouble detecting if my test box is empty. Its a simple form with 1 text box and 1 button. Upon the user clicking the button I want to check if the text box is null.
Here is what I have. Nothing happens at the click??
Code:
on (click){
if (_root.id.text==null){
Alert.show ("Its Empty!");
}else{
_parent.getP.getId();
}
}
Thank you
Empty A DisplayObject
Is there a way to completely empty a displayobject of all children without referencing them directly (e.g. removeChild(x)).
|