How To Trap A Loader Error
How do I trap a loader error "Error opening URL 'file://....."? Please help.
Adobe > Flash General Discussion
Posted on: 08/24/2007 08:59:05 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Error Trap
i'm getting text from an external .txt file. is there anyway to trap an error opening it like if it doesnt find it other than if it equals "" or null because it will equal that the first 1 or 2 times it tries to get it on an enterframe?
Trap Error In SWC
I'm using a compiled component (SWC) in my app and the little bugger is throwing a TypeError when I run it in the Flash Debugger. I'd like to trap/ignore that TypeError, since it's preventing further debugging (it works fine from a server, this is just a Debugger issue).
The exact message is:
ActionScript Code:
[SWF] /879366/DartShellPlayer9_6_02_00.swf - 163881 bytes after decompression
TypeError: Error #1034: Type Coercion failed: cannot convert com.doubleclick.dartshell.events::DartShellLoadedEvent@174a821 to com.doubleclick.dartshell.events.DartShellLoadedEvent.
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at DartShellLoader/onDartShellLoaded()
Cannot display source code at this location.
Since it's occurring asynchronously from inside a component placed on the stage, there's no way to use a try/catch that I can tell, and I'm not sure if it actually throws a trappable event from the SWC itself... i've set traps for all errors the vendor claims it should throw and none of those work.
Is there any way to create a generic error trapper that simply grabs all unhandled exceptions?
Trap Error File Exist?
I want to link a button with an excel file located on a specific directory of the h.d.
My four questions are:
Can I catch an error in flash asking if the file exists?
if the file exists an dialog box appears asking me if I wanto to opened or only save on my h.d, but this dialog it appears in background under all my other windows, how can I bring it to the top?
I'm using getUrl as method is the best way to do it?
and lastly a blank web is opened every time an I'm using the method in this way: getUrl(Url) can i disable the new window web
Tank you all And apologize me for my bad writting
[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?
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?
Help With Error When Using Loader
I searched the forum didnt find the answers to my specific prob
So my prob is when i Go through my loader I get an error that seems to me to be from the audio loader on my site (and the slider bar that controls the volume of the audio stops functioning, but does when i avoid loader and go directly to file swf)
http://www.preetarao.com/Loader.html (this is where my loader is located)
http://www.preetarao.com/Official.html (site without loader but the swf the loader loads slider works fine here)
and this is the code I used for the loader
ActionScript Code:
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("Official.swf"));
function loop(e:ProgressEvent):void
{
var perc:Number = e.bytesLoaded / e.bytesTotal;
Loader_Animation.gotoAndStop(Math.round(perc*200));
}
function done(e:Event):void
{
removeChildAt(0)
addChild(l);
}
and this is the code that I have used on The Audio interface
ActionScript Code:
var song:Song = new Song();
var myChannel:SoundChannel = new SoundChannel();
var soundVol:SoundTransform = new SoundTransform();
myChannel=song.play(0, int.MAX_VALUE);
play_btn.buttonMode = true;
stop_btn.buttonMode = true;
stop_btn.addEventListener(MouseEvent.CLICK,stopPlay);
function startPlay(event:MouseEvent):void {
myChannel=song.play(0, int.MAX_VALUE);
play_btn.removeEventListener(MouseEvent.CLICK,startPlay);
}
function stopPlay(event:MouseEvent):void {
myChannel.stop();
play_btn.addEventListener(MouseEvent.CLICK,startPlay);
}
var ratio_volume:Number;
var trackBounds:Rectangle = track_mc.getBounds(track_mc);
var xPos:Number = trackBounds.x;
var yPos:Number = trackBounds.y;
var widthPos:Number = trackBounds.width-track_mc.slider_mc.width;
var heightPos:Number = 0;
var bounds:Rectangle = new Rectangle(xPos,yPos,widthPos,heightPos);
track_mc.slider_mc.x = widthPos;
track_mc.mouseEnabled = false;
track_mc.slider_mc.buttonMode = true;
track_mc.slider_mc.addEventListener(MouseEvent.MOUSE_DOWN,dragSlider);
stage.addEventListener(MouseEvent.MOUSE_UP,stopSlider);
function dragSlider(event:MouseEvent):void {
event.target.startDrag(false,bounds);
addEventListener(Event.ENTER_FRAME,setVolume);
}
function stopSlider(event:MouseEvent):void {
track_mc.slider_mc.stopDrag();
removeEventListener(Event.ENTER_FRAME,setVolume);
}
function setVolume(event:Event):void {
ratio_volume = track_mc.slider_mc.x/widthPos;
soundVol.volume = ratio_volume;
myChannel.soundTransform = soundVol;
}
and this is the error that results for me
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Official_fla::AudioPlayer_30/frame1()
if anyone knows how I would repair this it would be greatly appreciated Thx in advance
Actionscript Error For Pre Loader
Good morning ( in the UK ) to everyone.
I've created a pre loader as a scene in a fla. movie, but i'm struggling to get the action script right : here's what i have so far
framesLoaded = "main"_.framesloaded;
totalframes = "main"_.totalframes;
percentLoaded = Math.round ((framesLoaded/totalFrames)*100);
bar.xscale = percentloaded
"main" refers to the scene that is called main (ie the main part of the movie)& i think this is where the problem lies.
i have tried _root. but this then referes to the root of the pre load scene timeline
How do i code "main" properly
i have the actionscript for the other frames ok i think ;
frame 1 = ifframeloaded "main",240"
gotoAndplay("main,1")
frame 3 = gotoAndplay (1);
I want this to create a scaled bar graph ( which is a movieclip i've given an instance name of "bar" to, and to reflect the percent of the main timeline loaded in a dynamic text box
Can anyone put me on the right track please ??
Thanks very much
Catching A Loader(); Error
Hi everyone.
I have been searching and trying all sorts of stuff to catch an error when I'm using a Loader to load images. But nothing seems to work... If It was an URLLoader I would just have put this code in:
PHP Code:
xmlLoader.addEventListener(IOErrorEvent.IO_ERROR, xmlErrorHandler);
function xmlErrorHandler(errorEvent:IOErrorEvent)
{
// error code
}
But that won't work with an Loader. I tried everything, adding that error eventlistener, doing a try, catch thing with ALL the different error there are.
But nothing seems to catch the error it just outputs "Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found."
So what I want to do is to run a specific code when it throws an error.
Any ideas?
Thanks
Error With Component Loader
I am collaborating in the production of a DVD with Flash 8 in actionscript 2.0 and I have a problem. In my work I often use the "component loader" to load external movies with swf extension. The same page which has the component loader also has several html text boxes with links (e.g. "<a href////="asfunction:myFunction">Click here</a>";) which execute functions defined by me in actionscript. When I use the windows application [to see the DVD in] directly from the PC's DVD player, it is natural that films take a little longer to load, but the problem is that if I click a link of the text while the movie is being loaded, everything vanishes from the screen. The strangest of all is that if I open the DVD with the html file using a browser (Mozilla, for example), none of this happens and everything works fineperfectly. Can someone help me understand why this happens and how I can solve this problem? Thank you in advance for your help.
Xml Picture Loader Error
Hello. Here I have a code. But it seems not to work. I have a MC called an instanced as image on the first layer.
Code:
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = function (loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = []; //piltide array
total= xmlNode.childNodes.length;
for (i=0; i<otal; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
}
loadimage();
} else {
content = "no file";
}
}
xmlData.load("images.xml");
function loadimage() {
image.loadMovie(image[0], 1);
}
this is my xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>1.jpg</image>
</pic>
<pic>
<image>2.jpg</image>
</pic>
<pic>
<image>3.jpg</image>
</pic>
</images>
what is teh problem?
Loader Component Error
I have a loader compnent named Loader. It's identifier is Loader. It is checked for export for actionscript. I then have a movie clip called picblock. The component field under properties says Loader. It's content path is set to a static path for testing. It also says it is an Instance of: Loader. The identifier for this under linkage is picblock.
The image does not show up at all. The loader is invisible. I somehow got it to be a white box earlier and then messed it up. Any help is appreciated.
[F8] Contentpath Error For Loader Component
I put my video name. yuna and koki.flv in contentpath for loader component. and I drag progressBar. But it appear error.
Where should I save flv video? I saved in my document/web.
Should I setup something before creating FLA document???
Yet Another Pre-Loader Tutorial Any1 Want To Error Check?
the loader should basically be a hollow movie
that loads an external swf into it, this is usually the last thing you code and it is very simple to do.
finish the movie... then publish it as a swf
in the same directory create a new movie with the same dimensions as your "main" movie.
in the center of the new movie draw a dynamic text box and give it a name of loadText, to the left of it add a static text box with a "%" sign in it.
then create a new move clip, put nothing in it and close it...
ok, now you want to drag the empty movie clip onto the stage and put it in the top left hand corner, make sure to give it an instance name.
now the code begins,
movieClipInstance.loadMovie("external.swf");
onEnterFrame = function () {
if (movieClipInstance.getBytesLoaded() != movieClipInstance.getBytesTotal()){
loadText.text = Math.floor((movieClipInstance.getBytesLoaded()/movieClipInstance.getBytesTotal())*100)
}
};
if (movieClipInstance.getBytesLoaded() >= movieClipInstance.getBytesTotal()){
delete this.onEnterFrame();
stop();}
so basically what you're doing is loading the published swf into a holder with an instance name (in this case called movieClipInstance) then you're checking the loading everytime flash enters a new frame (usually 20-30 frames per second), if it's not finished loading, keep incrementing the dynamic text field. (btw Math.floor and Math.round will do virtually the same thing, Math.floor rounds down, Math.round rounds up
Yet Another Pre-Loader Tutorial Any1 Want To Error Check?
the loader should basically be a hollow movie
that loads an external swf into it, this is usually the last thing you code and it is very simple to do.
finish the movie... then publish it as a swf
in the same directory create a new movie with the same dimensions as your "main" movie.
in the center of the new movie draw a dynamic text box and give it a name of loadText, to the left of it add a static text box with a "%" sign in it.
then create a new move clip, put nothing in it and close it...
ok, now you want to drag the empty movie clip onto the stage and put it in the top left hand corner, make sure to give it an instance name.
now the code begins,
movieClipInstance.loadMovie("external.swf");
onEnterFrame = function () {
if (movieClipInstance.getBytesLoaded() != movieClipInstance.getBytesTotal()){
loadText.text = Math.floor((movieClipInstance.getBytesLoaded()/movieClipInstance.getBytesTotal())*100)
}
};
if (movieClipInstance.getBytesLoaded() >= movieClipInstance.getBytesTotal()){
delete this.onEnterFrame();
stop();}
so basically what you're doing is loading the published swf into a holder with an instance name (in this case called movieClipInstance) then you're checking the loading everytime flash enters a new frame (usually 20-30 frames per second), if it's not finished loading, keep incrementing the dynamic text field. (btw Math.floor and Math.round will do virtually the same thing, Math.floor rounds down, Math.round rounds up
Loader Loads Wrong URL And Doesn't Throw An Error
I'm trying to make a dynamic gallery. My images are named 1.jpg, 2.jpg, 3.jpg....
My counter starts at 1 and loads the image (1.jpg). After the loading is complete the counter increments to 2 and tries to load 2.jpg... If an image doesn't exist the loader throws en error event and the gallery is complete.
Everything works fine so far, but if there are only 9 images to load and the counter increments to 10 and tries to load 10.jpg (not existing), there is no error event thrown! Instead 1.jpg is loaded! In total 11 images are loaded, but only 9 are existing! Image 10 and 11 are a copy of image 1! An error event is thrown at image 12.
Please help
Loader Loads External .swf But I Get Error Msg From The Class File
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Drawing/::init()
From my main menu when you click the contact button, it loads contact.swf
Code:
ActionScript Code:
function downContact(MouseEvent):void{
var request:Loader = new Loader();
request.load(new URLRequest ("Contact.swf"));
loadMC.addChild(request)
}
contact.swf has a class attached to it called Drawing.as, and for some reason flash can't access it(works fine by itself)
do I have to also load the actionscript file? thanks! (i have a couple more questions after i get this part fixed)
Re...another AS Trap
I posted a thread yesterday (...another AS trap), but I realize the questions were not clear. I've spent the whole day trying to fix it, but my head is just a mess now.
The problem is, in the main.fla I load an swf, that loads another swf, that loads several swf's!!! How can a newbie get lost...
Is someone willing to take a look at my movie?
Thanks
regards
http://www.tantesteef.nl/Files.zip
How To Trap ALT Key?
Hello guys!
After searching and investigating quite a lot, I am posting my problem here in hope that God bless me with success
I am working on an eLearning course whereas client requied the course to be keyboard accessible. He wants all the shortcuts with Alt key combination.
I can trap the Alt key with the use of enterframe but that makes my course processing heavy so I tried to trap Alt key with keylistener event but unfortunately keylistener event doesn't listen Alt key
Could anyone suggest me how to trap Alt key without using enterframe or interval?
Thanks a lot for sparing your precisious time.
Trap All Keys
Okay I was reading the macromedia help file. And is says if I send the fscommand:
Code:
fscommand("trapallkeys",true);
trapallkeys:
true or false:
Specifying true sends all key events, including accelerator keys, to the onClipEvent(keyDown/keyUp) handler in the Flash Player.
This is what it is suppose to do. But when I open the projector file and press the ALT key or F10 key it goes to select menu items. Has anyone every gotten this to work? Or if you have time could you also play with it to see if you can get it to work. ALT and F10 are the only keys I can't capture with Key.getCode(); Thanks for your time.
Trap Keys
I'm trying to get trap keys to work in an executeable. Does anyone have the code or FS Command? The goal is to turn off the keyboard; or more specifically the Ctrl F function. -thanks
Very Anoyin Trap
Ive got myself into a bit of a mess!
Ive got a sound looping in the background of something im doing
I imported a .swf of a repeated starfield, the only problem is...when the starfield repeats so does the sound and it goes all wrong
Can u get around this?
KeyPressed Trap
how do you trap a key from performing it's action.
I have several fields on a form and I do not want the user to delete the field contents and process the form again.
if you delete the contents, and process the form serveal of my fields display NaN, I'll need to trap Delete, Space and Backspace...or in other words my textfield must contain numbers?
any ideas
jef
Trap Your Cursor Effect?
Does anyone know how to do this effect that I found on this mega cool site http://www.benjie.de
When you load up the site select the "Voll Version" and the under the "Kontakt" menu option you'll see hands like they are plants. Move your cursor over to the one on the right of the screen and the hand grabs your cursor and doesn't let go for a few seconds, it feels like the hand is actually holding your cursor, an awesome effect.
My thoughts are that you use a script to follow the cursor, then when the cursor rolls over the hotspot/like the hand, you make the cursor dissapear and load another mc that closes the hand, the mc that closes the hand only runs for a limited amount of frames and then reloads the open hand? the hand still follows the cursor movement when the hand is closed aswell, is the follow the cursor code in the closed hand script?
anyway if anyone knows how to do this or can figure it out I would be stoked
thanks
Trap Keys On Flash
Hello all,
Could we trap all keys on Flash? It seem that Flash can not trap some function & modifier keys, such as F1 -> F12, Esc, Alt....
But I found a game can handle Esc. It's strange to me. Please see this game for more detail http://web.tiscali.it/no-redirect-ti...dyard/play.htm
BTW, I see at http://www.flashkit.com/board/showth...ight=onKeyDown to ask about trap Alt+F4. I don't know how can we trap?
Thanks
Improving, But Found Another AS Trap
I'm gettin' deeper & deeper!
I have a main.fla into which I load an external swf called brio.swf. In this brio.swf I load piraat.swf. The problem is, when I hit the "speelgoed" button in the main movie, and than "BRIO", it opens brio.swf, but when I hit the button that opens piraat.swf, it opens the swf in the wrong location, that is at: x=0 y=0!?
The button that opens piraat.swf has this action:
on (release) {
loadMovieNum("trein_bn.swf", 1);
}
Also, in brio.swf there are buttons that on mouse over should show jpg's. It doesn't in
main.fla. Maybe I'm just messing up AS. It's kinda confusing to explain, but if someone can please take a look at it...
I included the files..it's rather large, sorry.
Trap Arrow Keys
I have a movie clip controlled by user ARROW key input. At one point, I want to disable the arrow keys for a few frames so that the user can't move. How do I stop the arrow key functionality? Or, do I simply swap the mc for a graphic for those frames?
Thanks all.
Trap Browser Close?
Is there a way (via flash or, more likely, javascript) to intercept the browser window close button being pressed??
How about disabling the close button.
Both seem like they would be bad ideas, but I just thought I'd ask as we've got a SCORM course and would like to set the bookmark when the user exits the course instead of doing on every new page.
Thanks!!
Trap All Keys Command
Using this command I can disable the escape key. Is there one I can use to disable CTRL+ALT+DEL ?
I want it so that once I start my presentation, a certain key has to be pressed for it to be ended. Hopefully I can stop people from 'accidentally' pressing escape, or CTRL+ALT+DEL, or ALT+F4 etc.
This is going to be in a stand alone player, not in a browser.
Thanks
ReferenceError: Error #1069: Property Data Not Found On Flash.display.Loader And Ther
I am trying to bring in a link name from an XML file and link to it from a photo. Here's the code for the link I used:
Code:
function getURL1(e:MouseEvent):void{
var myXML:XML = new XML(e.target.data);
var image_url = myXML.person[0].@link;
navigateToURL(new URLRequest(image_url));
}
It's giving me this error message:
Code:
ReferenceError: Error #1069: Property data not found on flash.display.Loader and there is no default value.
at IAPFlashDocXML_fla::MainTimeline/getURL1()
I don't know how to fix it. Is there a simple fix to this?
Old Timer Falls Into Newbie Trap
OK I've been around the block a few times, but you know until now I held out on using Flash 5 AS because I wanted ultimate compatibility (you'd be surprised how many AOL-ers there are who don't know how or cannot upgrade their default Flash 4 plugins to higher!)
Anyways, I finally said "screw this" and have dived into Flash 5 AS. I am not turning back I tell ya. It's such a time saver!
Now, of course I went and fell into what is probably a CLASSIC problem for newbies, yet I can't figure out the what I am doing wrong.
Here's the prob: I have duplicated movieclips and inside these movieclips is the variable 'letter'.
I want to access this variable in each MC I duped, in a FOR loop. Example:
for (i=0; i<=10; i++) {
clip = ["TILE" + i];
duplicateMovieClip("TILE", clip, 10+i);
setProperty(clip, _x, startx+(i*xinc));
setProperty(clip, _y, starty);
clip.letter = "X";
}
The problem there is that "clip.letter" doesn't assign the value it should. It does nothing. I also tried "_root.clip.letter" and "_level0.clip.letter". Nothing works. The ONLY solution I found was to use the deprecated "tell target" !
What is the correct solution here?
~RB
PS: This works:
tellTarget (clip) {
letter = "W";
}
Building A Trap For The Elusive ALT Button
I am desperately trying to build a key press event using the ALT button. Appearently, you can't use an on keyPress. But is there another way? I tried trapping for the ALT button on an onClipEvent (the code is shown below), and by everything that I have read it should work, but (big suprise) it doesn't...
onClipEvent (keyDown) {
if (Key.isDown(68)) {
gotoAndStop ("right");
} else {
gotoAndStop ("wrong");
}
}
Can anyone help??
Component ChangeHandler Problem...i'm In A Trap
I hate the ComboBox component so I thought I'm come up with my own hybrid using 2 frames, one with a dropdown button and the other using a standard listBox component, but I've got myself in a problem and dont know how to fix it
On a frame called "hide" I have a dropdown button on clicking this sends the movie to "show" where the listBox is.
Ok so far but what I want is once an option is chosen on the listbox for the movie to return to "hide" but I can't do this simple thing!
I thought putting "gotoAndStop("hide");" within the function called by the component change handler would fix it but I didn't realise that the changeHandler is called right away even before you choose any option so adding that code makes it return to "hide" even before the listbox gets shown.
Any ideas how you can close/hide a listbox after an option has been chosen?
Can Flash Capture/trap/acknowledge FSCommand?
Hi, all. I'm new here, and of course my first post is a question...
So I have this stack of old SWFs that throw a couple of FSCommands ("exitButtonPressed", "ModuleDone") to an outside player written long ago in VB.
Using Flash, I'm making a new executable "jukebox" player for these old SWFs using oldClip.loadMovie().
I would like my jukebox to respond to the old FScommands appropriately, but cannot find a way. Can my "jukebox" that's playing oldClip respond to an FScommand thrown by oldClip?
All my FSCommand googling only leads to Flash-to-HTML, Flash-to-JS, Flash-to-Delphi, Flash-to-VB, Flash-to-C++, Flash-to-C#, etc...
I got the effect I needed by adding _root.oldClip.unloadMovie(); to some of the old SWFs, but I don't have all the FLA files. (Besides, that's something of a kludge, no?)
Help! Thanks.
Trap All Keys Code And Flash 6 Linux Player
I cannot seem to lock out the ESCAPE KEY with trap all keys.
I've attached my code and it works on both MAC and PC but not the Linux for some reason.
In addition, the TAB key still cycles through buttons on the movie level.
//First Scene:
//trap the Escape key and others
fscommand("trapallkeys", "true");
//In a later Scene:
//the Escape key is assigned the following action
ORIGINkeyListener = new Object();
ORIGINkeyListener.onKeyDown = function()
{
if (Key.isDown(Key.ESCAPE))
{
Selection.setFocus(RGDUkel);
gotoAndStop(10);
}
}
Key.addListener(ORIGINkeyListener);
thanx...
-tha capn
Trap The Duplicate Logging On FMS, LoggOff Old One And Accept New Instance.
Hi All,
I need help on the following topic of FMS 2.0.
On FMS Server I want to trap the duplicate logging, Logoff Old One and accept New Instance.
The scenario is like this, if a user logged in with the name “wins” on FMS Application from his Office, after some time he came to his home and want to logging again.
I want to disconnect or logoff the instance of application which is logged in from his Office and allow him to logging from his home.
Actually I want to implement the functionality like Yahoo messenger.
Yahoo messenger gives the facility to login from another system and logoff the previous instance.
So, tell me what I have to do to achieve this.
Thanks
How Do I Trap 'enter Keypress' After Certain Presses And Disable Further Typing In Atext Area?
my textarea needs to be restricted to 16 lines no matter what. I have used the change listener and tried getting the number of 'enter' clicks. But how do i lock the textarea such that, the user cannot type anything further, but can edit what all he has written.
I can disable the textarea but this will not allow editing. Can anyone provide me with the thing i need? Hope the idea is clear.
Regards
Roshan
**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
|