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




Error #1063



I've been trying to solve this error for hours and still fail to find a solution to this. ArgumentError: Error #1063: Argument count mismatch on PButton$iinit(). Expected 1, got 0.at flash.display::Sprite/flash.display:Sprite::constructChildren()at flash.display::Sprite$iinit()at flash.display::MovieClip$iinit()at Scene$iinit()at Main_fla::MainTimeline/Main_fla::In main document:
ActionScript Code:
import Scene;Scene a = new Scene(1);addChild(a);
In Scene Class:
ActionScript Code:
import PButton;public class Scene extends MovieClip{      public function Scene(count:int)      {              var pbut:PButton = new PButton(count);      }}
In PButton class:
ActionScript Code:
public class PButton extends MovieClip{      var c:int = 0;      public function PButton(count:int)      {            c = count;      }}
Any help is well appreciated. Thanks!



ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 01-28-2009, 12:27 AM


View Complete Forum Thread with Replies

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

Error #1063
I am just starting with as3, and was building a calculator when the error popped up. I have no idea what it means. Can someone please help me?
The error message said:
"ArgumentError: Error #1063: Argument count mismatch on calc_fla::MainTimeline/oneClick(). Expected 0, got 1"


ActionScript Code:
function oneClick(){
    if(input1or2 = false){
    if (dec == true){
        input1 += Math.pow(0.1, decPlaceValue) * 1;
        decPlaceValue ++;
    }else{
    input1 = input1 * 10 + 1;
    }
    input_txt.text=String(input1);
    }else{
    if (dec == true){
        input2 += Math.pow(0.1, decPlaceValue) * 1;
        decPlaceValue ++;
    }else{
    input2 = input2 * 10 + 1;
    }
    input_txt.text=String(input2);
   
}
}
input1or2 determines if it is the second input or first,
dec determines if it is decimal

can someone please help me!

Error 1063
Hi,

i am getting error for the following code


ActionScript Code:
package
     {
     public final class toy extends Sprite
    {
        public final function toy() {
            this.buttonMode=true;
            this.addEventListener(MouseEvent.MOUSE_DOWN,startDrive);
            this.addEventListener(MouseEvent.MOUSE_UP,stopDrive);
           
        }
       
        public function startDrive():void
        {
            trace("START DRIVE");
        }
        public function stopDrive():void
        {
            trace("STOP DRIVE");
        }
       
    }
     }
it was assigned to a movieclip on maintimeline. while clicking it throws "Error:1063 "
Argument count mismatch on code.macmillan.hicoms.niod::eraser/startDrive(). Expected 0, got 1.

could anyone help me in this regard

Error # 1063
Does anybody know what error is that? And how can a fix it?

ArgumentError: Error #1063: Argument count mismatch on flash.components.livepreview::LivePreviewParent/onUpdate(). Expected 1, got 4.
at Function/http://adobe.com/AS3/2006/builtin::apply()
at ()
at flash.external::ExternalInterface$/flash.external:ExternalInterface::_callIn()
at ()

Thanks in advanced!

Error # 1063
Does anybody know what error is that? And how can a fix it?

ArgumentError: Error #1063: Argument count mismatch on flash.components.livepreview::LivePreviewParent/onUpdate(). Expected 1, got 4.
at Function/http://adobe.com/AS3/2006/builtin::apply()
at ()
at flash.external::ExternalInterface$/flash.external:ExternalInterface::_callIn()
at ()

Thanks in advanced

1063 Error I Can't Figure Out
I have the following method.

window.addEventListener(CloseEvent.CLOSE, windowClosed);

When I remove it, there are no exceptions in my application. When I add it back in and Flash fires the event to windowClosed...

private function windowClosed():void {
msgWindow = null;
}

I get a 1063 error expected 0 but was 1.

msgWindow is of type MsgWindowShow
window is of type MessageToCustomer which is the TitleWindow

msgWindow is just the type I use for other stuff for storing info in. Why in the world am I getting this error. I have virtually no code in windowClosed and when I comment out the code in window closed(you know, that one little line), I still get the error. It has something do do with addEventListener but I don't know what.

thanks for any pointers on this.
dean

[as3] VerifyError: Error #1063
Hi everyone,
have been searching for a solution for this problem, without success...

Flex Builder doesnt show any errors in my code, until i compile.
the browser dies after the swf is running a few seconds.



Code:
VerifyError: Error #1063: Nicht übereinstimmende Argumentzählung für de.kismael.bio::Ranke$iinit(). 13 erwartet, 0 erhalten.
at de.kismael.bio::RankeKlein$iinit()
at de.kismael.bio::Ranke/de.kismael.bio:Ranke::doEnterFrame()[C:ProgrammexampphtdocsMediaLabdekismaelioRanke.as:110]
here are the important parts:

ranke.as, line 110:


Code:
private function doEnterFrame(event:Event):void{
....blaaablurb

if (Math.ceil(Math.random()*12) == 1 ) {
miniZweig = new RankeKlein(20,20,100,100,.2,200,13,15,25,2,0x006600,50,aktuellAngle,5);
addChild(miniZweig);
extraZweige.push(miniZweig);

}
...blablaalalblurb
};
here the Constructor of RankeKlein :


Code:
public function RankeKlein(xpos:Number, ypos:Number, boxw:Number, boxh:Number, speed:Number, maxLaenge:Number, springLaenge:Number, festerAngle:Number, variierterAngle:Number, strich****e:Number, strichFarbe:Number, strichAlpha:Number,aktuellerAngle:Number,pbegrenzung:Number)
{
blurb
}
I already tried to reduce the number of arguments required by the rankeKlein constructor,
without success, he still expects 13 arguments...

maybe important:

Ranke extends Sprite, RankeKlein extends Ranke

I would really appreciate any help, as i am new to as3.

regards,
Kisi

ArgumentError: Error #1063, I Have The Right Arguments...
Yay, another runtime error! What fun. No line numbers to help out!

Error 1063 says that I have passed 0 arguments even though something wanted four. Even though I commented out most of my code it still doesn't work. (It worked before with all this commented out!)

My timeline actionscript:

Code:
import fl.events.ComponentEvent;

var serverIP = "76.25.252.117";
var serverport:Number = 9000;

var socket:Socket = new Socket();

username.appendText(String(Math.floor(Math.random()*1000)));

Security.allowDomain("76.25.252.117:9000");

var tokens:Array = new Array();

function onConnect(e:Event)
{
if(socket.connected == true)
{
outpug.appendText("Connected!
");
}
else
{
outpug.appendText("U fail!!
");
}
}
function onRecieve(e:Event)
{
var str:String = socket.readUTFBytes(socket.bytesAvailable);
if(str.charAt(0) == 'm')
{
outpug.appendText(str.substr(1));
}
if(str.charAt(0) == 'p')
{
//handleMovement(str);
}
if(str.charAt(0) == "j")
{
//str = str.substr(1);
//var parsed:Array = new Array();
//parsed = parse(str);
//var tok = new token(parsed[0], parsed[1], parsed[2], chars);
//tokens.push( tok );
}
if(str.charAt(0) == "r")
{
//socket.writeUTFBytes( ("j"+username.text + "|"+player.x+"|"+player.y) );
//socket.flush();
}
}

socket.addEventListener(Event.CONNECT, onConnect);
socket.addEventListener(ProgressEvent.SOCKET_DATA, onRecieve);

try
{
socket.connect(serverIP, serverport);
}
catch(e:Error)
{
outpug.appendText(e.toString()+"
");
}

var goingup = 1;
var num = 5000;

function sendMessage(e:Event)
{
if(username.text.length > 3 && messages.text.length > 0)
{
socket.writeUTFBytes("m"+username.text + ": " + messages.text + "
");
socket.flush();
messages.text = "";
}
}
messages.addEventListener(ComponentEvent.ENTER, sendMessage);

function handleMovement(str:String)
{

}

function parse(str:String):Array
{
var array:Array = new Array();
var temp:String = "";
for(var i = 0; i < str.length; i++)
{
if(str.charAt(i) != '|')
{
temp += str.charAt(i);
}
else
{
array.push(temp);
temp = "";
}
}
array.push(temp);
return array;
}
//trace(parse("Hello|mynameis|Davis Goodin the|wonderful"));
And here's my class that I made for a token: This is where I assume the problem is stemming from, but I have no clue how. (The constructor has four arguments. :P)


Code:
package
{

import flash.display.MovieClip;

public class token extends MovieClip
{
public var render:MovieClip;
public var myname:String;

function token(myn, xpos, ypos, renderto)
{
myname = myn;
x = xpos;
y = ypos;
render = renderto;
}
}

}
Any help? I am just trying to test a system for a chat thing, just ask if you need any more info. The code worked until I added the token class, and other than that I only commented out a bunch of stuff!

Error # 1063 ---- (event:MouseEvent) Is There...
Hi everyone, I'm just playing around in flash and I am trying to figure out how to solve this error.

ArgumentError: Error #1063: Argument count mismatch on banner/directoryFocusOut(). Expected 0, got 1.

I have done some reading up but I can't figure out what is causing the error b/c my function does have the evt:MouseEvent.



Code:
var timeCounter = 0;
b1.buttonMode = true;
b1.addEventListener(MouseEvent.CLICK, f_b1click)
function f_b1click (evt:MouseEvent) :void {
if (timeCounter == 0) {
TweenMax.to(aboutustext, 3, {alpha:0, y:560, ease:Expo.easeOut});
TweenMax.to(mcdark, 3, {delay:2, alpha:0, x:-960 ,ease:Expo.easeOut});
++timeCounter;
setTimeout(f_b1click,5000); //1000 = one second delay
} else {
MovieClip(this.parent).gotoAndPlay(2);
timeCounter = 0;
}
}

Any suggestions would be appretiated.

Thanks

Error #1063: Argument Count Mismatch On IPod(). Expected 1, Got 0.
Hi there,

just a newbie. could someone have a look at the following code and let me know what is wrong with the code please?

I get the following error:

Error #1063: Argument count mismatch on IPod(). Expected 1, got 0.

here it is the code:


Code:
package {
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.MouseEvent;

public class IPod extends MovieClip {

public var myIPod:IPod = new IPod("A203011GB", "dav's iPod", 11, true);

public function onNextButtonClick(event:MouseEvent):void {
myIPod.onnext();
}
public function onPreviousButtonClick(event:MouseEvent):void {
myIPod.onprevious();
}
public var volumeLevel:uint;
public var myname:String;
public var tracks:Array;
public var currentTrack:uint;
public var shuffle:Boolean;
private var _serialNumber:String;

public function IPod(serialNumber:String, myname:String = "", volumeLevel:uint = 10, shuffle:Boolean = false) {
previousButton.addEventListener(MouseEvent.CLICK, onPreviousButtonClick);
nextButton.addEventListener(MouseEvent.CLICK, onNextButtonClick);
myIPod.tracks = ["Hendrix - Little Wing", "Wu-Tang - Bring Da Ruckas", "Reef - Naked", "The Who - My Generation"];
this.myname = myname;
_serialNumber = serialNumber;
this.volumeLevel = volumeLevel;
this.shuffle = shuffle;
currentTrack = 0;
tracks = new Array();
}
public function onplay():void {
trace("Playing: " + tracks[currentTrack]);
}
public function onnext():void {

if (shuffle) {
//if shuffle is on then we use the Math object to create a random number for the currentTrack property
currentTrack = Math.floor(Math.random() * tracks.length);
} else {
//if it not set to shuffle but we have got to the end of the playlist then we take the currentTrack back to zero (or the beginning)
if (currentTrack == tracks.length - 1) {
currentTrack = 0;
} else {
//if we aren't at the end of the playlist and shuffle isn't set then we just increment the currentTrack number by 1
currentTrack++;
}
}
//After we have incremented the currentTrack we can then call the play function
onplay();
}
//The previous function is basically the exact opposite of the next function
public function onprevious():void {

if (currentTrack == 0) {
currentTrack = tracks.length - 1;
} else {
//If the current track is not 0 then we can decrement the number by 1 using the -- operator
currentTrack--;
}
//Once we have decremented the currentTrack value by 1 we can they invoke the play function to output the track name to the output window
onplay();
}
}

}
Thanks

ArgumentError:Error #1063: Argument Count Mismatch On NBar$iinit(). Expected 1, Got 0
I keep getting this error as I make a call to a custom class for instantiation. The only thing is.

A) im sending 2 arguments not 1 which is what the class calls for in the constructor.

B) It is receiving the arguments and the code works and dislpays the movieclips perfectly, yet I still get this error.

I was wondering if this is a bug? And also how I should deal witht this argument error.

Here is the code:

This function makes the instance of the custom class theNav which accepts 2 parameters.

public function popNav(){
for(var i=0;i<navXML.children().length();i++){

var bar = new theNav(xmlArray[i],xmlSubArray[i]);//this array stores XMLList bar.x = posX;

this.addChild(bar);//adds it to stage
posX += bar.width + 5;
}


}

For the sake of time: here is the constructor for theNav...

public function theNav(heading:String, navList:XMLList){
this.listx = navList;
barHeading = heading;

origBar = new nBar(barHeading);
posY = origBar.height+1;
this.addChild(origBar);

this.addEventListener(MouseEvent.ROLL_OVER,navDown );
this.addEventListener(MouseEvent.ROLL_OUT,navUp);



}

any suggestions?

"Error #1063: Argument Count Mismatch": AS3.0 Bug?
The very first attempt to write something in AS3.0 stumbled me.


Code:
play_btn.addEventListener( MouseEvent.CLICK, play );
results in runtime error "ArgumentError: Error #1063: Argument count mismatch on flash.display::MovieClip/play(). Expected 0, got 1". On one hand, everything is clear: the listener is expected to accept one argument and the play() function accepts none. One the other hand, everything starts to work fine after wrapping the call to the play() function in a trival closure, also accepting no arguments:


Code:
play_btn.addEventListener( MouseEvent.CLICK, function(){ play(); } );
And as if that's not enough, the Adobe's "Programming ActionScript 3.0" document says on page 131 that "ActionScript 3.0 allows function calls to include more parameters than those defined in the function definition", which kind of implies that the initial code with the direct play() invocation is perfectly legetimate and should not lead to any error.

Any ideas on why it works the way it is? Is this an AS3.0 bug or just my ignorance?

1063--but I Am Not Passing Any Arguments
i am playing with AS3, trying to understand it's cryptic errors panel. The following code produces an error 1063, stating that Flash expected 0 arguments but got 1. i am calling this from a document class (is that bad?)...thus, in the DC, i have a line that states

var ps:PlayShape= new PlayShape();
this.addChild(ps);

and the error maker:

Code:
package com.site
{
import flash.display.Sprite;
import flash.display.Shape;
import flash.display.MovieClip;
import flash.events.MouseEvent;

public class PlayShape extends Sprite
{
private var mc:Sprite;
private var circle:Shape;
public function PlayShape(){
init();
this.addEventListener(MouseEvent.MOUSE_MOVE,respondToMouse);
}
private function init()
{
mc=new MovieClip();
mc.graphics.beginFill(0x00ff00,1);
mc.graphics.lineStyle(1,0xff0000,1);
mc.graphics.drawCircle(0,0,10);
mc.graphics.endFill();
addChild(mc);

}
private function respondToMouse()
{//shape will follow mouse....but first a test...
trace(stage.mouseX);
}
}
}

where am i passing an argument in my eventListener? or in my handler?

**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,

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

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

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.???

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!

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

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.

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

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.

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

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"?

[F8] Flash Currency Handling Has Error.NumberFormat Error, Is Losing A Dollar / Pound
When I add two numbers together Flash adds them fine. If I use the Locale to format it as currency, Flash will lose a dollar! This only happens on certain combinations of numbers. I've been banging my head off a wall on this. Paste the script below into an empty flash document to recreate the problem.

Anyone with any ideas of how to solve this please help

code: import mx.controls.*;
import mx.format.NumberFormat;
import mx.format.Locale;
import mx.format.locales.Nl;
import mx.format.locales.*;

var iPaid:Number = 0;
// simulate strings from a textinput field
var sValue1:String;
var sValue2:String;
Locale.registerLocale(new En_US());
var fmt:NumberFormat = new NumberFormat(Locale.currentLocale.currencyFormat);
sValue1 = "226.89";
sValue2 = "28525.11";
trace("sValue1: "+sValue1);
trace("sValue2: "+sValue2);
iPaid = Number(sValue1)+Number(sValue2);
trace("iPaid: "+iPaid);
trace("String(): "+String(iPaid));
trace("NumberFormat.format: "+fmt.format(iPaid));
trace("Where's my money!!!");

sValue1 = "226.11";
sValue2 = "28525.89";
trace("sValue1: "+sValue1);
trace("sValue2: "+sValue2);
iPaid = Number(sValue1)+Number(sValue2);
trace("iPaid: "+iPaid);
trace("String(): "+String(iPaid));
trace("NumberFormat.format: "+fmt.format(iPaid));
trace("Any Ideas!!!");

Error Error Adobe Flash Player Has Stopped A Potentially Unsafe Operation
Dear Sir,

This is regarding the error which i am getting when i open one perticuler adobe application

"error adobe flash player has stopped a potentially unsafe operation "

I got one cisco flash presentation i am not able to open the file because of this error. It would be really helpfull for me if you could guide how to solve this problem.Awaiting your reply.I would appreciate your earleast reply

Regards
Lijesh.

AS3 - Error #2044: IOErrorEvent No Controlado: Text=Error #2036: No Se Completó La Carga
I have to write some html code that calls to javascript and the error keeps popping up.
Any idea?
Example at:
http://www.telefonica.net/web2/odm/prueba_flash.html

Which probably means:
Error #2044: Un handled IOErrorEvent: text=Error #2036: Loaded not completed

My AS:


Code:
import flash.external.*;

//ExternalInterface.call("alert", "foo");

ExternalInterface.call("function(){document.write('<h2>HOOOLA</h2>');}");

[CS3] Error #2044: Unhandled IOErrorEvent:. Text=Error #2035: URL Not Found.
hi,

i have a parent swf with images that when clicked loads another swf. the problems is that the child swf is not loading the images that correspond to the scrolling nav neither loads the other swfs. now, when i try the child alond it has no problem loading the images or the swfs.

the child swf is inside a folder called, "swfIndex"- inside such folder is the child and the folders holding the images and the swf for the child. bellow is the code.

parent swf load code:

PHP Code:



var image1URL:String = "swfIndex/" + basename1 + id1 + ".swf"var image1Ldr:Loader = new Loader (); var image1URLReq:URLRequest = new URLRequest ( thumb1URL );image1Ldr.load ( image1URLReq );image1Ldr.contentLoaderInfo.addEventListener ( Event.COMPLETE, image1Loader );function image1Loader ( event:Event ):void{    load1Target.addChild ( image1Ldr.content );        var image1Ldr2:Loader = new Loader ();    var image1URLReq:URLRequest = new URLRequest ( thumb1URL );    image1Ldr2.load ( image1URLReq );    image1Ldr2.contentLoaderInfo.addEventListener ( Event.COMPLETE, image1Loader2 );    function image1Loader2 ( event:Event ):void    {        load1Target2.addChild ( image1Ldr2.content );        }}




child swf load code:

PHP Code:



var imageURL:String = "images/" + basename + id + ".swf"var imageLdr:Loader = new Loader (); var imageURLReq:URLRequest = new URLRequest ( thumbURL );imageLdr.load ( imageURLReq );imageLdr.contentLoaderInfo.addEventListener ( Event.COMPLETE, imageLoader );function imageLoader ( event:Event ):void{    loadTarget.addChild ( imageLdr.content );        var imageLdr2:Loader = new Loader ();     var imageURLReq:URLRequest = new URLRequest ( thumbURL );    imageLdr2.load ( imageURLReq );    imageLdr2.contentLoaderInfo.addEventListener ( Event.COMPLETE, imageLoader2 );    function imageLoader2 ( event:Event ):void    {        loadTarget2.addChild ( imageLdr2.content );        }}

Error #2044: Unhandled IOErrorEvent:. Text=Error #2035: URL Not Found.
hi guys,
i am trying to import into 2 pages website 2 swift files (one for each of the pages) but I am getting the following error message

Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

The two swift are in the same directory as the parent.
I imported the directory into my .as file and the Url are spelled correctly.
Do you know why do i get the message?
thanks for your help

Sandbox Error With LoadMovie (access Before Fully Loaded Spits Error)
I have read all the posts on sand box errors. I have tried everything I have found to disable them. It took for ever but I figured out that after I call a loadMovie() if I do anything to the clip as it is being loaded before its fully loaded it spits a sandbox error, then since I have a mouse event attached it floods my trace window with about 50 error messages a second on a rollover. In my case I am using a simple setInterval to check and see if I MC has been loaded so I can attach the mouse events too it. Trouble is when run locally (just has to be right now). When it checks the bytesloaded if its not 100% it freaks out like the world is going to end. I have to set my setInterval to 10000 just to make sure each clip has time to load and when your loading 45+ images its just a pain in the ass to wait. Has anyone else run into this issue and found away around it?

Error #2044: Unhandled IOErrorEvent:. Text=Error #2035: URL Not Found.
Hi everyone,

I have a gallery and it works perfectly fine when I run the gallery.swf. The problem happens when I run the index.swf which is where I'm loading my gallery.

It gives me the following error:

Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

Here's some of the code:


Code:
var loader:Loader = new Loader();
var request:URLRequest = new URLRequest("gallery.swf");

loader.load(request);
addChild(loader);

Error #2044: Unhandled IOErrorEvent:. Text=Error #2035: URL Not Found.
I am getting this error i am trying to load images into an xml document here i my code


ActionScript Code:
//Load the XML on this Frame use the button provided

stop();

pb_mc.bar.scaleX = 0;


var files:String = ' images/'

var img:Loader;

var xml:XML = <Pictures>
                  <main_img>
                                     <description>'This is a really cool I mac '</description>
                                           <image>images/black.jpg</image>
                            </main_img>
                           
                                <main_img>
                            <description>'This is a really cool Sony HD TV '</description>
                            <image>images/Sony.jpg</image>
                                </main_img>
                               
                               
                                <main_img>
                            <description>'This is a really cool I pod touch '</description>
                            <image>images/Ipod.jpg</image>
                                </main_img>
                               
                               
                                <main_img>
                            <description>'This is a really cool Playstation 3 '</description>
                            <image>images/Ps3.jpg</image>
                                </main_img>
                               
                        </Pictures>


ActionScript Code:
img = new Loader();
                            img.load(new URLRequest(files))
                            addChild(img);
                       
                       
                         for (var i:Number = 0; i < xml.main_img.length(); i ++){
                         trace("Image:"+xml.main_img.image[i]);
               
                         trace('---------')
                        
                          
                        
                         xml_txt.htmlText +="<b>image</b>"+xml.main_img.description.image[i];

Error #2044: Unhandled IOErrorEvent:. Text=Error #2035: URL Not Found
Hi,
When I run my html locally theres no problem. But when I run it online I keep getting this error.
I'm aware that the most probable thing is that my image folder path is wrong, but I've checked and double checked and it is correct.

I'm pulling my hair with this one. Should be a simple thing and I can't make it right :X

I'm loading the images path from a XML with GreenSocks's xml manager class.
This is the XML portion where the images path are.


Code:
<recentes nome="Ed. Vista Carnaxide" local="Nova Carnaxide" foto="imagens/recentes/EdCarnaxide.jpg" />
<recentes nome="Ed. Residência dos Principes" local="Telheiras" foto="imagens/recentes/EdResPrincipes.jpg" />
<recentes nome="Ed. Salacia/Portus Cale" local="Alto dos MoÃ*nhos" foto="imagens/recentes/EdPortusCale.jpg" />
<recentes nome="Ed. Principes I" local="Parque dos Principes" foto="imagens/recentes/EdCarnaxide.jpg" />
I have the html on the root, then I have a folder named "imagens" containing another folder called "recentes" and the images inside "recentes".

Why isn't it working? does anyone have a clue? please help me before I go bald :X

Error #2044: Unhandled IOErrorEvent:. Text=Error #2035: URL Not Found.
Hey guys, new to the site but I'm hoping you can be of some assistance.

I'm trying to load an external swf onto my stage. The thing is, the swf I'm loading is not in the same folder as the main swf. I've tried every combination to try and find the correct path, but I'm having no luck. Please help, I'm starting to pull out hair!

The folder my main swf is in is: ../Arrangements/main.swf
And the one I'm trying to load is: ../Arrangements/News/news.swf

Here is my code that I am trying to use:
var externalSWF:URLRequest = new URLRequest("News
ews.swf");

Should I be using forward slashes instead of back slashes?
Should I be doing something else?

Any Help will be greatly appreciated

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

Error #2044: Unhandled IoError:. Text=Error #2035: URL Not Found. URL:
The error i am getting is:
Quote:




Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found. URL: file:///C|/flashing/photos/




Im new at flash and as3 i dont know if this is severe or not. it seems to be happening when loading the XML data. What is making me mad is that it says it cant find the url but everything loads perfectly. The pictures load and fade in and out like supposed to.


file structure is: C:(folder)flashingbanner.fla
banner.swf
bar.xml
(folder)photosbar1.gif
bar2.gif
bar3.gif



ANY ideas? thanks,


PHP Code:



import fl.transitions.Tween;import fl.transitions.easing.*;var xmlLoader:URLLoader = new URLLoader();var barURL:URLRequest = new URLRequest("bar.xml");xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);xmlLoader.load(barURL); var barXML:XML = new XML();barXML.ignoreWhitespace = true;function xmlLoaded(evt:Event):void { barXML = XML(xmlLoader.data);  ldImage.source = "photos/"+barXML.bar[0].photo;}var dropF:DropShadowFilter = new DropShadowFilter;dropF.blurX = 8;dropF.blurY = 8;dropF.alpha = 1;dropF.distance = 2;dropF.strength = .75;dropF.color = 0xFFAF00;bt1.addEventListener(MouseEvent.CLICK, slideOne);bt2.addEventListener(MouseEvent.CLICK, slideTwo);bt3.addEventListener(MouseEvent.CLICK, slideThree);function slideOne(Event:MouseEvent):void { trace("button clicked 1"); ldImage.source = "photos/"+barXML.bar[0].photo; //bt1.filters = [dropF];}function slideTwo(Event:MouseEvent):void { trace("button clicked 2"); ldImage.source = "photos/"+barXML.bar[1].photo;}function slideThree(Event:MouseEvent):void { trace("button clicked 3"); ldImage.source = "photos/"+barXML.bar[2].photo;}/* Creates Timer and Picture Index. Timer is in milliseconds. Flash loads picture 0 so we will tell timer to load picture 1 */var fadeInTimer:Timer = new Timer(5000);var fadeOutTimer1:Timer = new Timer(4000,1);var fadeOutTimer2:Timer = new Timer(5000);var picIndex:int = 1;var timerSelecter:int = 1; //Start Rotator coding// Listens to timer and starts function when timer hits amount pickedfadeInTimer.addEventListener(TimerEvent.TIMER, fadeIn);fadeOutTimer1.addEventListener(TimerEvent.TIMER, fadeOut);fadeOutTimer2.addEventListener(TimerEvent.TIMER, fadeOut);// Tells Flash what to dofunction fadeIn(event:TimerEvent):void { ldImage.source = "photos/"+barXML.bar[picIndex].photo; var textFade = new Tween(ldImage,"alpha",None.easeNone,.5,1,1,true);//fade in picIndex ++; //set it to zero when it reaches your maximum index which currently is 3 if (picIndex == 3) {  picIndex =0; }} function fadeOut(event:TimerEvent):void { var textFade = new Tween(ldImage, "alpha",None.easeNone,1,.5,1,true);//fades out if (timerSelecter == 1) {  trace("timer 1");  textFade;  fadeOutTimer2.start(); } else {  trace("timer 2");  textFade; } timerSelecter ++;}// Start the timerfadeInTimer.start();fadeOutTimer1.start();//Rotation End //Below will navigate to a url when (ldImage) is clicked/*ldImage.addEventListener(MouseEvent.CLICK, changeUrl);function changeUrl(event:MouseEvent):void {var request:URLRequest = new URLRequest("http://www.hybridlifts.com/new/index.html");navigateToURL(request,"_self");}*/ 

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"

Error #2044: Unhandled IOErrorEvent:. Text=Error #2035: URL Not Found.
hi all,

dispatcher: i am using code posted by someone here, corrected the typos though - so thanks, forgot who it was ...

anyways, here my problem - the code below throws error
Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

i guess, it's easy to understand what it says, but I just don't get my head around which URL it means - the URLLoader is pointed to a valid XML in the same directory ... i try to figure this out since yesterday night ... please help!


package {

import flash.display.*
import flash.events.*;
import flash.net.URLLoader;
import flash.net.URLRequest;

public class NettoTestXMLMain extends Sprite {

public var _data:XML;
public var _images:Array;
public var leftBtn:LeftBtn = new LeftBtn();
public var rightBtn:RightBtn = new RightBtn();
public var container_MC:ContainerClass = new ContainerClass();

public function NettoTestXMLMain():void {

init();

function init():void
{
var urlLoader:URLLoader = new URLLoader();
urlLoader.addEventListener(Event.COMPLETE, dataLoaded, false, 0, true);
urlLoader.load(new URLRequest("NettoTestXML.xml"));


}

function dataLoaded(e:Event):void
{
_data = new XML(e.currentTarget.data);
_images = new Array(_data.photos.length());

build();
}

function build():void
{
leftBtn.addEventListener(MouseEvent.CLICK, traverseImage, false, 0, true);
rightBtn.addEventListener(MouseEvent.CLICK, traverseImage, false, 0, true);

loadImage(0);
}

function loadImage(index:int):void
{
if(_images[index])
{
replaceImage(_images[index]);
return;
}
else
{
var loader:Loader = new Loader();
loader.load(new URLRequest(_data.photos[index].img));
_images[index] = loader;
replaceImage(loader);
}
}

function replaceImage(objisplayObject):void
{
while(container_MC.numChildren)
{container_MC.removeChildAt(0);}

container_MC.addChild(obj);
}

function traverseImage(e:MouseEvent):void
{
var index:int = _images.indexOf(container_MC.getChildAt(0));

if(e.currentTarget == leftBtn)
{index--;}
else if(e.currentTarget == rightBtn)
{index++;}

index %= _images.length;

if(index<0)
{index = _images.length - 1;}

loadImage(index);
}
}
}
}

Error #2044: Unhandled SecurityError:. Text=Error #2048: Security Sandbox Violation
I've recently created a flash blog application and locally it works perfectly. However when I upload it to my web server it throws this error at me.

'Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation'

I've searched around it people have been saying that it's to do with loading in files from servers that are external to the one the flash file is hosted one. But my flash file only loads two XML files, both of which are on my server, albeit in a different directory.

If anyone has any ideas I'd appreciate the help

**Error** Scene 1, Layer 'actions', Frame 1, Line 664: 1087: Syntax Error: Extra Char
Scene 1, Layer 'actions', Frame 1, Line 664: 1087: Syntax error: extra characters found after end of program.
}

I am new to importing classes and I have been practicing making a photo gallery. I am stuck and I want to know if someone can help me with the error I am getting.

If it is convenient, you can download and test my .zip at www.dhtmlguy.freeservers.com

Thanks in advance!

Error #2044: IoError / Text=Error #2032 When Loading Xml
Hi guys,

I am still experimenting with the whole concept of use of packages. I did Victors tut and now wanted to apply the same concept of loading button code externally to loading an external xml. But the output window greeted me with this error.

Error #2044: ioError unverarbeitet. text=Error #2032: Stream-Fehler. URL: file:///C|/Projects/GettingStartedWithAS3/Kopie%20von%20Dev%5FDevelop/testxml.xml

the structure is:
// a main.swf has the movieclip Loadxml in its library with com.company.xmltxt.Loadxml as a base class
//the main.swf loads the document class "Documentclass" in the external .as file with the same name
//which imports com.company.xmltxt.*
//the Loadxml.as file is accessed through the directory xmltxt.
//it loads its function Loadxml(), which I can tell from the trace statement but when trying to access the xml the error occurs.


I checked for similar cases and solutions...to no avail. Now I try as a last resort to upload the files here.

Error: Error #2094: Event Dispatch Recursion Overflow.
??? what the heck is this error from?

Error: Error #2094: Event dispatch recursion overflow.


Code:
package com
{
import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.events.EventDispatcher;

public class ThemeButton extends Sprite
{
public function ThemeButton(str:String)
{
graphics.beginFill(0xFF0000);
graphics.drawRect(0,0,100,25);
graphics.endFill();

var t:TextField = new TextField();
t.text = str;
t.selectable = false;
t.autoSize = TextFieldAutoSize.LEFT;

addChild(t);

addEventListener(MouseEvent.CLICK, p_onClick);
}
private function p_onClick(event:MouseEvent):void
{
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
}
}
what am i doing wrong? i thought this is how i did other events. why is the error happening.. i don't get it

I Am Getting Error:TypeError: Error #2007: Parameter Listener Must Be Non-null.
I converted this code from actionscript2.0 to 3.0 and it is giving type error:TypeError: Error #2007: Parameter listener must be non-null.
at flash.events::EventDispatcher/addEventListener()
at live_fla::MainTimeline/frame1()



function playLiveStream()
{
nsPlay = new NetStream(nc);
//nsPlay.addEventListener(NetStatusEvent.NET_STATUS, event);


trace ("the NetStream status information");
var nc:NetConnection = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
var client:Object = new Object( );
client.onMetaData = function(infoObject:Object)
{

trace("onMetaData");

// print debug information about the metaData
for (var propName:String in infoObject)
{
trace(" "+propName + " = " + infoObject[propName]);
}

};

}



// trace the NetStream status information
//nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
// function netStatusHandler(event:NetStatusEvent)
function netStatusHandler(evt:NetStatusEvent): void
{trace("Trace1")
// switch (event.info.code) {
switch (evt.info.code) {
case "NetConnection.Connect.Success":
playLiveStream();
videoLastW = 0;
videoLastH = 0;
videoSizeTimer = setInterval(updateVideoSize, 500);
break;
case "NetStream.Play.StreamNotFound":
trace("Connection failed: Try rtmp://[server-ip-address]/live" );
break;
}

}

Error #2044: Unhandled SkinError:. Text=Error #1034
Hi, I followed this link to learn customize the video skin,
http://www.adobe.com/devnet/flash/articles/flv_tutorial_pt2_03.html

after I went throught the steps, and compiled err free, than I created a new flash file and load the flash playback component, but when I choose the skin I just created above, I got an error as follows:

Error #2044: Unhandled skinError:. text=Error #1034: Type Coercion failed: cannot convert flash.display::AVM1Movie@354a9e9 to flash.display.Sprite.

Error #2044: Unhandled StatusEvent:. Level=error, Code=
Receiving message: Error #2044: Unhandled StatusEvent:. level=error, code=

I have just added these three lines to a previously working fla:

import flash.net.LocalConnection;

var sender:LocalConnection = new LocalConnection();
sender.send("_exampleChannel", "example", "a string", 6.5, true);

My intent is to test passing data back to another fla. Right now the data I'm sending is nonsense. I'm just trying to test the connection and get it working. Any help is appreciated.

Here is the entire block of code:

import fl.controls.RadioButton;
import flash.net.LocalConnection;

var seqNum:Number = new Number();
var question:String = new String();
var actual_answer;
var submit_answer;

var end_result:uint = new uint();

function setVariable(quext:String) {
trace("Quext = "+quext);
Question_display.text = quext;
}

//*************** from the parent program ***************************
seqNum = 1;
//question = "New York is the capitol of the USA."
actual_answer = "FALSE";
//*******************************************************************

Question_display.backgroundColor = 0x0000FF;


//********* EventListeners for the buttons **************************
Answer_a.addEventListener(MouseEvent.CLICK, clickHandler);
addChild(Answer_a);
Answer_b.addEventListener(MouseEvent.CLICK, clickHandler);
addChild(Answer_b);
//*******************************************************************
//********* Radio button Handler Function ***************************
function clickHandler(event:MouseEvent):void {
submit_answer = event.currentTarget.label;
}
//*******************************************************************
function sub_answer(event:MouseEvent):void
{
trace("The submitted answer is "+submit_answer+", and the actual answer is "+actual_answer+".");
if (actual_answer == submit_answer) {
end_result = 1;
}
else {
end_result = 0;
}
//*************** send to the parent program ********************
trace("Your conclusions are "+end_result+".");
//*************** send to the parent program ********************
var sender:LocalConnection = new LocalConnection();
sender.send("_exampleChannel", "example", "a string", 6.5, true);

}

Submit_btn.addEventListener(MouseEvent.CLICK, sub_answer);

[preload - Simulate Download] Error #2044/Error #2036
Hi! Well, strange little problem.
I made a small class to preload external assets (swf/jpg/xml..). It works really well for me on-line.

BUT, every time I test it locally (in the flash) with test movie > simulate download, I works properly (it correctly loads the assets), but I always get this error:

Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.

But I repeat: files load correctly. So, what's going on? NOTE that in my code there's also the IOErrorEvent listener, that, when I for exemple I pass a wrong path, it is dispatched (this mean it works). But It doesn't get dispatched here, just because the asset in fact loads.

a piece of code:


Code:
public function loadExtDisplay(file){

loader = new Loader();

loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoadProgress, false, 0, true);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete, false, 0, true);
loader.contentLoaderInfo.addEventListener(Event.INIT, onLoadInit, false, 0, true);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,onIOError);

loader.load(new URLRequest(file));
dispatchEvent(new Event(FileLoader.LOAD_START));
busy = true;

return loader;
}

Code:
public function onIOError(e:IOErrorEvent):void{
e.text = 'I/O ERROR';
}
What's the problem?

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

**Error** Scene 1, Layer 'actions', Frame 1, Line 664: 1087: Syntax Error: Extra Characters Found After End Of Program.
Scene 1, Layer 'actions', Frame 1, Line 664: 1087: Syntax error: extra characters found after end of program.
}

I am new to importing classes and I have been practicing making a photo gallery. I am stuck and I want to know if someone can help me with the error I am getting.

If it is convenient, you can download and test my .zip at www.dhtmlguy.freeservers.com

Thanks in advance!

Using CS3 - Security Errors: Error #2148 And Error #2044
I am using Flash CS3. I'm doing everything by the book by creating and inserting a video into my web page.
When I use Dreamweaver CS3 I can get the video to display on the web page. However, when using Flash CS3 I get
the Security Errors: Error #2148 and Error #2044, and the video will not show up.

If the code would help to help me with this, it is below. I have two videos showing:
- the top one inserted by Dreamweaver, which works.
- the one below it, inserted by Flash and is doesn't.

When I view the Flash inserted video on an .html page it works fine, but when I try to view
it on our .asp page it will not. The paths to the files are the same, (but the file names are different) so that should not be the issue.

Any help out there?

Thanks.

Michael

<!--flash 1 insert begin -->
<tr>
<td valign="middle" align="center" style="background:url(../../images/video_bg2.gif) no-repeat" width="278" height="237">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0','width','261','height','194','id','FLVPlayer','align','middle','src','Flash_Video/YMCA/FLVPlayer_Progressive','flashvars','&MM_ComponentVersion=1&skinName=/flash_video/ymca/Clear_Skin_1&streamName=/flash_video/ymca/ymca3&autoPlay=true&autoRewind=false','quality','high','scale','noscale','name','FLVPlayer','salign','LT','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','Flash_Video/YMCA/FLVPlayer_Progressive','bgcolor','#000066' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="

Error: Error #1023: Stack Overflow Occurred.
This is the code of my Flash component for Flex.
It loads 2 images, one with a "Loader" and the other with a "UILoader" and a progressbar.

When the completeHandler function is executed, the error message " Error #1023: Stack overflow occurred." appears. (The whole message is a the end of the Post)
The code line which does this error is: ImageContainer2.addChild(myUILoader2);
When I take it away, no error anymore, but no image too!


package {

import flash.display.*
import flash.text.*
import mx.flash.UIMovieClip;
import flash.net.URLRequest;
import flash.events.*;
import fl.containers.UILoader;
import fl.controls.Label;
import fl.controls.ProgressBar;
//import fl.controls.progressBarClasses.*;



public class mcbigImage extends UIMovieClip
{

// Define public setter method.
[Bindable (event="bgImageChanged")]
[Event('bgImageChanged')]
[ChangeEvent("change")]
public function set bgImage(img:String):void
{
var ldr:Loader = new Loader();
var url:String = img;
var urlReq:URLRequest = new URLRequest(url);
ldr.load(urlReq);
this.ImageContainerMirror.addChild(ldr);
dispatchEvent(new Event("bgImageChanged"));
//this.testTXT.text = String(ldr.content);
}

[Bindable (event="bigImageChanged")]
[Event('bigImageChanged')]
[ChangeEvent("change")]
public function set bigImage(img:String):void
{
ImageLoader.visible = true;
var myUILoader2:UILoader = new UILoader();
myUILoader2.autoLoad = true;
myUILoader2.source = img;
myUILoader2.scaleContent = false;
myUILoader2.load();
ImageContainer2.addChild(myUILoader2);

var myProgressBar:ProgressBar = new ProgressBar();
myProgressBar.source = myUILoader2;
myProgressBar.move(218, 147);
myProgressBar.addEventListener(Event.COMPLETE, completeHandler);
ImageLoader.addChild(myProgressBar)

function completeHandler(event:Event):void
{
myProgressBar.removeEventListener(Event.COMPLETE, completeHandler);
ImageLoader.visible = false;

}
dispatchEvent(new Event("bigImageChanged"));

}
}
}

This is the whole error message:

Error: Error #1023: Stack overflow occurred.
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/mx.managers:SystemManager::Stage_resizeHandler()[C:devflex_201_gmcsdkframeworksmxmanagersSystemManager.as:2429]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()

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