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




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?



ActionScript.org Forums > Flash General Questions > Other Flash General Questions
Posted on: 09-26-2002, 05:02 PM


View Complete Forum Thread with Replies

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

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>

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

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

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

Empty An Array
does anyone know how I can clear an array from its data so I can put new data into it? what is happening to me is I am loading data into an array and I need to clear the data to put new data into it but its getting all mixed up :( does anyone know what I can do?

Thanks

W i K


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
}

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

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!

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?

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 : )

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);}

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!

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

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

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.

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

NO ONE HAS SOLVED THIS SO FAR
This is what I need to do...

1. User inserts a CD into drive...
2. An Flash Projector Autorun is launched which needs to launch an HTML page 800x600 with no menus or scrollbars...

The problems we have so far is that the Flash piece wants to launch another browser window first before opening up the 800x600 window... I wanna avoid this.

Thanx

Can This Be Solved?
Ok here is the problem.

http://design-hut.com/error.swf

Go to 010 when i take the int of that i get 8, as you can see from the link above. Every 10 the number increases it loses 2 numbers. 020's int is 16. And as you can see from the movie at 018 the int is 18 which is where it is supposed to be. All i wanted to do is add the 0 or 00 in front of the number so it will sort numerically not alphabetically. Please help.

Help..hopefully Get Get This Solved..=(
hi all i need help in this problem with flash MX 2004..:

regarding this sound ting again. i found a reali WEIRD irritating problem.i loaded the ext swf on the highest level scene n it works when i press on off button n stuff...but the problem is my button is situated in the middle of my background. i already put it in the top right hand EXTREME corner in that external sound.fla file already, but y like this?

oh n one more thing, my supervisor told me to change all the resolution as he's afraid when presented will be distorted. how?

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

Last Problem Solved, Now A New One...
okay, so i figured out what was wrong with my asp cookie variables getting into flash. now it's in there with this code..

loadVariables ("reference.asp", "_root");

so this tells me the variable is in the root of the main movie. the rest of this code is...


if (_root.firstName==yes) {
loadMovie ("firstTime.swf", "_root.loadClip");
} else {
loadMovie ("module1_1.swf", "_root.loadClip");
}


i would think that this code would check to see if the variable is "yes" and perform actions accordingly. ( i actually have a textbox in the movie that correctly displays the variable that is sent by my asp script, and it works just like it should). problem is, when i reload the page and my variable changes from yes to no, my new movie doesn't load......anyone know whats wrong?

Problem Solved.... I Think
I just uploaded part of the movie to the internet..... It looks fine. It must be altered in my test screen. Online it looks fine.....

Thanks for your help!!!

WR

Problem Almost Solved.Can You Help Me?
Hi!
After a long time trying to get my preloader and my sound to work together I finally did.

Here is my code on frame 2 from the scene preloader.

this.onEnterFrame = function() {
total = getBytesTotal();
lidos = getBytesLoaded();
restantes = total-lidos;
porcentagem = Math.round((lidos/total)*100);
barra._xscale = porcentagem;
// * 2 ;
if (porcentagem == 100) {
gotoAndStop(15);
delete this.onEnterFrame;
}
};
stop();


and Here is my sound preloader from frame 15 :

stop();
som = new Sound()
som.loadSound("plastic.mp3",true)
som.setVolume(0)
// true faz o som ser lido em streaming, se vc colocar false ele faz o carregamento para depois executa-lo.
this.onEnterFrame = function() {
somtotal = som.getBytesTotal();
somlidos = som.getBytesLoaded();
somrestantes = somtotal-somlidos;
somporcentagem = Math.round((somlidos/somtotal)*100);
barrasom._xscale = somporcentagem;
if (somporcentagem == 100) {
som.start(0,999)
som.setVolume(100)
gotoAndPlay("animacao",1);
delete this.onEnterFrame;
}
};


IF I use loadsound with true it plays booth preloaders and plays the sound but only one time and not a loop like I want (start(0,9999)).but if I use loadsound with false the preloaders work but the sound doesnt play.


What should I do now?

Solved: LoadVars
I am having a weird "Page not found" error occur when using loadVars. I have an avatar where you can change differt features on the face. The error happens when I try to save an update to the avatar. This is a random error, it does not happen every time I try to save. The only way I can get it to come up on some what of a consistent bases is by waiting a minute before trying to save. The features are passing back and forth by a query string to an ASP page. The query string is over 1700 characters long. Below is the code I am using for the save:

var saveavatarData:LoadVars = new LoadVars();

saveavatarData.onLoad = function(success:Boolean) {
if (success) {
testtext.text = "Success = "+savedString;

} else {
testtext.text = "Error loading/parsing LoadVars.";
}
};

saveavatarData.load("SaveAvatarVars.asp?id=" +UserID+"&"+savedString);





























Edited: 08/29/2008 at 06:01:32 AM by efh8

Problem Solved
Problem Solved
Delete Post Please





























Edited: 09/24/2008 at 10:46:34 AM by Webshark2000

Problem Solved
problem solved

Problem Almost Solved.Can You Help Me?
Hi!
After a long time trying to get my preloader and my sound to work together I finally did.

Here is my code on frame 2 from the scene preloader.

this.onEnterFrame = function() {
total = getBytesTotal();
lidos = getBytesLoaded();
restantes = total-lidos;
porcentagem = Math.round((lidos/total)*100);
barra._xscale = porcentagem;
// * 2 ;
if (porcentagem == 100) {
gotoAndStop(15);
delete this.onEnterFrame;
}
};
stop();


and Here is my sound preloader from frame 15 :

stop();
som = new Sound()
som.loadSound("plastic.mp3",true)
som.setVolume(0)
// true faz o som ser lido em streaming, se vc colocar false ele faz o carregamento para depois executa-lo.
this.onEnterFrame = function() {
somtotal = som.getBytesTotal();
somlidos = som.getBytesLoaded();
somrestantes = somtotal-somlidos;
somporcentagem = Math.round((somlidos/somtotal)*100);
barrasom._xscale = somporcentagem;
if (somporcentagem == 100) {
som.start(0,999)
som.setVolume(100)
gotoAndPlay("animacao",1);
delete this.onEnterFrame;
}
};


IF I use loadsound with true it plays booth preloaders and plays the sound but only one time and not a loop like I want (start(0,9999)).but if I use loadsound with false the preloaders work but the sound doesnt play.


What should I do now?

Enter Key Problem Solved(for Me Anyway)
I saw a bunch of posts about not being able to detect the Enter key in a Flash 5 keyDown event. I had the same problem and was pulling out my hair until I just tried it on keyUp and it worked, with keyCode(13).

So if you can get away with just changing the event, use keyUp.

I'm building a calculator and wanted to add functionality for the numeric keypad on the keyboard, so keyUp is fine for me.

Good Luck!

OK, I've Got Half Of The Problem Solved...
With a lot of help from others here, I've been able to get a NEW window to open to a specified size from within a Flash movie! Cool....it took me a while, but I got it. Now I see how easy it is. THANKS for the help.

The problem is when I try to get the ORIGINAL window to open to a specific size. My goal is to be able to send a link (or the URL for those with non HTML enabled e-mail) that will open my Flash movie in a browser to a size I specify, not to a full size window or whatever the end user has set as their default.

I've looked all over the place and all I can find are tutes on opening a new window once already in a Flash movie.

How do I do this get the original window to open as I wish?

Thanks

HELP, Easliy Solved Problem....
hey ppl

i have a fairly easy to solve problem

i have an example code:

on (keyPress "z") {
gotoAndPlay(5);
}

how can i make it so that when you press a sequence of buttons it goes to the desired frame, i have tried

on (keyPress "z, x, c") {
gotoAndPlay(5);
}

and other things like that but it still doesnt work
i am sure there is a code for it i just need sum1 to tell me it

thanx alot

Popup Windows Solved
Ok, for those who don't know HOW to make a popup window, then just make a regular link, but instead of the url type this:


Code:
javascript: window.open('SOMETHING.HTML', 'TITLE', 'width=300,height=200')
Then, for those who get the problem with the main window turning into something that says:

[ object ]

and the window opens somewhere, this is the way to solve it!

instead of:

javascript: window.open(....

use:


Code:
javascript:void window.open(....
simple as that! Nothing fancy even needed!

Rotation Problem Not Solved
I am attaching a .fla file.This circular movie clip has to be rotated with the handle attached to it on mouse drag event in
1) clockwise direction
2)Anticlockwise direction
3)Free roattion i.e both ways rotation

Event to be trapped has to be only mouse drag and not just mouse move and event should be with the handle only and not the circular image.Angle of rotation will depend on how much user drags the handle and that angle of roattion has to be assigned to circular image.

I have solved this problem but there are some bugs.I have calculated the angle using atan2 and assigned it to handle's _rotation property and same is assigned to circular image.In case of c/w rotation and anticlockwise rotation I have applied conditions to check whether user is rotating it in clockwise or in anticlockwise direction and restricted him to roatate in the invalid direction.

My problem is that in anticlockwise rotation as well as in clockwise rotation at some instances the clock rotates in other direction(i.e in case of clockwise it roattes anticlockwise at some points).

It depends on user,he can roatte in either direction so it has to be restricted that incase user tries to roatte it in anticlockwiose direction (In the case of clockwise movement) the handle should not rotate.

Mp3 Player Problem...still Not Solved Help Anyone?
Hello everyone.

I’ll start a new thread because I’m getting suicidal about this problem.
I’ll explain again what’s wrong (the fla from my home page in question is included in this thread for downloading and debugging. Just rename the mp3 name in the streaming action of the player with a mp3 on your own computer).

OK, here I go again. I’ll do my best to explain the problem.

Please go to my website to observe the problem (it’s still under construction; the pages ‘artwork’, ‘client login’ and ‘terms and conditions’ are not functioning yet):

www.thirtytwodesign.nl

(For your information, I use IE6 and flash mx 2004 pro).
On the home page in the bottom right corner is a streaming MP3 player. In the AS I already coded a autostart of the mp3 (isPlaying = true). Let the music play and wait until the mp3 is fully loaded. When it’s completely loaded, surf to the next page (the company info page). There a new mp3 player will start up and stream a new mp3. Also let this one fully load. Then go back to the home page again. The mp3 player on the home page will show 'playing' but in fact it’s not. You have to click the play button again. But what I want is that the mp3 starts playing automatically again from the start if you surf back to that page. In the HTML of the home page, the swf with the player in it is set to autostart and loop but that is not the solution.

Who in gods name can help me with this one? Before I'll get to see my creator very soon ;-)

I'm utterly interested in the solution :-)

Greetings, Luut.

[Solved] No MouseOut Event?
Recently I was frustrated to no end with the lack of a mouse out feature in flash. Namely because I was using Mouse.hide() in one of my flash scripts to use custom mouse cursors.

The solution?

1- create a rectangle the size of your client area, paint it any color you want.

2- capture the on(rollOver) and on(rollOut) functions.

3- treat RollOut as a synonym for a windows mouseOut!

That way I could hide my custom cursor, and show the cursor, whenever the user left my applications client area =)

keen.

-ATT

Has ANYONE Solved That Component Problem?
Using MX PRO2004 UI components, and putting them behind a mask, can you embed the fonts so they show? for example, a combo box ?

Further more,,, has that bug been fixed regarding loading one MC with a component into another MC so that the component works....

I have both of the above problems,,, MC with component Loaded into a MAIN mc,,, under a mask... I do the drag and delete technique in the main movie, and it works,,, but still cant see the font,, tried the setting styles too, unless im doing it wrong,,, anyone out there have a solution ??

Ultimately,, i thought,, maybe I could just use a different component,,, not made by MM themselves,,, anyone know of a source of a combobox and checkbox components?

Many thanks

Avi

www.vibetribe.org

Filter Tweening? (solved)
I just created a small button, and had the idea that I wanted it to go from maximum blur to come all the way into focus, but I haven't been able to think of a way that I can tween the Blur filter... is this even possible?
[fixed in about 5 seconds]
Wow I'm not sure what I was doing wrong but as soon as I double checked my keyframes I had it right, was guessing that the filter would apply to all keyframes of the button.

I Guess My Problem Cant Be Solved
i cant get these damn buttons to work ive tried soooooooooooo much and im getting really frustrated. here us the site URL, and .fla PlEAAAAAAAASE can somone get them to work on anything but my own computer. i have Vista and this is the only pc my buttons will work on. i have 3 other pcs with xp and the buttons dont work for any other than my vista alienware laptop.

http://profile.myspace.com/index.cfm...endid=11955890

my .fla

[solved]finding A X Of A MC Inside A MC
This is in fact some newbish stuff right here, I just never needed to do this....so I never learned..... The question i already typed in a chat (#Flashers on deviantart) so im just gana post that and not re-type



PHP Code:




<m-productions>ok its about finding the _x and _y of items
<m-productions>lets say I have MC1 on the maintimeline and then MC2 inside MC1
<m-productions>MC1 is placed at 300, 300 on the main timeline
<m-productions>simple enough, if you do a trace(_root.MC1._X) youll get 300
<m-productions>now if we do a trace(_root.MC1.MC2._x) we get like 20, I know this is due to the fact that its x vaule is = to 20 on MC1's axis
<m-productions>but how do i find where MC2's x is located in respect to _root
<m-productions>iv tryed all the combinations that i can think of... nothing works
<m-productions>_level0 _parent, _global (even tho i knew that one wouldnt work)









SOLVED: found out how.... this is now solved:

globalToLocal()

[SOLVED] Custom Events
Here's my problem. I got a class named ShootableBitmap (extends Bitmap (note that Bitmap implements IEventDispatcher)) and I want it to be able to send events to the main timeline when something happens to the object. The problem is I cannot get this to work, and I'm wondering if this is even possible (send events 'out' of an object).

PHP Code:



// In the class:
dispatchEvent(new Event("TEST"));

// In the main timeline:
stage.addEventListener("TEST",ttest);
function ttest(bla:Event):void {
    trace("TEST");
}




EDIT: Solved it myself, sorry for posting

[F8] Old Problem Solved, New Question...
I had originally posted a long time ago regarding L-shaped stages. Genesis F5 helped me work around that impossibility. I was given the following code to make one .swf cause action in a totally separate one on the same page.


on(rollOver)
{myconnect = new LocalConnection();
myconnect.send("get_rollover","rolloverfunction"," animation1");
delete myconnect;
}

What I need to be able to do with this script is, instead of making an embedded animation take place, have one of several external .swfs load in a separate .swf.

Thanks in advance for any help.

[F8] Bring To Front [solved]
Hi i was wondering if there was any action script or anything i could use to make a symbol move to front.
thanks masterhoulahan

sorry found it this is the code for anyone else that may need it:

this.swapDepths(1000);

AMFPHP - ODBC Solved :)
A few days ago I was trying to use AMFPHP with ODBC connections but I had no luck , It seemed like Flash was not getting the recordset I was sending to it, or if it was getting it, it didnt know what to do with it.

If you take a look to the *recordSet.php files at /flashservices/sql/ dir you will notice that all of them are the same (same procedures), the only thing that changes are the functions for each DB connection type, and there is the mistake, ODBC does not use the same procedures to process a recordset as MySQL does, a few changes to the odbcRecordSet.php were needed in order to work properly with flash.

So, after some hours of hard work I finnaly got it working ! and here is the code, it might be useful to you some day Oh by the way im using it to connect to a Sybase DB, ... Im really excited about it

odbcRecordSet.php


Code:
<?php
class odbcRecordSet
{
var $initialData = array();
var $columnNames = array();
function odbcRecordSet($d)
{
// count number of fields
$fieldcount = odbc_num_fields($d);
// grab all of the rows
while ($data = odbc_fetch_row($d)) {
$line = array();
for($i=1; $i<=$fieldcount; $i++){
$value = odbc_result($d, $i);
array_push($line, utf8_decode($value));
}
// add each row to the initial data array
$this->initialData[] = $line;
unset($line);
}
// grab the number of fields
// loop over all of the fields
for($i=1; $i<=$fieldcount; $i++){
// decode each field name ready for encoding when it goes through serialization
// and save each field name into the array
$this->columnNames[$i - 1] = utf8_decode(odbc_field_name($d, $i));
}
$this->numRows = odbc_num_rows($d);
}
}
?>
If you take a look to the original odbcRecordSet.php you will notice some little changes. I hope you find it useful, and If you have any suggestions, comments, bugs, questions, etc... just let me know!

Cheers and happy flash remoting!

Mario

PLEASE REMOVE - PROBLEM SOLVED
PLEASE REMOVE - PROBLEM SOLVED





























Edited: 12/15/2006 at 04:00:22 AM by creation22

[SOLVED] Flash 9 On OS X 10.4.9: DEAD
SOLVED: See Forum:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=194&threadid=1259611&enterthread=y

What fixed this is deleting all Flash files from /Library/Internet Plug-Ins then re-installing.

-----


After updating to Flash player 9, I can no longer see any Flash content. This is true in all browsers.
Safari says: "attempted to load an Internet plug-in named “Shockwave Flash”, but the plug-in failed to load successfully."

I can load Flash player 8 and everything is fine again.
This is repeatable.
Have fixed disk permissions, disk repair, etc., and boot with no extensions, but still get same problem.

What is going on?
TextForum





























Edited: 05/03/2007 at 02:53:36 PM by ameon

Camera Control - SOLVED
Ok, I really need to know how to do this:

Im creating an ordinary flash movie, and what i want it to do is to zoom in on a certain character at a certain point in the movie and follow that character. I want this to be done without having to enlarge everything just to fit the stage, as that is what I have previously done.

I am aware that this can be done by creating a small rectangular window as a symbol, and applying some action script to it so that it shows only what is under it, and then this can then be moved around the stage with motion tweens.

Does any body know how to create this objects and the action script for it?

SOLVED - http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?threadid=1257867&catid=194&CFID=44087997&CFTOKEN=65073379e0763d96-D087DA06-DCAE-8314-2C6737EDFB3A36A9&jsessionid=1112cfe3bb915f2d454c





























Edited: 04/08/2007 at 02:53:33 AM by Dragon Claw

While Loop Problem (solved)
please take a look at this code:
It's supposed to make a array that should have a length of 99 (9*11)
But for some reason, it resets the array every time it goes through the v_nr while loop.

the program traces this:

0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
//and finally this; the last number is the length of the whole array. I'd expect it to be 99.
0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8 9

Sorry to have bothered you.. I just found out I forgot to reset v_nr!! :S








Attach Code

var byteArrayHolder: Array = [];
var hPieces = (352/32);// = 9
var vPieces = (288/32);// = 11
var h_nr = 0;
var v_nr = 0;
while (h_nr <= hPieces-1) {//goes through every x-axis piece
while (v_nr <= vPieces-1) {//goes through every y-axis piece
byteArrayHolder.push(h_nr+" + "+v_nr);
v_nr ++;
}
v_nr = 0; //answer :)
trace(byteArrayHolder);
h_nr ++;
}
trace(byteArrayHolder,byteArrayHolder.length);

























Edited: 07/02/2007 at 04:46:37 AM by Psycho Mantis

[as2] ParseInt Problem SOLVED
Hello,

I've a problem with parseInt.
I've developed a site several month ago. I've used this in the project:

detalle = parseInt(this._parent.detalle2.text);

It worked perfectly. Now, I've chnged an image in the flash movie, and the parseInt is not working.
Now I'm getting a NaN.

this._parent.detalle2.text is a dynamic text fiel tha recieves the value from a simple txt file.
It's showed without any problem.

Any Idea?

Thanks in advance,

Sergio

SOLVED

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