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








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




FlashKit > Flash Help > Flash ActionScript
Posted on: 12-30-2005, 04:08 PM


View Complete Forum Thread with Replies

Sponsored Links:

Global Array So That Array Is Not Empty
Hi ,
I am pretty new at actionscript and flash in general. I have a question regarding global array.

I am not sure how the global variables function but my test to create an array fails. Any idea how to edit so that the "arr" is not empty. The xml file is after the code

_global.arr = new Array();
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("xml.xml");
trace(_global.arr);

function loadXML(loaded) {

if (loaded) {
var person:Array = xmlData.firstChild.childNodes;
for (var i:Number = 0; i < person.length; i++) {
var node:XMLNode = person;
//arr.push(node.childNodes[2].firstChild.nodeValue);
_global.arr = node.childNodes[2].firstChild.nodeValue;
}
} else {
trace("file not loaded!");
}
}
The xml file is here:
<?xml version="1.0"?>

<inventors>
<person>
<name>Thomas Edison</name>
<comment>Inventor of many things such as the incandescent lightbulb.</comment>
<picture>picture2.jpg</picture>
</person>
<person>
<name>Doug Engelbart</name>
<comment>Invented the mouse at the Stanford Research Institute</comment>
<picture>picture3.jpg</picture>
</person>
</inventors>

View Replies !    View Related
Empty Array
Hi This my First Post.

I would like to empty an Array. Before I re fill it with similar information. ???

The array is filled by 5 different external text files.


Thanks

View Replies !    View Related
Empty 2d Array?
How can you declare an empty 2d array in flash??

In java i would just do

gameEngine[][] array = new gameEngine[8][8];

P.s if some 1 can answer how many spaces in the array i would apreciate it. I should know this but ive confused my self looking at some past code?

Is [8][8] = 81 fields or 64 lol

View Replies !    View Related
Check If Array Is Empty?
Hey everyone

How can I check whether or not my array has any elements in it?

somthing like

if(myarray has no elements)
{
stop doing things
}

View Replies !    View Related
Empty Array Not Solved
Im Loading array data from an external text file,
I would like to empty the array and fill it with new data from another text file but when I load the new file it is added to the end of the previous array.

I have tried, myArray="";
then loading the next text file but the data stays in the array only overwriting the array elements that are in the new text file but if there are not enough array elements to overwrite the whole array the array remains unchanges in those parts.

is it possible to delete the text file that the array is made from?

View Replies !    View Related
How To Check Empty Array Values?
well if i have
yos = new array()
yos[0] = "a"
yos[1] = "b"
yos[5] = "d"

and you want to make an action to do something
if yos[3] is undefined..
is it

if (yos[3]=="") {
blah()
}

or do i have to use yos[3]=="undefined" or "null" or what?
ne ideas, plz helpp

View Replies !    View Related
Blank/Empty Array Slot Help
Hi, I've got this array that inserts text from an array into a textbox, however the first slot is supposed to be blank but after navigating through the different elements somtimes it gets confused and doesn't recognize that the first slot should be empty and shifts things around as if the empty slot doesn't exist.

Here is the array code, pretty simple. This code is part of a loaded external movie.

ActionScript Code:
portfolioSection([" ", "section 02", "section 03", "section 04"]);


And this code is in the main movie that talks to the array stuff...


ActionScript Code:
var aSectionTxt;
var iSectionIndex = 0;

_global.portfolioSection = function (a) {
    targetX = 527;
    path = _root.sectionMC_03.folioClip
    maxWidth = path.section_mc._width-529;
    velocity = 4;
    aSectionTxt = a.concat();
   
    path.section_mc.initEnterFrame();
    path.forward_btn.onRelease = function() {
        if (targetX>-(maxWidth-370)) {
            targetX -= 370;
            path.section_mc.initEnterFrame(1);
        }
    };
   
    path.back_btn.onRelease = function() {
        if (targetX<527) {
            targetX += 370;
            path.section_mc.initEnterFrame(-1);
        }
    };
};
MovieClip.prototype.initEnterFrame = function(dir) {
    path.section_txt.text = "";
    if (mcMovieToRemove != null) {
        removeMovieClip(mcMovieToRemove);
    }
    this.onEnterFrame = function() {
        trace("Running Enter Frame");
        this._x += (targetX-this._x)/velocity;
        if (this._x<(targetX+1) && this._x>(targetX-1)) {
            trace("Stopping Enter Frame");
            this._x = targetX;
            setSectionText(dir);
            delete this.onEnterFrame;
        }
    };
};
_global.setSectionText = function (dir) {
    if (dir != undefined) {
        iSectionIndex += dir;
    }
    if (typeof (aSectionTxt[iSectionIndex]) == "string") {
        path.section_txt.text = aSectionTxt[iSectionIndex];
    } else {
        mcMovieToRemove = path.attachMovie(aSectionTxt[iSectionIndex].linkage, "mcSectionMovie", 10);
        mcMovieToRemove._x = aSectionTxt[iSectionIndex].x;
        mcMovieToRemove._y = aSectionTxt[iSectionIndex].y;
    }
};

yer help would be greatly appreciated. thanks!

View Replies !    View Related
How To Check If An Array Value Is Empty/undefined ?
Hi there,

I have an array coming from a "FileReferenceList" and I need to loop through it and check if some of the array values are empty.

Here is an example :

Code:
fileArray[0].name = "myFile.html";
...problem is, when I use something like this :


Code:
if (fileArray[0].name == "undefined")
{
trace("no file");
}
...it doesn't work

What else can I do to check if the filename is empty or undefined?

View Replies !    View Related
Empty Or Delete And Rebuild An Array Within A Function
I'm having troubles creating an array from a function. Can somebody tell me
how to empty an array within a function? thanks : )

View Replies !    View Related
Empty Movie Clips From Multidimensional Array
Does anyone know why I keep getting "undefined" with this code? I'm trying to create some empty clips - each using the name of the "holder" element in the array below:

ActionScript Code:
var DIR:String = "";var groupinfo:Array = [{mc:overview, display:"overview", toload:DIR+"overview.jpg", holder:image1_holder}, {mc:capabilities, display:"capabilities", toload:DIR+"capabilities.jpg", holder:image2_holder}, {mc:case_studies, display:"case studies", toload:DIR+"case_studies.jpg", holder:image3_holder}, {mc:clients, display:"clients", toload:DIR+"clients.jpg", holder:image4_holder}, {mc:news, display:"news", toload:DIR+"news.jpg", holder:image5_holder}, {mc:recognition, display:"recognition", toload:DIR+"recognition.jpg", holder:image6_holder}, {mc:contacts, display:"contacts", toload:DIR+"contacts.jpg", holder:image7_holder}];for (var j:Number = 0; j < groupinfo.length; j++) {    var holderName:String = groupinfo[j][4];    _root.createEmptyMovieClip(holderName, j+900, {_x:93, _y:84});    trace(holderName);}

View Replies !    View Related
Blank/Empty Array Spot Not Recognized
Hi, I've got this array that inserts text from an into a textbox, however the first spot in the array is supposed to be blank (" ") but after navigating through the different elements somtimes it gets confused and doesn't recognize that the first slot should be empty and shifts things around as if the empty slot doesn't exist.

Here is the array code, pretty simple. This code is part of a loaded external movie.

ActionScript Code:
portfolioSection([" ", "section 02", "section 03", "section 04"]);



And this code is in the main movie that talks to the array stuff...


ActionScript Code:
var aSectionTxt;
var iSectionIndex = 0;
 
_global.portfolioSection = function (a) {
targetX = 527;
path = _root.sectionMC_03.folioClip
maxWidth = path.section_mc._width-529;
velocity = 4;
aSectionTxt = a.concat();
 
path.section_mc.initEnterFrame();
path.forward_btn.onRelease = function() {
if (targetX>-(maxWidth-370)) {
targetX -= 370;
path.section_mc.initEnterFrame(1);
}
};
 
path.back_btn.onRelease = function() {
if (targetX<527) {
targetX += 370;
path.section_mc.initEnterFrame(-1);
}
};
};
MovieClip.prototype.initEnterFrame = function(dir) {
path.section_txt.text = "";
if (mcMovieToRemove != null) {
removeMovieClip(mcMovieToRemove);
}
this.onEnterFrame = function() {
trace("Running Enter Frame");
this._x += (targetX-this._x)/velocity;
if (this._x<(targetX+1) && this._x>(targetX-1)) {
trace("Stopping Enter Frame");
this._x = targetX;
setSectionText(dir);
delete this.onEnterFrame;
}
};
};
_global.setSectionText = function (dir) {
if (dir != undefined) {
iSectionIndex += dir;
}
if (typeof (aSectionTxt[iSectionIndex]) == "string") {
path.section_txt.text = aSectionTxt[iSectionIndex];
} else {
mcMovieToRemove = path.attachMovie(aSectionTxt[iSectionIndex].linkage, "mcSectionMovie", 10);
mcMovieToRemove._x = aSectionTxt[iSectionIndex].x;
mcMovieToRemove._y = aSectionTxt[iSectionIndex].y;
}
};


yer help would be greatly appreciated. thanks!

View Replies !    View Related
AttachMovie - Looping Thru An Array To Attach 6 Movie Clips Into An Empty Clip
Heres my issue...

Im loading in 6 different external icon button images using an XML file into an movieclip. well now i dont want external images to load from an xml file, i want the images to be inside flash in the library. I gave them a linkage name and made an array of them called menuIcons.

how do i get my icon images to load into flash without loading external images from an xml file...

heres my code..


var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function()
{
var nodes = this.firstChild.childNodes;
numOfItem = nodes.length;
for (var i=0; i<numOfItem; i++)
{
menuIcons = ["healthySkin", "environMoist", "lowerSkin", "drySkin", "waterInfusion", "healthyCellular"];

var t = home.attachMovie("item", "item" + i, i + 1);
t.angle = i * ((Math.PI * 2)/numOfItem);t.onEnterFrame = mover;
t.nameClip = (nodes[i].attributes.nameClip);
t.content = (nodes[i].attributes.content);
t.icon.inner.loadMovie(nodes[i].attributes.image);t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
}
}

thanks

slalonde44

View Replies !    View Related
Problem: Load External Text File (with Empty Line As Seperator) Into An Array
Hello,

I have problem to load an external text file (small database) and store in an array.

The format and content of the text file (tips.txt) is as below. The empty line is acted as a seperator of the data.

Quote:




Explanation 1
Formula 1

Explanation 2
Formula 2

Explanation 3
Formula 3

Explanation 4
Formula 4

Explanation 5
Formula 5




What I need?

Quote:




Element 1 in the array:
Explanation 1
Formula 1

Element 2 in the array:
Explanation 2
Formula 2

etc...




My codes:
My codes are below. I wish to line the empty line as the seperator. However I do not know what seperator should I use? I tried all combination of "
", "
" but still no luck.


Quote:





var myLoader:URLLoader = new URLLoader();
myLoader.load(new URLRequest("tips.txt"));
myLoader.addEventListener(Event.COMPLETE, tipsLoaded);

var tipsArray:Array = new Array();
var tipsContent:String

function tipsLoaded(event:Event):void {
tipsContent = event.target.data;
//What seperator should I use?
tipsArray = tipsContent.split("?What?Seperator");
}




Please help.

Thanks and best regards

Alex

View Replies !    View Related
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;

}

View Replies !    View Related
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)

View Replies !    View Related
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.

View Replies !    View Related
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

View Replies !    View Related
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

View Replies !    View Related
Array, Array HELP - Importing A External File Into N ARRAY - Almost There
I am reading and external file with the following code:

ActionScript Code:
on (release, keyPress "<Enter>") {
lv = new LoadVars();
lv.onLoad = function() {
questions1 = this.filelist0.split(",");
answers1 = this.filelist1.split(",");
for(i=0;i<questions1.length;i++)
//trace(questions1[i]+"   "+answers1[i]);
trace(questions1[i]);

//assumes same number of scores in each list
};
lv.load("questions.txt");
}


When I parse the file it puts it into an columar format as it should...however I need it to look like this:

questions1=new Array ("2+4=?","What is the capital of Illinois?","What color is the sky?","10x(5+2)=?");

answers1=new Array ("8","springfield","blue","70");


How do I do that?

Text file look like this:

&questions1=2+4=?,What is the Capital of Illinois?,What color is the sky?,10x(5+2)=?")&
&answers1=8,springfield,blue,70&

View Replies !    View Related
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.

View Replies !    View Related
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.

View Replies !    View Related
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

View Replies !    View Related
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

View Replies !    View Related
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

View Replies !    View Related
Empty
Ignore this.. a double post.





























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

View Replies !    View Related
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

View Replies !    View Related
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

View Replies !    View Related
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

View Replies !    View Related
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.

View Replies !    View Related
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

View Replies !    View Related
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

View Replies !    View Related
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

View Replies !    View Related
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

View Replies !    View Related
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

View Replies !    View Related
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

:-)

View Replies !    View Related
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?

View Replies !    View Related
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?

View Replies !    View Related
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

View Replies !    View Related
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????

View Replies !    View Related
Problem On Empty A MC
i used Mc.clear() fucnction, but it does not work

View Replies !    View Related
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.

View Replies !    View Related
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.

View Replies !    View Related
.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!

View Replies !    View Related
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.

View Replies !    View Related
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?

View Replies !    View Related
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;

View Replies !    View Related
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

View Replies !    View Related
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

View Replies !    View Related
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.

View Replies !    View Related
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");
    }    
    }
}

View Replies !    View Related
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.

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved