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








Getting A "error Opening Url Undefined" Error


i really don't know what's going on with this one, I'm relatively new to flash and I'm having a hard time getting mp3's to load. i am following a mp3 player tutorial from gotoandlearn. Basicly I'm trying to load a movie with music from a xml file. When i test the movie instead of having the music play i get this error message"Error opening URL 'file:///VOLTRON/Users/VOLTRON/Desktop/the%20eye%20of%20norris/undefined"
the fla,as file and xml document are all in the same folder and i've checked the xml for typos so i'm at a loss. i've been working on this for hours somebody please help

----------------------------------------------------------here's my xml------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<songs>
<song url="Track1.mp3"></song>
<song url="Track2.mp3"></song>
<song url="Track3.mp3"></song>
<song url="Track4.mp3"></song>
<song url="Track5.mp3"></song>
<song url="Track6.mp3"></song>
<song url="Track7.mp3"></song>
<song url="Track8.mp3"></song>
<song url="Track9.mp3"></song>
<song url="Track10.mp3"></song>
<song url="Track11.mp3"></song>
<song url="Track12.mp3"></song>
<song url="Track13.mp3"></song>
<song url="Track14.mp3"></song>
<song url="Track15.mp3"></song>
<song url="Track16.mp3"></song>
</songs>
------------------------------------------------------------------here's my as file-------------------------------------------------------
var s:Sound = new Sound();
s.onSoundComplete = playSong;
s.setVolume(75);

var sa:Array = new Array();

var cps:Number = -1;

var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var nodes:Array = this.firstChild.childNodes;
for(var i=o;i < nodes.length;i++)
{

sa.push(nodes[i].attributes.url);
}
playSong();
}

xml.load("beats.xml");

function playSong():Void
{
if (cps == sa.length -1)
{
cps = 0;
s.loadSound(sa[cps], true);


}
else
{
s.loadSound(sa[++cps], true);
}
}




General Flash
Posted on: Fri Jan 02, 2009 11:47 pm


View Complete Forum Thread with Replies

Sponsored Links:

Error Opening URL (undefined)
I have an error on the output

Error opening URL "file:///D|/WebsiteProjects/Solid%2DGamers/undefined"

I don't know why this is happening

View Replies !    View Related
Error Opening Url Undefined
empty_mc.loadMovie(Main.swf) - i am trying to load an external swf into a empty_mc on the stage. When I test it i am getting this in the output:
"file:///C|/Documents%20and%20Settings/Owner/Desktop/My%20Site/FLA/undefined"
Error opening URL

View Replies !    View Related
Error Opening URL File:// Undefined? Can't See What I Missed.
I am using a dynamic nav menu edited using xml, when the corresponding button is pressed I want it to display some text in the text box and load a .swf into the loader m.c. It sort of works, however which ever button i click on it displays the content text and .swf for the last button listed in the xml file, when I try to set a var equal to the instance name of the button clicked on it shows the text as undefined and does not load the m.c? If i leave out the var 'currentIndex' I get a message in the output Error opening URL file undefined. I've checked everything and there are no typos. Really need some help here.

Thanks

code;

var yPosition:Number = 0;


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

var links:Array = new Array();
var names:Array = new Array();
theText._alpha = 0;
empty._visible = false;


myXML.onLoad = function(){

var linkname:Array = this.firstChild.childNodes;

for(i=0;i<linkname.length;i++){

names.push(linkname[i].attributes.NAME);
contents = linkname[i].attributes.CONTENT;
movies = linkname[i].attributes.MOVIE;

_root.attachMovie("button","btn"+i,_root.getNextHi ghestDepth());
_root["btn"+i]._y = yPosition;
yPosition = yPosition + 25
_root["btn"+(i)].blackTxt.Txt.text = (names[i]);
_root["btn"+(i)].whiteTxt.Txt.text = (names[i]);
_root["btn"+(i)].onRollOver = btnOver;
_root["btn"+(i)].onRollOut = btnOut;
_root["btn"+(i)].onRelease = btnRelease;
}
}

myXML.load("projects.xml");


function btnOver(){

this.gotoAndPlay(2);
}

function btnOut(){

this.gotoAndPlay(11);
}

function btnRelease(){

var currentBtn:String = this._name;
var currentIndex:String = currentBtn.substring(3,5);
theText._alpha = 100;
theText.text = contents;
empty._visible = true;
empty.loadMovie(movies[currentIndex]);
}

View Replies !    View Related
Error #1010: A Term Is Undefined And Has No Properties - Useless Error Message
I hate runtime errors!


ActionScript Code:
TypeError: Error #1010: A term is undefined and has no properties.
    at Image/setImage()
    at Instructions/preNavigateCallback()
    at Instructions/nextSlide()

The issue is that I deleted a movieclip from the stage, but the code referencing that clip was not changed.

Why can't the error say something more useful, for example, including the line number, or the actual "term"?


ActionScript Code:
TypeError: Error #1010: A term is undefined and has no properties.
    at "container.guide.visible"
    at Image/setImage() : line 214
    at Instructions/preNavigateCallback() : line 186
    at Instructions/nextSlide() : line 103

Does anyone know why it is so damn vague!? I realise that maybe line numbers probably get lost once compiled, but these kinds of errors always cost me so much debugging time, and are very frustrating - is it impossible to provide the "term" though?.

And does anyone have any good advice on how to avoid them, or track them down with the limited amount of info supplied?

Many thanks,
Dave

View Replies !    View Related
Strange Error: Error Opening Url File (that Is No Longer Loading Into Movie)
I had a few external swf's loading into my main movie, and after several revisions I went through my directory and deleted the swf's that were no longer being used.
Now I am getting an error that one of them cannot open, (it is one of the deleted that I am no longer using)
I know where the code should be, because of the timing of when the error appears in the output window, but I cannot find
code anywhere telling this movie to load.

Any ideas about what I could have done and how to find it?


Here is the actual message:
Error opening URL "file:///P|/Web%20Projects/CBS/Natri/NATRI%202003/hosted.swf"

View Replies !    View Related
Error Handler LoadMovie (Error Opening URL "http:)
I'm loading several foto's which are stored in a database in a movieclip.
The foto's are in different sizes so I use a repositioning function when the foto is loaded

ActionScript Code:
onClipEvent (data) {
_parent.reposPic();
}


However if the foto linked in the database (which I don't have control of) is not found. (Error opening URL "http://www.mysite.nl/test.JPG")
onClipEvent(data) does not do anything.

Is there a way to handle the error message so I can load a 'file not found' image instead?

Cheers,

Leon

View Replies !    View Related
Simple Error Opening URL Error Message?
Hey All,

I'm sure this is a really easy question but why does this happen when testing the movie?

I have set the permission to read and write but for some reason there is an error opening the file why does this happen and what do I need to do to fix it?

thanks for you help

stefan

View Replies !    View Related
**Error** TempInit : Line 1, Column 5 : [Compiler] Error #1084: Syntax Error: Expecti
Hi,

I'm trying to convert my AS2 project to AS3. I got rid of all errors but one :

**Error** tempInit : Line 1, Column 5 : [Compiler] Error #1084: Syntax error: expecting identifier before 45.
var 45:MovieClip;

I got no idea what tempInit is, and no where do I declare a variable called 45...

After searching the web for hours I am tired and thus asking for your help.

Thank you,

View Replies !    View Related
Error #2044: Unhandled IoError:. Text=Error #2032: Stream Error. Cannot Be Caught
Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:///C|/LocalWorkspace/Simulation%20Platform/sim/assets/conversations/14/Maria/NPC_104.MRK


Hi all, I'm getting this error, and I damn well know why. Its because I'm trying to load a file that doesn't exist. But the thing is, I'm wrapping the code in a try catch, and I'm still getting the error. Also, I'm being told that the error is on this line:


ActionScript Code:
var loader:URLLoader = new URLLoader();

I need to do it this way because i know that some of the files I'm trying to load do not yet exist.

But what could possibly be wrong with this line? And either way, it should be caught by the try, catch. So, whats the problem?



ActionScript Code:
try {
        var loader:URLLoader = new URLLoader();
        loader.addEventListener(Event.COMPLETE, completeHandler);
       
            loader.load(new URLRequest(_filename));
        } catch (error:Error) {
            trace("DATA: loadAnimData(): Error loading lip synch data.");
        }

View Replies !    View Related
Error Message ? Error #2044: Unhandled IoError:. Text=Error #2032:
Can anyone give me any advise on why in safari 3 and firefox i am getting this error:

Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://www.nayomusic.com/music/1.mp3

URL: http://www.nayomusic.com/home

The error occurs when a any link is clicked on from within homepage

If anyone has got any idea why this error occurring then this would be much appreciated

Thanks

Jon

View Replies !    View Related
Error #2044: Unhandled IoError:. Text=Error #2032: Stream Error.
I'm trying to open a new centred window with a javascript in AS3, the code is working in the browser but when tested in flash I got this error:
"Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: javascript:void(newWin=window.open('http://www.actionscript.org','newWindow','width=500,heigh t=500,left=590,top=262.5'))"

This is the code that I'm using.

Code:
var resX:int = flash.system.Capabilities.screenResolutionX
var resY:int = flash.system.Capabilities.screenResolutionY

var winW:int = 500
var winH:int = 500

var winX:int = (resX/2) - (winW/2)
var winY:int = (resY/2) - (winY/2)

var jsCode:String = "javascript:void(newWin=window.open('http://www.actionscript.org'," + "'newWindow','width=" +winW + ",height=" + winH +"," +"left=" + winX +",top=" + (winY-winY/2) + "'))";


var urlLoader:URLLoader = new URLLoader()
urlLoader.load(new URLRequest(jsCode))
What is wrong becouse if you test a compiled .swf with this code in the browser a centred window opens.???

View Replies !    View Related
Error #2044: Unhandled IOErrorEvent:. Text=Error #2032: Stream Error.
Hi all,

I created a simple streaming mp3 player and it works perfectly fine locally, but when i upload it i get the below error. I only get this error if i go to refresh or leave the page. The flash itself loads but does not function.

Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
at player.audio.actions::SoundLoader()
at player.audio.actions::Mp3Player()
at main_fla::MainTimeline/frame1()

The code that includes the url is below:


Code:
var songs:Array = ["believe.mp3", "newSong.mp3"];
the swf file is saved in the same directory as the mp3 files but i am still getting the stream error.

I have tried changing the path to a full url with no luck.

What is strange is that if i load the mp3 directly via the URL i have uploaded it to, and then go back to the player, it works. but only in firefox and IE. safari for windows does not work either way.

the class i used to load the url is below:


Code:
public function SoundLoader(songs:Array, player:Mp3Player)
{
songList = songs;
musicPlayer = player;
soundReq = new URLRequest(songList[songIndex]);
loader.load(soundReq);
loader.addEventListener(Event.COMPLETE, songLoaded);


}

Does anyone have any ideas? It's driving me nuts!

Much appreciated!

View Replies !    View Related
Error #2044: Unhandled IOErrorEvent:. Text=Error #2032: Stream Error
This is my code. (Even though this error occours, it doesnt affect my file in anyway, except when you look at it on a website a little error comes up (click it away) and everything is still exactly fine)

ANyway its annoying me now, so iw ont to get rid of it:

Heres my code:


ActionScript Code:
var s:Sound = new Sound(new URLRequest("Galactik_Football.mp3"));
s.play(0, 1000);

var ba:ByteArray = new ByteArray();

addEventListener(Event.ENTER_FRAME, loop);

var bmd:BitmapData = new BitmapData(700, 400, true, 0x000000);
var bm:Bitmap = new Bitmap(bmd);
addChild(bm);

var sp:Sprite = new Sprite();
addChild(sp);

var blur:BlurFilter = new BlurFilter(10,10,3);

var colorMatrix:ColorMatrixFilter = new ColorMatrixFilter([
    1, 0, 0, 0, 0,
     0, 1, 0, 0, 0,
     0, 0, 2, 0, 0,
     0, 0, 0, 0.99, 0
]);

function loop(e:Event):void
{
    sp.graphics.clear();
    sp.graphics.lineStyle(2, 0xFFFFFF);
    sp.graphics.moveTo(-1, 150);
    SoundMixer.computeSpectrum(ba);
    for(var i:uint=0; i<256; i++)
    {
        var num:Number = -ba.readFloat()*200 + 150;
        sp.graphics.lineTo(i*2.75, num*1.3);
    }
    bmd.draw(sp);
    bmd.applyFilter(bmd,bmd.rect,new Point(),blur);
    bmd.applyFilter(bmd,bmd.rect,new Point(),colorMatrix);
    bmd.scroll(3,0);
}

View Replies !    View Related
Error #2044: Unhandled IOErrorEvent:. Text=Error #2032: Stream Error
Hi, i've written out some code that doesn't seem to want to work and im not too sure why. Basically i've imported a sound file in to flash and i have two buttons to play and pause. I've set up a custom class thing in the linkage properties of the sound file.


ActionScript Code:
var audio:Sound = new Sound(new URLRequest("Phil.mp3"));
var audioChannel:SoundChannel = audio.play();

pauseBtn.addEventListener(MouseEvent.MOUSE_UP, pauseSound);
playBtn.addEventListener(MouseEvent.MOUSE_UP, playSound);

function pauseSound(e:MouseEvent):void
{
    audioChannel.stop();
}

function playSound(e:MouseEvent):void
{
    audioChannel = audio.play(audioChannel.position);
}

When i try and run the code, it comes up with this message

"Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
at Untitled_fla::MainTimeline/Untitled_fla::frame1()"

if anyone can give any assistance as to why this doesn't work - it'd be super.

View Replies !    View Related
Error #2044 Unhandled IoError:. Text=Error #2032: Stream Error. URL:
Hey Everyone
Can someone explain this to me. I am using Go Live CS2 to upload my files and I only get the Error (below) when I upload my files to the internet. I have one FLA file and inside the FLA I have a request to a .xml doc to load in my images. The images appear when I test the file in FLash, and when I test my published html page. But as soon as I upload the files to the internet I get the error below. The flash file runs correctly but the images do not appear.
My page www.ii-designs.com/maybe then click on the works tab and where the bottom gray lines is where the images are suppose to be

I get this error
Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:///private/var/tmp/folders.501/TemporaryItems/AdapterTemp/Server_1/public_html/maybe/data/photoImages.xml at _photoImages/frame1()
please help this is driving me crazy
Thanks
Ryan

View Replies !    View Related
Error #2044: Unhandled IOErrorEvent:. Text=Error #2038: File I/O Error.
Gday guys,

im making a lil flex app to upload images for guys on my forum.. problem is, it works fine in opera and firefox im told now also, but in internet explorer.. im getting this error..

"Error #2044: Unhandled IOErrorEvent:. text=Error #2038: File I/O Error.
at uploadd$iinit()
at _uploadd_mx_managers_SystemManager/create()
at mx.managers::SystemManager/::initializeTopLevelWindow()
at mx.managers::SystemManager/::docFrameHandler()"

this is my code? its str8 off the adobe site itself. from what i gather, its the way the scipt is handling the error itself? its terminating itself bcos of it.?


Code:
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import flash.events.DataEvent;


public var fileRef:FileReference = new FileReference();

public function upload():void {
// listen for the file selected event
// listen for the upload complete event
fileRef.addEventListener(Event.SELECT, selectHandler);
fileRef.addEventListener(Event.COMPLETE, completeHandler);
fileRef.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA , uploadCompleteHandler);


// browse for the file to upload
// when user selects a file the select handler is called
try {
var imageTypes:FileFilter = new FileFilter("Images (*.jpg, *.jpeg, *.gif, *.png)", "*.jpg; *.jpeg; *.gif; *.png");
var allTypes:Array = new Array(imageTypes);
var success:Boolean = fileRef.browse(allTypes);

}
catch(error:IOErrorEvent) {
trace("IOErrorEvent catch: " + error);

}



}

// when a file is selected you upload the file to the upload script on the server
public function selectHandler(event:Event):void {
var request:URLRequest = new URLRequest("upload.php")
try {
// upload file
fileRef.upload(request);
textarea1.text = "uploading " + fileRef.name + "...";
}

catch(error:IOErrorEvent) {
trace("IOErrorEvent catch: " + error);

}



}

// dispatched when file has been given to the server script. does not receive a response from the server
public function completeHandler(event:Event):void {
trace("file uploaded complete");


}

// dispatched when file has been uploaded to the server script and a response is returned from the server
// event.data contains the response returned by your server script
public function uploadCompleteHandler(event:DataEvent):void {
trace("uploaded... response from server:
" + String(event.data));
textarea1.text += event.data as String;
}

]]>
</mx:Script>
Also id like to be able to directly have the link traced into the message box itself, so people dont have to copy n paste.. is there an easy solution in the php code?

Heres the link, the upload is on the left of the main reply box.. heres a direct link to the forum, use

User: Ryann
Pass: temp

http://www.weride.net/ThrashedMinis/phpBB2/

, and press a reply or new topic sumwere to view it.. thanks for anyone taking a look..

Ryann.

View Replies !    View Related
Error #2044: Unhandled IoError:. Text=Error #2032: Stream Error.
Hi all I really need help. What I understand from this error is that Flash can't find the file which is a bit of confusing, because if I copy the code to other file it works. Is there something with that I have 2 urloaders in the code I load 2 different type of files one txt and one xml? This is the structure of my xml file
Code:
<xml>
<name>Some Name</name>
<address>Some Address</address>
<option>Some Option</option>
<other>Some Other</other>
<bank>Some Bank</bank>
<iban>12300 0000 0000 0000 0000 00</iban>
<bic>25500000</bic>
</xml>
Please help

View Replies !    View Related
Error #2044: Unhandled IoError:. Text=Error #2032: Stream Error.?
I get this message "Error #2044: Unhandled ioError:. text=Error #2032: Stream Error." when I try to get parameters from a .asmx doc that looks like this:

.net:

flUser.Movie = string.Format(@"{3}?UID={0}&strUserName={1}&strWsUrl......


In as3:

var oParam:Object = LoaderInfo(root.loaderInfo).parameters;
strUserID = oParam.UID;

I get the parameters written into a textfield but it doesn't work? Anyone know what's wrong? Could it have something to do with Sandbox issue? Do a miss an "import.display"?

View Replies !    View Related
Undefined Error
Can someone please tell me how to make this work?

tring.prototype.verificaCPF = function(){
cpf = this.toString();
soma1=0;
soma2=0;
for(i=0;i<9;i++){
numero1 = parseInt(cpf.charAt(i))*(i+1);
soma1=soma1 + numero1;
}
for(i=1;i<10;i++){
numero2 = parseInt(cpf.charAt(i))*i;
soma2=soma2 + numero2;
}
v1=soma1%11;
v2=soma2%11;
if(v1==10)v1=0;
if(v2==10)v2=0;

if(v1==parseInt(cpf.charAt(9)) && v2==parseInt(cpf.charAt(10))){
return "CPF Válido";
}else{
return "CPF Inválido";
}
}

//Test
cpf = "85723185187";
trace(cpf.verificaCPF());

View Replies !    View Related
Undefined Error
Hi,
I'm processing basic customer data into a form. Certain fields are mandatory and I test for nulls. The null checker initially worked - but no longer. Now if I leave the field blank it gets populated by an "undefined" and the null checker doesn't catch it. This is my code:

function formcheck1 () {
if ((((email == null)) || (email.length<1)) || (email == "ERROR! Address not valid")) {
this.eemail._visible = true;
action = "";
}
if (!validate(email)) {
this.EnterTitle._visible = true;
this.eemail._visible = true;
action = "";
}
if (fname == null) {
this.EnterTitle._visible = true;
this.efname._visible = true;
action = "";
}
if (lname == null) {
this.EnterTitle._visible = true;
this.elname._visible = true;
action = "";
}
if (address1 == null) {
this.EnterTitle._visible = true;
this.eaddress1._visible = true;
action = "";
}
if (city == null) {
this.EnterTitle._visible = true;
this.ecity._visible = true;
action = "";
}
if (state == null) {
this.EnterTitle._visible = true;
this.estate._visible = true;
action = "";
}
if (zipcode == null) {
this.EnterTitle._visible = true;
this.ezipcode._visible = true;
action = "";
}
if (country == null) {
this.EnterTitle._visible = true;
this.ecountry._visible = true;
action = "";
}
if (telno == null) {
this.EnterTitle._visible = true;
this.etelno._visible = true;
action = "";
}
if ((validate(email)) && (email != "ERROR!") && (fname != "") && (lname != "") && (address != "") && (city != "") && (state != "") && (zipcode != "") && (country != "") && (telno != "")) {
action = "send";

I hope someone can help.

Cheers,

Hedley



is not workingThis isn't working. The null checker i because the variables a For some reason it's moving on with the data being filled as undefined. Does

View Replies !    View Related
[F8] Undefined Error - Please Help
Hi guys! I'm tearing my hair out with this one!
Basically, I'm creating a small "Click the Country" game.
I have 10 frames with questions on, and have created an array, which will chose the 10 questions in a random order without repeated frames.
I've taken actionscript from this topic;

http://www.actionscripts.org/forums/...6526#post46526

When the user gets the country correct, they will be taken to a "correct" screen, and the user has to click "continue". The continue button has this script;


Code:
on (release) {
_root.gotoAndPlay (randArray[frame]);
//testing purposes:
trace (randArray[frame]);
frame++;
}



When clicked, it comes up as undefined. I think it may be something to do with the randArray. Here's the script from the main timeline


Code:
_root.frame=0;
// populates an array called countArray with the possible frame numbers from 11 - 20
num = 21
countArray= new Array;
for (i=11; i<num; i++) {
countArray.splice(num, 0, i);
}
//test to check array is correct
trace(countArray.toString());
//randomly shuffles array and returns as custom defined new array
Array.prototype.shuffle = function (secondArray){
interimArray = new Array();
arrayCount = ((this).length);
deleteCount = ((secondArray).length);
secondArray.splice(0, deleteCount);
//copies values from original array into interim array so that original data is not lost
for (a=0; a<arrayCount; a++) {
value = this[a];
interimArray.splice(a, 0, value);
}
//chooses random array data * copies into first position in new array,
// deletes that data from interim array so it can't be chosen again
for (a=0; a<10; a++) {
num = (random(interimArray.length));
value = interimArray[num];
secondArray.splice(1, 0, value);
interimArray.splice(num, 1);
}
}
// here we tell Flash to perform the array shuffle on
//your "countArray" and to call the new Array to be populated
//with the 10 random numbers "randArray"
countArray.shuffle(randArray=new Array());
trace (randArray.toString());


Can anybody help me please?!

View Replies !    View Related
Getting An Undefined Error
Hi,
I am getting an undefined area when I test the scene. Any suggestions? Thanks.

Ext_text = new LoadVars();
Ext_text.onLoad = addText;
Ext_text.load("spa_01.txt");
function addText() {
content.htmlText = this.spa_01;
}

View Replies !    View Related
XML Undefined Error
I have the following code on an MC, the MC is called '_fader'...


Code:
on (construct, keyPress "") {
_xmlfile = "images.xml";
_loop = true;
}
INSIDE the MC '_fader' I have the following:


Code:
#initclip

ImageFader = function () {
this.__init__();
};
ImageFader.prototype = new MovieClip();
ImageFader.prototype.__init__ = function () {
this._xscale = 100;
this._yscale = 100;
this.bounding_box.unloadMovie();
this._fader_.unloadMovie();
this._dataProvider = new Array();
this._count = 0;
this._depth = 1;
this._isLoaded = -1;
if (this._S_) {
clearInterval(this._S_);
}
if (this._xmlfile != "") {
this.loadXML(this._xmlfile);
}
};

ImageFader.prototype.loadXML = function (x) {
var v9 = new XML();
v9.ignoreWhite = true;
v9.path = this;
v9.load(x);
v9.onLoad = function () {
for (v2 = 0; v2 < this.firstChild.childNodes.length; v2++) {
var v4 = this.firstChild.childNodes[v2].attributes.TRANSITION;
var v3 = this.firstChild.attributes.PAUSE;
var v5 = this.firstChild.childNodes[v2].firstChild.nodeValue;
this.path._dataProvider.push({img: v5, transition: v4, pause: v3});
}
this.path.startFading();
false;
};

};

ImageFader.prototype.startFading = function () {
if (this._dataProvider.length > 0) {
this.makeFader(true);
}
};

ImageFader.prototype.makeFader = function (first) {
this._isLoaded = -1;
this._depth++;
this._tmp = this.attachMovie("ImageLoader", "ImageLoader" + this._depth, this._depth);
this._old1 = this["ImageLoader" + (this._depth - 1)];
this._old2 = this["ImageLoader" + (this._depth - 2)];
this._tmp.loadHandler("isLoaded", this._count);
this._tmp.autoStart = false;
this._tmp.transition = this._dataProvider[this._count].transition;
this._tmp.loadImage(this._dataProvider[this._count].img);
this._t1 = getTimer();
this.onEnterFrame = function () {
this._t2 = getTimer();
if (this._t2 - this._t1 > this._dataProvider[this._count].pause || first == true) {
if (this._isLoaded == this._count || (this._isLoaded == 1 && this._count == 0)) {
delete this.onEnterFrame;
this._tmp.start();
this._old1.fadeOut();
this._old2.removeMovieClip();
if (this._count + 1 < this._dataProvider.length) {
this._count++;
this.makeFader();
return;
} else {
if (this._loop == true) {
this._count = 0;
this.makeFader();
}
}
}
}
};

};

ImageFader.prototype.isLoaded = function (num) {
this._isLoaded = num;
};

Object.registerClass("ImageFader", ImageFader);

#endinitclip
When I run it I keep getting an 'undefined' error, does anyone have any ideas as I'm struggling...

View Replies !    View Related
Undefined Var Error
I have been taking scripting I am familiar with from AS2 and making adjustments to AS3, just very simple files. Of course, I run into problems and through research, I have managed to solve most them, but I have a problem that has me absolutely stumped.

I created a file with a simple timer that when it reaches a certain time moves to a different frame:

stop();
var startTime:Number= 0;
stage.addEventListener(MouseEvent.CLICK, reset);
function reset(myevent:MouseEvent):void {
startTime = getTimer();
}

stage.addEventListener(Event.ENTER_FRAME, showTime);
function showTime(myevent:Event):void {
var currentTime = getTimer();
var elapsedTime = (currentTime - startTime) / 1000;
myDisplay_txt.text = elapsedTime;
if (elapsedTime >= 5){
gotoAndStop(2);
}
}

All is well and good, but when I try to combine it with a file with has score buttons, I get an error.

stop();
var currentScore = 0;
score.text = "0";
function scorept(myevent:MouseEvent):void {
score.text = currentScore+=1;
}
scoreOne_btn.addEventListener(MouseEvent.MOUSE_DOW N, scorept);

function scoreFivept(myevent:MouseEvent):void {
score.text = currentScore+=5;
}

scoreFive_btn.addEventListener(MouseEvent.MOUSE_DO WN, scoreFivept);

function scoreMinusFivept(myevent:MouseEvent):void {
score.text = currentScore-=5;

}

scoreMinusFive_btn.addEventListener(MouseEvent.MOU SE_DOWN, scoreMinusFivept);

function scoreMinusOnept(myevent:MouseEvent):void {
score.text = currentScore-=1;
}

scoreMinusOne_btn.addEventListener(MouseEvent.MOUS E_DOWN, scoreMinusOnept);

var startTime:Number= 0;
startTime = getTimer();
stage.addEventListener(Event.ENTER_FRAME, showTime);
function showTime(myevent:Event):void{
var currentTime = getTimer();
var elapsedTime = (currentTime - startTime) / 1000;
tme_txt.text = elapsedTime;
if (elaspsedTime >= 5){
gotoAndStop(3);
}
}

stage.addEventListener(Event.ENTER_FRAME, winGame);
function winGame(myevent:Event):void {
if (currentScore >=20) {
gotoAndStop(4);
}
}

Now I get a compiler error:

1120: Access of undefined property elaspsedTime.

WTF? If I turn off the compiler strict mode, it will render, the score part works, but the timer just go on forever. The var for elapsedTime is RIGHT THERE!!

What the heck am I missing????

View Replies !    View Related
Undefined Error
I'm trying to pull in a value from my XML doc and use it to load in a text file...I can trace the value fine but am losing it somehow in my load function...


Code:
for (var j = -1; j<i; j++) {
loadMovie(image_path, contentMC.itemsMC[name].picHolder);
contentMC.itemsMC[name].myLink = link_to;
contentMC.itemsMC[name].myTitle = case_title;
contentMC.itemsMC[name].onRollOver = function() {
casetitle.htmlText = this.myTitle;
};
contentMC.itemsMC[name].onRelease = function() {
trace(this.myLink);
var lvArticleContent:LoadVars = new LoadVars();
lvArticleContent.onData = function(sHTMLData:String) {
_parent.tArticle.htmlText = sHTMLData;
};
var cssStyles:TextField.StyleSheet = new TextField.StyleSheet();
cssStyles.onLoad = function() {
_parent.tArticle.styleSheet = this;
lvArticleContent.load("studies/"+myLink+".html");
};
cssStyles.load("studies/styles.css");
};
}
so I can trace "myLink" but in the cssStyles.onLoad function it gets lost...anyone know what I'm doing wrong...it's probably a path problem...function inside a function or something like that...any help would be greatly appreciated.

Thanks

View Replies !    View Related
Undefined Error
Hello all,

When creating flash movies, I get undefined for all my text fields with external variables whenever a visitor doesn't type in www at the beginning of the url. Such as: domainname.com

But when a user enters the www such as: www.domainname.com, the flash movie works fine and the variables load just fine.

Is this a common error? What might I be doing wrong? And is there any way of fixing this?

Thanks

View Replies !    View Related
XML Undefined Error
I have the following code on an MC, the MC is called '_fader'...


Code:
on (construct, keyPress "") {
_xmlfile = "images.xml";
_loop = true;
}
INSIDE the MC '_fader' I have the following:


Code:
#initclip

ImageFader = function () {
this.__init__();
};
ImageFader.prototype = new MovieClip();
ImageFader.prototype.__init__ = function () {
this._xscale = 100;
this._yscale = 100;
this.bounding_box.unloadMovie();
this._fader_.unloadMovie();
this._dataProvider = new Array();
this._count = 0;
this._depth = 1;
this._isLoaded = -1;
if (this._S_) {
clearInterval(this._S_);
}
if (this._xmlfile != "") {
this.loadXML(this._xmlfile);
}
};

ImageFader.prototype.loadXML = function (x) {
var v9 = new XML();
v9.ignoreWhite = true;
v9.path = this;
v9.load(x);
v9.onLoad = function () {
for (v2 = 0; v2 < this.firstChild.childNodes.length; v2++) {
var v4 = this.firstChild.childNodes[v2].attributes.TRANSITION;
var v3 = this.firstChild.attributes.PAUSE;
var v5 = this.firstChild.childNodes[v2].firstChild.nodeValue;
this.path._dataProvider.push({img: v5, transition: v4, pause: v3});
}
this.path.startFading();
false;
};

};

ImageFader.prototype.startFading = function () {
if (this._dataProvider.length > 0) {
this.makeFader(true);
}
};

ImageFader.prototype.makeFader = function (first) {
this._isLoaded = -1;
this._depth++;
this._tmp = this.attachMovie("ImageLoader", "ImageLoader" + this._depth, this._depth);
this._old1 = this["ImageLoader" + (this._depth - 1)];
this._old2 = this["ImageLoader" + (this._depth - 2)];
this._tmp.loadHandler("isLoaded", this._count);
this._tmp.autoStart = false;
this._tmp.transition = this._dataProvider[this._count].transition;
this._tmp.loadImage(this._dataProvider[this._count].img);
this._t1 = getTimer();
this.onEnterFrame = function () {
this._t2 = getTimer();
if (this._t2 - this._t1 > this._dataProvider[this._count].pause || first == true) {
if (this._isLoaded == this._count || (this._isLoaded == 1 && this._count == 0)) {
delete this.onEnterFrame;
this._tmp.start();
this._old1.fadeOut();
this._old2.removeMovieClip();
if (this._count + 1 < this._dataProvider.length) {
this._count++;
this.makeFader();
return;
} else {
if (this._loop == true) {
this._count = 0;
this.makeFader();
}
}
}
}
};

};

ImageFader.prototype.isLoaded = function (num) {
this._isLoaded = num;
};

Object.registerClass("ImageFader", ImageFader);

#endinitclip
When I run it I keep getting an 'undefined' error, does anyone have any ideas as I'm struggling...

View Replies !    View Related
Getting An Undefined Error
Hi,
I am getting an undefined area when I test the scene. Any suggestions? Thanks.

Ext_text = new LoadVars();
Ext_text.onLoad = addText;
Ext_text.load("spa_01.txt");
function addText() {
content.htmlText = this.spa_01;
}

View Replies !    View Related
Undefined Error
for(j=0;j<str.length;j++){

if (str.charCodeAt(j)<=90&& str.charCodeAt(j)>=65){

temp=Math.abs((str.charCodeAt(j)-65));
iNumOfSym[temp]+=1;
trace(iNumOfSym);

}

In the above part code i have declared iNumOfSym as a string... .. but when i run this code and trace iNumOfSym.. i get undefined as the output.. why?? how should i fix it??

View Replies !    View Related
Help With Undefined Error
Hi guys! I'm tearing my hair out with this one!
Basically, I'm creating a small "Click the Country" game.
I have 10 frames with questions on, and have created an array, which will chose the 10 questions in a random order without repeated frames.
When the user gets the country correct, they will be taken to a "correct" screen, and the user has to click "continue". The continue button has this script;

on (release) {
_root.gotoAndPlay (randArray[frame]);
//testing purposes:
trace (randArray[frame]);
frame++;
}

When clicked, it comes up as undefined. I think it may be something to do with the randArray. I've attached the script from the main timeline
Can anybody see where I'm going wrong here?
Thanks










Attach Code

_root.frame=0;
// populates an array called countArray with the possible frame numbers from 11 - 20
num = 21
countArray= new Array;
for (i=11; i<num; i++) {
countArray.splice(num, 0, i);
}
//test to check array is correct
trace(countArray.toString());
//randomly shuffles array and returns as custom defined new array
Array.prototype.shuffle = function (secondArray){
interimArray = new Array();
arrayCount = ((this).length);
deleteCount = ((secondArray).length);
secondArray.splice(0, deleteCount);
//copies values from original array into interim array so that original data is not lost
for (a=0; a<arrayCount; a++) {
value = this[a];
interimArray.splice(a, 0, value);
}
//chooses random array data * copies into first position in new array,
// deletes that data from interim array so it can't be chosen again
for (a=0; a<10; a++) {
num = (random(interimArray.length));
value = interimArray[num];
secondArray.splice(1, 0, value);
interimArray.splice(num, 1);
}
}
// here we tell Flash to perform the array shuffle on
//your "countArray" and to call the new Array to be populated
//with the 10 random numbers "randArray"
countArray.shuffle(randArray=new Array());
trace (randArray.toString());

View Replies !    View Related
Undefined Error ?
Hi, I am a bit of a newbie when it comes to flash(but learning fast). I have an issue with the code below. This has been constructed from 2 tutorials I have found... 1 to load xml and the other to do a simple slideshow. If I seperate the xml bit and the slide show bits they work fine. If I put them together it does not work. It seems to says that the XML is undefined. It doesnt go into the loop that puts the data in the array(I have debugged that much). Any help would be appreciated... Very frustrating.... I'm sure it's something stupid I'm doing.

var picArray:Array = new Array(); //array to hold the image and all of its attributes
var thisNode:XMLNode = new XMLNode();
var imageXML:XML = new XML();
imageXML.ignoreWhite = true;
imageXML.onLoad = function(success:Boolean) {
for(var i:Number = 0;i<imageXML.firstChild.childNodes.length;i++) {
thisNode = imageXML.firstChild.childNodes[i];
picArray.push([thisNode.attributes.img,thisNode.attributes.Captio n,thisNode.attributes.link]);
}
//When the xml is completely loaded,
//delete the xml (since its now contained in picArray)
//and continue to the slideshow
delete imageXML;
}
imageXML.load("pg7.xml");

this.fadeSpeed = 20;
this.pIndex = 0;
// MovieClip methods ----------------------------------
// d=direction; should 1 or -1 but can be any number
//loads first image automatically
loadMovie(picArray[0][0],_root.photo);
MovieClip.prototype.changePhoto = function(d) {
// make sure pIndex falls within picArray.length
this.pIndex = (this.pIndex+d)%picArray.length;
if (this.pIndex<0) {
this.pIndex +=picArray.length;
}
this.onEnterFrame = fadeOut;
};
MovieClip.prototype.fadeOut = function() {
if (this.photo._alpha>this.fadeSpeed) {
this.photo._alpha -= this.fadeSpeed;
} else {
this.loadPhoto();
}
};
MovieClip.prototype.loadPhoto = function() {
// specify the movieclip to load images into
var p = _root.photo;
//------------------------------------------
p._alpha = 0;
p.loadMovie(picArray[this.pIndex][0]);
this.onEnterFrame = loadMeter;
};
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l = this.photo.getBytesLoaded();
t = this.photo.getBytesTotal();
if (t>0 && t == l) {
this.onEnterFrame = fadeIn;
} else {
//trace(l/t);
}
};
MovieClip.prototype.fadeIn = function() {
if (this.photo._alpha<100-this.fadeSpeed) {
this.photo._alpha += this.fadeSpeed;
} else {
this.photo._alpha = 100;
this.onEnterFrame = null;
}
};

I have attached the fla.

Thanks

Adrian

View Replies !    View Related
Undefined Error
In the code below:


Code:
var loadFiles:LoadVars = new LoadVars();
loadFiles.load("http://127.0.0.1/karenburns/get_files.php?dir=horiz");
total = this["total"];
function loadImageLeft() {
var x = 0;
imagePath = this["image" + x];
trace("Image path left: " + imagePath);
loadMovie("file:///C|/dev%5Fenvironment/photography/horiz/" + imagePath, picHolderLeft);
x++;
}
function loadImageRight() {
var y = 2;
imagePathRight = this["image" + y];
trace("Image path right: " + imagePathRight);
loadMovie("file:///C|/dev%5Fenvironment/photography/horiz/" + imagePathRight, picHolderRight);
y++;
}
loadFiles.onLoad = function(success:Boolean) {
if (success) {
setInterval(loadImageLeft, 2000);
setInterval(loadImageRight, 3000);
} else {
trace("Error loading/parsing LoadVars.");
}
}
I get an error that imagePath and imagePathRight is undefined when testing the flash movie. Can anyone see why I am getting this error? Thanks!

View Replies !    View Related
XML Undefined Error
I have the following code on an MC, the MC is called '_fader'...


Code:

on (construct, keyPress "") {
_xmlfile = "images.xml";
_loop = true;
}



INSIDE the MC '_fader' I have the following:


Code:

#initclip

ImageFader = function () {
this.__init__();
};
ImageFader.prototype = new MovieClip();
ImageFader.prototype.__init__ = function () {
this._xscale = 100;
this._yscale = 100;
this.bounding_box.unloadMovie();
this._fader_.unloadMovie();
this._dataProvider = new Array();
this._count = 0;
this._depth = 1;
this._isLoaded = -1;
if (this._S_) {
clearInterval(this._S_);
}
if (this._xmlfile != "") {
this.loadXML(this._xmlfile);
}
};

ImageFader.prototype.loadXML = function (x) {
var v9 = new XML();
v9.ignoreWhite = true;
v9.path = this;
v9.load(x);
v9.onLoad = function () {
for (v2 = 0; v2 < this.firstChild.childNodes.length; v2++) {
var v4 = this.firstChild.childNodes[v2].attributes.TRANSITION;
var v3 = this.firstChild.attributes.PAUSE;
var v5 = this.firstChild.childNodes[v2].firstChild.nodeValue;
this.path._dataProvider.push({img: v5, transition: v4, pause: v3});
}
this.path.startFading();
false;
};

};

ImageFader.prototype.startFading = function () {
if (this._dataProvider.length > 0) {
this.makeFader(true);
}
};

ImageFader.prototype.makeFader = function (first) {
this._isLoaded = -1;
this._depth++;
this._tmp = this.attachMovie("ImageLoader", "ImageLoader" + this._depth, this._depth);
this._old1 = this["ImageLoader" + (this._depth - 1)];
this._old2 = this["ImageLoader" + (this._depth - 2)];
this._tmp.loadHandler("isLoaded", this._count);
this._tmp.autoStart = false;
this._tmp.transition = this._dataProvider[this._count].transition;
this._tmp.loadImage(this._dataProvider[this._count].img);
this._t1 = getTimer();
this.onEnterFrame = function () {
this._t2 = getTimer();
if (this._t2 - this._t1 > this._dataProvider[this._count].pause || first == true) {
if (this._isLoaded == this._count || (this._isLoaded == 1 && this._count == 0)) {
delete this.onEnterFrame;
this._tmp.start();
this._old1.fadeOut();
this._old2.removeMovieClip();
if (this._count + 1 < this._dataProvider.length) {
this._count++;
this.makeFader();
return;
} else {
if (this._loop == true) {
this._count = 0;
this.makeFader();
}
}
}
}
};

};

ImageFader.prototype.isLoaded = function (num) {
this._isLoaded = num;
};

Object.registerClass("ImageFader", ImageFader);

#endinitclip



When I run it I keep getting an 'undefined' error, does anyone have any ideas as I'm struggling...

View Replies !    View Related
[F8] Can I Trap "Error Opening URL" Error?
Can i trap "Error opening URL" ?
I am using someMC.loadMovie("someImg.jpg")

This works fine I would however like to be able to use the error "Error opening URL" and switch to another file if the first dose not exist. Can i do this?

View Replies !    View Related
Can I Trap "Error Opening URL" Error?
Can i trap "Error opening URL" ?
I am using someMC.loadMovie("someImg.jpg")

This works fine I would however like to be able to use the error "Error opening URL" and switch to another file if the first dose not exist. Can i do this?

View Replies !    View Related
Error 1010....what Is Undefined?
This is really strange. I've got a button symbol on stage with an instance name of aboutUs_btn. My code on my AS layer is:

this.aboutUs_btn.addEventListener(MouseEvent.MOUSE _DOWN, about);
function about(evt:MouseEvent):void {
this.wipe_mc.gotoAndPlay(2);
this.gotoAndStop("history");
head.unload();
}

And then I test the movie and get this error and it makes no sense to me.

TypeError: Error #1010: A term is undefined and has no properties.
at main1_fla::MainTimeline/about()

What's weird is I tried this in another .fla and it didn't bring up the error. That makes no sense. They've both got Publish Settings for AS3/FL9

View Replies !    View Related
[CS3] XML Undefined Showing Error
Hi all,
Im having a huge problem with an xml gallery and I need help. Basically all the images and titles are pulled from an xml sheet. But if there are no titles I want it to display nothing but It keeps showing "undefined" in the text box. My code to pull the text in is below.

thanks



Code:
_root.title1.text = this.firstChild.childNodes[1].childNodes[0].firstChild.nodeValue;



Any help will bring serious kudos

View Replies !    View Related
Error #1010: Something Is Undefined, But I Won't Tell You Which.
TypeError: Error #1010: A term is undefined and has no properties.
at EKG1_fla::MainTimeline/EKG1_fla::frame2()

OK, I've narrowed possibilities by sliding code keyframes, and now only have a couple hundred lines of code to guess at by comment out trial and error.

Anyone know a way for Flash to be more specific.
(like the app programmers couldn't foresee any value is passing the offending term)

View Replies !    View Related
Slideshow Error 'undefined'
Can anyone tell me what I am doing wrong with this code... When I run it it keeps saying 'undefined'...


Code:
import com.mosesSupposes.fuse.*;

ZigoEngine.register(Fuse, PennerEasing);

for (i=1;i<11;i++) {
var tmpClip:MovieClip = eval ("Pic" + i)
tmpClip.loadMovie("images/"+i+".jpg")
}

// Start the slideshow on a setInterval
var slideShowTimer:Number = setInterval(nextImage, 5000);
var counter:Number = 0;

// The workhorse function, gets called by setInterval, and should run every 5 seconds.
function nextImage():Void {
var img:MovieClip = images[counter % 3];
img.swapDepths(counter);
trace(img.getDepth());
img._alpha = 0;
img._visible = true;
img.alphaTo(100, 2, "easeOutSine", null, {func:cleanUpPrevious, args:[(counter-1) % 3]});
counter++;
}

// A function to be used in the tween callback to make the image that was just covered up invisible.
function cleanUpPrevious(image:Number):Void {
images[image]._visible = false;
}

// Show first image immediately.
nextImage();

View Replies !    View Related
Array Value Undefined Error
hi!

I require values stored in an array...but, when 'i' in a for loop is at, say 20, I need the 10th value of the array...similarly, when 'i' increments to 30, I require the 20th value...and so on...

i tried 'trace(array[i-10])' but thats shows up as 'undefined' in output...

wud appreciate all suggestions!

View Replies !    View Related
[Flash8] Undefined Error
Hi, I get a "undefined" for the var "_root["star" + i].adjustPosX" on the last line, how could that be?

Thanks in advance,
Joost Pastoor


Code:
/* S T A R S */

_root.starArr = new Array();
for(i=0; i < _root.gb.cStars; i++)
{
starSize = Math.random()*40+10;

_root.attachMovie("Star", "star" + i, 1000+1);
_root["star" + i]._alpha = Math.random()*40+20;
_root["star" + i]._xscale = _root.gb.starSize;
_root["star" + i]._yscale = _root.gb.starSize;
_root["star" + i].xPos = Math.random()*_root.gb.square;
_root["star" + i].yPos = Math.random()*_root.gb.square;
_root["star" + i].adjustPosX = 0;
_root["star" + i].adjustPosY = 0;
_root["star" + i].defAlpha = _root["star" + i]._alpha;

_root.starArr[i] = _root["star" + i];

_root["star" + i].onEnterFrame = function() {
trace("enterframe" + _root["star" + i].adjustPosX);

View Replies !    View Related
HELP ME - Lee's MP3 Tutorial - Undefined Error :(
Ok, so basically, here's how it all went down. I followed the tutorial all the way through tutorial 2 with no problems... Then I got to tutorial three, and followed everything that Lee said, typed, etc... But then when I got to the end to test my movie, I got this:


My path, C:/Users/MeaningfulCause/Documents/Mashun/Homepage/Jukebox
with a /undefined on the end.

My mp3Player.as (for me it's Jukebox.as) document, is EXACTLY the same as Lee's. At one point I even got so deperate as to copy and paste the XML file over to mine, but even that didn't work! I can't figure out what I'm doing wrong here; I haven't even uploaded it onto my server yet.

Here is my song.as file:


and my XML file (songs.xml):



Please help me guys. I'm just trying to make a good website. This feature is like, 100% neccesary.

Thanks.[/img]

View Replies !    View Related
Getting Undefined Error With Mp3 Player
Hello,
I did the Flash mp3 tutorials on this site and it works perfectly on my computer. However, when I upload the files to my server it stops working and gives me a "undefined-undefined" error where the artists name should be and doesn't play the mp3. The directories are exactly the same and I've tripled checked everything. Is there some code that I'm suppose to add or am I missing something? Any help is appreciated.

Here is a link to the site (it's still under construction)
http://www.3sonsproductions.com/v2/index.html

Code:

// Load the songs XML
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
   var nodes:Array = this.firstChild.childNodes;
   for (var i=0; i<nodes.length;i++)
   {
      sa.push(new Song(nodes[i].attributes.url, nodes[i].attributes.artist, nodes[i].attributes.track));
   }
   playSong();
}

xml.load("songs.xml");

Code:

<?xml version="1.0" encoding="ISO-8859-1"?>
<songs>
   <songs url="mp3/Intro.mp3" artist="Dim Sweets" track="Intro"/>
   <songs url="mp3/Muggin_Me.mp3" artist="Dim Sweets & Dead Arm" track="Muggin Me"/>
   <songs url="mp3/Paramount.mp3" artist="Dead Arm, KB, & Cleo" track="Paramount"/>
   <songs url="mp3/Jet_Black.mp3" artist="Dead Arm" track="Jet Black"/>
</songs>

View Replies !    View Related
Error #1010: Something Is Undefined, But I Won't Tell You Which.
TypeError: Error #1010: A term is undefined and has no properties.
at EKG1_fla::MainTimeline/EKG1_fla::frame2()

OK, I've narrowed possibilities by sliding code keyframes, and now only have a couple hundred lines of code to guess at by comment out trial and error.

Anyone know a way for Flash to be more specific.
(like the app programmers couldn't foresee any value is passing the offending term)

View Replies !    View Related
Load Ext. Scrolltext. Error: 'undefined'
Hi, when i load a .txt file into a scrollwindow it works locally. but when i test it on a webhost it doesnt. the error is 'undefined'. could it have something to do with the new flash mx 2004? .before that i didnt have the prob. anyone?

o yeah this is the site http://www.buksna.tk

the center piece

View Replies !    View Related
UNDEFINED Error In External Loading
I am trying to load variables from an external file. I have tried .txt and .php and have gone through every tutorial about it I can.

In my movie I have a dynamic chat box instance called excomment1. I have an external php file with just text in it....http://themcclellanfamily.net/read.php (also tried making it read.txt)
contents are as follows
&excomments1=Test
(I have also tried &excomments=Test and excomments=Test)

Now I want the file to load in the text file. I am using this code...
myData = new LoadVars();
myData.onLoad = function(){

placeTheDataIntoTheRightPlace();
};
myData.load("http://themcclellanfamily.net/read.php");
placeTheDataIntoTheRightPlace = function(){
excomments1.text = myData.excomments1;
};

(when I changed the &excomments1 to &excomments I also changed the myData.excomments1; to match...also tried myData.load("read.php"); and myData.load("/read.php")

Every single time I either get nothing or undefined. I worked on this for 4 hours and can't get it to work. Check out http://www.themcclellanfamily.net/ca...&comments=test for the test. It is SUPPOSED to display near the end when the box shows up.

Any ideas? Thank you so much!

View Replies !    View Related
Access Of An Undefined Property Error
I keep getting 66 errors of "1120: Access of undefined property" for like different properties/variables i am using in a class.

I am not sure why i am getting them. I am importing my class correctly cause if i comment out everything and just put a trace statement in the constructor it traces out fine.

I have attached the flash file and the classes in a zip file.

can someone explain my problem and help me fix it? I have searched all over and can't figure out why im getting this error.

View Replies !    View Related
Undefined Property (error:1120)
I'm trying to move to 3.0 oop. It's not going so hot. I'm trying to create a simple button and I'm at the up/down state stage. My strategy is very simple, but I can't even make the listener work. I've tried several different approaches. I don't understand why this won't work, but I expect it will be pretty obvious to some of you. Your help will be greatly appreciated.

Here is the code with comments. I'll also attach the .as and .fla.


Code:
package{
import flash.display.Sprite;
import flash.events.MouseEvent;

public class upButton extends Sprite{
//upTarget is the container holding the button images. upTarget "listens"
public function upButton():void{
var upTarget:Sprite = new Sprite();
upTarget.graphics.lineStyle(2,0x95ADE5);
upTarget.graphics.beginFill(0xb9dafb);
upTarget.graphics.drawRoundRect(0.6,0.5,14,15,2,2);
upTarget.addEventListener(MouseEvent.MOUSE_DOWN,uPressed);
upTarget.buttonMode = true;
upTarget.useHandCursor = true;
addChild(upTarget);

//upFillDown hides behind the upFillup image.
var upFillDown:Sprite = new Sprite();
upFillDown.graphics.lineStyle(2,0x95ADE5);
upFillDown.graphics.beginFill(0xb9dafb);
upFillDown.graphics.drawRoundRect(0.6,0.5,14,15,2,2);
upTarget.addChild(upFillDown);

//At a higher level, upFillUp should show before a mouseDown
var upFillUp:Sprite = new Sprite();
upFillUp.graphics.lineStyle(2,0x95ADE5);
upFillUp.graphics.beginFill(0x95ADE5);
upFillUp.graphics.drawRoundRect(0.6,0.5,14,15,2,2);
upFillUp.alpha = 100;
upTarget.addChild(upFillUp);


//this guy identifies the button action (up or down)
var upSymbol:Sprite = new Sprite();
upSymbol.graphics.lineStyle(3, 0x4D6185);
upSymbol.graphics.moveTo(1.1,4.2);
upSymbol.graphics.lineTo(4.3,1.1);
upSymbol.graphics.lineTo(7.5,4.2);
upSymbol.x = 4.2;
upSymbol.y = 6.5;
addChild(upSymbol);
}
//For some reason, this handler will not recognize any of the sprites above
public function uPressed(event:MouseEvent){
upTarget.upFillUp.alpha = 0;//this code should hide the upFillUp sprite to show the sprite benieth
}
}
}

View Replies !    View Related
Undefined Property Error With Buttons
Hello,

I've made a movie clip that's the exact size of the stage I'm using in Flash. I want to make it clickable, and when it clicks, I want a 'jumping' boolean variable to turn true.

Right now I have the movie clip 'btn' set up on the stage. I have two classes, a main class, and a class for the character who will jump when the background is pressed. I have an event listener in the character class and a function that should make it jump, but I am getting this error:

1120: Access of undefined property btn.


ActionScript Code:
public function Character() {
btn.addEventListener(MouseEvent.MOUSE_UP,checkJumping);
}

public function checkJumping(event:MouseEvent):void {
jumping = true;
}

There are the portions of the code I'm having problems with. The movie clip has the instance name 'btn', so that can't be the problem.

Thanks.

View Replies !    View Related
Undefined Error Preloader Help Needed
My AS 1.0 preloader code was set to work just fine using Flash 6 in AS 1.0 and now I'm using the same code with a few slight updates I've added for AS 2.0 in Flash 8 and still having problems with an "undefined" error. I'm obviously missing something with variables.., yes?

Thanks to anyone who can shed some light on this problem!









Attach Code

Frame 1

var totalmovie:Number = this.getBytesTotal();
var totalloaded:Number = this.getBytesLoaded();
if (totalloaded / totalmovie > .75) {
gotoAndPlay("loaded");
}


Frame 2

var percentloaded:Number = Math.round(totalloaded / totalmovie * 100);
var feedback:String = " " + percentloaded + "%";
gotoAndPlay("loop");

View Replies !    View Related
Undefined Text Field Error
Hiya guys,

I've just changed over from using Flash 6 to Flash 7 and am having some teething problems. I have a lot of information being read from text files and brought into flash. This all worked fine when it was published as flash 6 but now I've changed it to flash 7 all I get in my text fields is the word UNDEFINED?

Here's the code I'm using...

on (release){
_root.field1.html = true;
_root.field1.htmlText = "Please Wait Loading...";
myLoadVar = new LoadVars();
myLoadVar.load("news.txt");
myLoadVar.onLoad = function(success) {
if (success == true) {
_root.field1.htmlText = myLoadVar.myText;
}
}
}

Any bright ideas?

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