IoError Wierdness
Hi I am getting a an #2032 stream error when loading an corssdomain open Rss feed in to my app. The weird bit is that i get it only when i play the SWF in a stand alone player or try to debug it in the IDE, it works fine when compiled or in a browser. The only info i could find on this http://www.judahfrangipane.com/blog/?p=87 and couple of threads http://www.actionscript.org/forums/s...ght=error+2032 Any one? Thanks for your time.
KirupaForum > Flash > ActionScript 3.0
Posted on: 08-11-2008, 06:35 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
IoError Wierdness
Hi
I Have a RssLoader class, using URLLoader to load a Rss feed to my app.
When compiling through Flash IDE or Flex SDK the feed loads, all lovely.
BUT trying to play the copiled SWF in a stand alone player, or debugginng via IDE throws an IoError.
Any ideas?
Thanks for your time.
Mac Projector Wierdness
I just finished a small cd rom presentation with 4 files. I need it to run on both mac a pc, it runs fine on pc, but the mac version wants to be extracted to the HDD, instead of being run off the cdrom, (guessing because it's an hqx file). after it extracts it runs fine, but it will not load external movies correctly because it's not being run off the cd?
I'm developing on a PC. win 2000
I publshed 4 files
1: start.exe = PC projector
2: MAC.hqx = Mac Projector
3: autorun.ini = to autorun on a PC
4: video.swf = is loaded into one of the projectors using loadMovie
am I doing something wrong?
Combo Box Wierdness
Hi
I am using a combo box in MX 2004. Basically I am attaching the combo using the attachmovie method and giving it a unique instance name. I then for loop and add items to the combo box. These doesn't seem to work as the combo box seems to take a couple of millisecond to initialize
If I call the function to populate the combo using a setinterval with a small delay this seems to work. This feels very messy and I want to know if someone has a better way of solving this?
Emergency Help With Wierdness
This is wierd and I really need some help
Overnight, I've lost the ability to access files on remote servers from within .flas on my computer.
This has effected all the site files I've got. Any file requested from a server from within the .flas on my local computer (all using the absolute URLs) fail and I recieve a file cannot be found error. All these files worked fine before, but now they don't. As far as I can see, my internet connection is fine, all the live swfs are still working fine, and I can still connect to all servers with FTP and download the relevent files using their absolute URLs in a browser address bar.
For example one fla has an mp3 player in it which streams the files from the server. When I launch the site .fla on my home machine to work on the site, it is no longer able to find the mp3s, even though they are still in exactly the same place on the server. The same is true for text files and flvs.
Please Help
HELP Scrollpane Wierdness
Help,
although this seems simple to me, it has proven to be puzzling.
I dare any of you, (yes I dare you) to solve this simple question.
I have made quite a few preloaders, of different types, they all work nicely,...UNTIL... I try to load them into a Scrollpane, then the preloader refuses to play (until the bulk of the main swf loads, like at about 95%), thus rendering the preloader pretty much useless, as a person waiting for that swf to be loaded into the scrollpane will be staring into a blank scrollpane until the main swf loads.
I am baffled, as the swf, if you access it directly it starts playing the preloader almost instantly (I would expect that)
DOES ANYONE HAVE KNOWLEDGE ABOUT THE MAGIC OF SCROLL PANES????
I'll buy you a cup of coffee.
THANKS
IE Does Wierdness To My Flash?
I'm somewhat novice at flash programming.. having taught myself in the last few years. I keep it simple.. a few links, some dynamic stuff... nothing too complex.
Needless to say I'm not a moron.
So I have a wierd problem.... the best way to describe it is this...
USING FIREFOX or SAFARI
Go to http://joecolelights.googlepages.com look under "design" and try browsing through my portfolio... it's not a finished product but that's kind of the road I'm going towards....
Now fire up your old dusty IE... look at the same part of the same page....
What the Hell? I don't get it. IE resizes my thumbnails and stacks them on top of each other.... I can't figure out why I only have this problem in IE. Furthermore it's only some versions of IE..... I've seen it show up right in some older IE versions.
Anyone?
Buller?
Buller?
Font Wierdness
I have developed a site on a PC that uses “Open Office” a freeware type of MS Word.
Now the fonts that this app uses are different to those on Word so to get the wording in my site to show up on all systems I choose the “_sans” option to, as I understand it, use a generic “_sans” font on ALL systems.
Now although I have view the site on other systems & the client has not mentioned any problems with it, when I recently tried to view it on another system I have running XP the letters did not show up?
I have got round this by changing all the text the Dynamic & embededing the font which works. The only thing I can think of that might be throwing things out is the fact that the text is rotated in the movie – I could understand how this could be the case but still don't get how I was able to view it ok on other systems?
[F8] Mac Safari Wierdness
I've got a file using AS2 to load images via xml that works fine in IE, Firefox and Safari on a PC. It works fine on IE and Firefox on a Mac, but, when my client tests it using Safari 3.1.1 on a Mac, he says all the images momentarily flicker in, but disappear when they all load...I can't duplicate it, so I can't test it and I'm not sure what to do to fix it.
I tried removing type="application/x-shockwave-flash" from the html and played around with the wmode, but neither seemed to change anything when he was viewing it...
You can see the swf at:
http://brianwpiper.com/fk/fk.htm
Any ideas?? Would LOVE some help from the Mac community on this...
Thanks!!
edit: Oh, and I'm using swf object to display the swf...I tried using the standard embed/object as well, but that didn't work either...
[CS3] Import SWF Wierdness
Hi all,
I'm working on a project to be delivered in flash. I'm creating an animation in a 3d package, exporting as a layered illustrator file and exporting an SWF from Illustrator. Now, this SWF when played standalone is fine, looks great, but when I import, either into the library or direct to stage into Flash CS3, the final frame is duplicated in all frames in the timeline. If the animation was to be short I'd bite the bullet and manually remove the offending frame content. However, this is going to be a long animation and I'm at 550 odd frames as of now.
I'm pretty sure the issue lies with the final import into Flash, but I just do not know why.
Heres links to the relevant files, the initial ai file direct from the 3d package, the exported swf from Illustrator and the fla.
http://www.thepixelforge.net/clients/FlashKitRefs.rar (2.2mb)
http://www.thepixelforge.net/clients/FlashKitRefs.zip (3.3mb)
Thanks in advance - I hope with your help I can get this sorted
SetMask Wierdness
I'm having a slight problem with a setMask that I was wondering if anyone else has run across this before. Basically I creating thumbnail images that have a mask applied to them to give the illusion of perspective.
The masking looks great and works like a charm. There is a slight flicker but otherwise masking happens.
However, when I load this clip into a container movie the masking action is no longer working. i see the actual area of the mask drawn on the screen.
any ideas of where to start here?
Button Wierdness...
Here's some code:
package {
import flash.display.MovieClip;
import fl.controls.*;
public class Controller extends MovieClip {
public function Controller():void {
playPauseBtn.enabled = false;
}
}
}
My problem:
I put a button on the stage, set instance name to playPauseBtn, change it's label to anything but "Label" in the Parameters panel, and for some reason the button cannot be disabled with code above.
Not a critical problem because I can set playPauseBtn.label = ''; and it works, but why would the button require a label of "Label" in the parameter panel to allow disabling?
playPauseBtn.mouseEnable also wont work under the same circumstances.
Pre Loader Wierdness
Hi all,
I have pre loader script attached to a movieClip in the first frame of the my movie. The whole of the _root timeline is only 2 frames long, I use attachMovie and LoadMovie to build the site. But I cant get the loader to work. Its really odd as i use it all the time and its great, nice and simple. But for some reason everything stays blank and then the movie appears...
Any ideas as to why?
Here's my code;
onClipEvent (enterFrame) {
percent = Math.round(_root.getBytesLoaded())/Math.round(_root.getBytesTotal())*100;
_root.percentDisplay = Math.round(percent)+"%";
this._xscale = percent;
if (percent == 100) {
_root.gotoAndPlay(2);
}
}
The text and loader bar appear for a flash when its 100% but its like its not looping...??? So I know all instances are connected and var work...
Flash 8, Mac OSX
Thanks for your ideas in advance...
Martin
Variable Wierdness.
Hi, I am going nuts over this. I will explain what I have. I really do hope someone could help me on this one.
in the main swf, i load an external swf to it.
loadMovie(externalfile.swf, _root.content);
------------------------------------------------
And then in the external swf, I have a varible named
frametogo = new String(none);
------------------------------------------------
In the external swf I have a button that does this.
on (release) {
frametogo = 3;
this.textFade.gotoAndPlay(2);
this.anim.gotoAndPlay(36);
}
------------------------------------------------
So it tells the textfade to go forward and in the middle of the textfade I have this action
this._parent.gotoAndStop(_root.frametogo);
------------------------------------------------
All this works nicely when its played alone. but when its loaded to the main swf, the frametogo variable is not read in the textfade movie clip? I'm using Flash 6 on this.
all so on the first frame of the external and the main swf i have a action that goes like this
this._lockroot = true;
Can anyone get any sense of this?
Thank you, and I really appriciate if anyone can check what i have written here and maybe give it an anwser of some sort.
Variable Wierdness.
Hi, I am going nuts over this. I will explain what I have. I really do hope someone could help me on this one.
in the main swf, i load an external swf to it.
loadMovie(externalfile.swf, _root.content);
------------------------------------------------
And then in the external swf, I have a varible named
frametogo = new String(none);
------------------------------------------------
In the external swf I have a button that does this.
on (release) {
frametogo = 3;
this.textFade.gotoAndPlay(2);
this.anim.gotoAndPlay(36);
}
------------------------------------------------
So it tells the textfade to go forward and in the middle of the textfade I have this action
this._parent.gotoAndStop(_root.frametogo);
------------------------------------------------
All this works nicely when its played alone. but when its loaded to the main swf, the frametogo variable is not read in the textfade movie clip? I'm using Flash 6 on this.
all so on the first frame of the external and the main swf i have a action that goes like this
this._lockroot = true;
Can anyone get any sense of this?
Thank you, and I really appriciate if anyone can check what i have written here and maybe give it an anwser of some sort.
_framesloaded Wierdness
Hi all.
Here's a bit of weirdness:
I was playing around with _framesloaded and _currentframe, and noticed that if I am streaming a SWF file, _framesloaded mostly seems to equal _currentframe-1... mostly... <said with a Newt-type-voice from Aliens "they mostly come out at night... mostly..." >
Here's what I did (see attached ZIP for the FLA):
Create a FLA with 7 frames and 7 layers, each frame is keyframed on its own layer
Each frame has a text object on it containing the frame number (so that I know that _currentframe is giving me the correct number)
Each frame also has some additional junk text on it (to get the number of bytes per frame up a bit)
Add a stop on the last frame to prevent looping
I created a dummy MC on the first frame that lasts for all 7 frames
I put this code on the dummy MC (so I could watch these values change as the movie clip plays from 1 to 7):
Code:
onClipEvent(enterFrame){
trace("framesloaded " + _parent._framesloaded + " currentframe " + _parent._currentframe);
}
I then tested the movie using "Show Streaming" with a bandwidth of 200B/s. Heres the trace:
framesloaded 0 currentframe 1
framesloaded 0 currentframe 1
framesloaded 0 currentframe 1
framesloaded 0 currentframe 1
framesloaded 0 currentframe 1
framesloaded 0 currentframe 1
framesloaded 0 currentframe 1
framesloaded 0 currentframe 1
framesloaded 0 currentframe 1
framesloaded 0 currentframe 1
framesloaded 0 currentframe 1
framesloaded 0 currentframe 1
framesloaded 0 currentframe 1
framesloaded 1 currentframe 2
framesloaded 1 currentframe 2
framesloaded 1 currentframe 2
framesloaded 1 currentframe 2
framesloaded 2 currentframe 3
framesloaded 2 currentframe 3
framesloaded 2 currentframe 3
framesloaded 2 currentframe 3
framesloaded 2 currentframe 3
framesloaded 2 currentframe 3
framesloaded 2 currentframe 3
framesloaded 2 currentframe 3
framesloaded 2 currentframe 3
framesloaded 2 currentframe 3
framesloaded 3 currentframe 4
framesloaded 3 currentframe 4
framesloaded 3 currentframe 4
framesloaded 3 currentframe 4
framesloaded 3 currentframe 4
framesloaded 3 currentframe 4
framesloaded 3 currentframe 4
framesloaded 3 currentframe 4
framesloaded 3 currentframe 4
framesloaded 3 currentframe 4
framesloaded 3 currentframe 4
framesloaded 3 currentframe 4
framesloaded 3 currentframe 4
framesloaded 4 currentframe 5
framesloaded 4 currentframe 5
framesloaded 4 currentframe 5
framesloaded 4 currentframe 5
framesloaded 4 currentframe 5
framesloaded 4 currentframe 5
framesloaded 4 currentframe 5
framesloaded 4 currentframe 5
framesloaded 4 currentframe 5
framesloaded 5 currentframe 6
framesloaded 5 currentframe 6
framesloaded 5 currentframe 6
framesloaded 5 currentframe 6
framesloaded 5 currentframe 6
framesloaded 5 currentframe 6
framesloaded 5 currentframe 6
framesloaded 5 currentframe 6
framesloaded 5 currentframe 6
framesloaded 6 currentframe 7
framesloaded 6 currentframe 7
framesloaded 7 currentframe 7
framesloaded 7 currentframe 7
framesloaded 7 currentframe 7
The movie animates 1 through to 7 (agreeing with the _parent._currentframe value), but _parent._framesloaded seems to be one less than the current frame. Right up until it is displaying the last frame. Then Flash seems to work out that something is wrong and adjusts _framesloaded to _totalframes
At first I thought that Flash was just doing the old zero based array thing for _framesloaded and using a one based array for _currentframe, but when it catches up at the end... I dunno!
Any ideas? I've attached the FLA I used to test this.
Excuse me, I've got to go get a life now
PS. It does this in MX and MX04
As2 Code Wierdness
Hi there guys...
I have this piece of code on an mc acting as a button
ActionScript Code:
onClipEvent (load) {
this.onRollOver = function() {
this.blurTo(3, 2, 2);
};
this.onRollOut = function() {
this.blurTo(0, undefined, 2);
};
this.onRelease = function() {
//
this.createEmptyMovieClip("interview_mc", this.getNextHighestDepth());
interview_mc.loadMovie("interview.swf", "this.interviewcontainer");
interview_mc._x = 50;
interview_mc._y = 150;
this.button_btn.onRelease = function () {
this.removeMovieClip(this.interview_mc);
}
//
};
}
The effect seems to be acting on the loaded MC and its buttons and the swap depth isn't working either, although if I use a button it seems to work. I'm sure its something pathetically simple, p p please heylp...
ComboBox Wierdness
So I'm making a little fake "find" dialog box. It's got a comboBox, which displays a list of possible text strings to search for (which comes from an array). And then there's the "Find Next" button, which starts the search. So everything works, kinda.
The first thing the "Find Next" button's onRelease function does is trace("findNext") right? get this: If you click repeatedly at a reasonable pace it traces "findNext" around every 4th time - If you click really quick it seems to work every time, and if you wait for 10 secs or so between clicks it seems to work every time. What the f***? I commented out all sorts of stuff trying to find the source of the bug and nothing helped untill I tried deleting the comboBox, then everything works fine. What i can't understand is how the comboBox prevents the button from resistering its onRelease function - it's not like there's a problem with this function itself - the function isn't even being started (I know this 'cause it doesn't trace "findNext")
Any suggestions (or moral support) would be most appreciated.
I know Flash can do some wierd things sometimes but this is a little much. Does anyone know of a 3rd party comboBox like component that is perhaps a little easier to work with?
Movie Clip Wierdness
this really has me stumped.
I have an mc (Var) that checks a bunch of varibles are set to one. If they are all set to one it tells another mc (end) on the stage to gotoAndPlay(2). but what happens is the the 'end' clip just goes to frame (2) and stops.
the clip 'end' is on the stage all the time, the 'Var' clip is working caus 'end' goes to frame 2.
any ideas?
thanks
Wierdness Loading Movies
Hello flashers! I am having problems when loading movies. If I open my projector and click on a button that opens a new swf, The new swf starts playing....then all of the sudden it goes to another swf and plays that. I do not get it. Here is the very simple action script from the projector: loadMovieNum("REPSH.swf", 0);
Now, all of the swf's are in the same folder as the projector. I was setting the level to 1 on all of the buttons. At that time, what I mentioned above would happen. I then changed it to 0 and now it stays on the right swf but I hear both the swf that I wanted to load and sound from another swf that I did not tell to load. Any help would be greatly appreciated. Thanks!
Imported Animation Wierdness
I made an animated image in Fireworks and in FW the image does just what I want with the animated layer going from 0 - 100 in opacity.
I imported it into the library in Flash and the opacity is all at 100. If I double click the symbol and go into its timeline the opacity is back to the correct 0 - 100 fade.
Why does it do this?
Button Component Wierdness
Player.fla and Controller.as are in the same folder.
Player.fla:
Button component in the library (with its assets). Document Class = "Controller". 1 layer, 1 frame. No code in timeline.
Controller.as:
(see attached code)
My problem:
I put a button on the stage, set instance name to playPauseBtn, change it's label to anything but "Label" in the Parameters panel, and for some reason the button cannot be disabled with code I attached.
Not a critical problem because I can set playPauseBtn.label = '' in my class file and it will work, but why would the button component require a label of "Label" in the parameter panel to allow disabling?
I can place the playPauseBtn.enabled = false in the time and it will work without any issues, but that's not what I want.
Posted this issue at actionscript.org and other people are having the same problem... Is this a component bug?
Attach Code
package {
import flash.display.MovieClip;
import fl.controls.*;
public class Controller extends MovieClip {
public function Controller():void {
playPauseBtn.enabled = false;
}
}
}
Dynamic Text From A Cgi? Wierdness...
ok - i'm completely bamfoozled here - in the past, we've loaded our dynamic text into our sites through a text file stored in the same local folder - but now we're getting set up to load everything from a database... and i know it's obviously possible - but we're getting some strange results...
so, we've got "getPage.cgi" located on our server, in an aliased cgi-bin folder (for security reasons) - and in flash, i'm calling to it like this:
------------------------------------------------------
LoadText = new LoadVars();
LoadText.load("http://***IPaddress***/cgi-bin/getPage.cgi?domain=guillaumegarrigue.com?Ran="+ran dom(999))
------------------------------------------------------
now - if i run the file locally (open the html file on my machine), it works fine, and all the text values are populated correctly...
but as soon as we put the flash file on the internet (www.guillaumegarrigue.com/test.html), it doesn't work - no text...
AND, even stranger - when we look at the logs on the server, we can see the call to the cgi when it's run locally, but when we look at the site online, the call is never made...
any help or advice would be greatly appreciated...
Dynamic Text From A Cgi? Wierdness...
ok - i'm completely bamfoozled here - in the past, we've loaded our dynamic text into our sites through a text file stored in the same local folder - but now we're getting set up to load everything from a database... and i know it's obviously possible - but we're getting some strange results...
so, we've got "getPage.cgi" located on our server, in an aliased cgi-bin folder (for security reasons) - and in flash, i'm calling to it like this:
------------------------------------------------------
LoadText = new LoadVars();
LoadText.load("http://***IPaddress***/cgi-bin/getPage.cgi?domain=guillaumegarrigue.com?Ran="+ran dom(999))
------------------------------------------------------
now - if i run the file locally (open the html file on my machine), it works fine, and all the text values are populated correctly...
but as soon as we put the flash file on the internet (www.guillaumegarrigue.com/test.html), it doesn't work - no text...
AND, even stranger - when we look at the logs on the server, we can see the call to the cgi when it's run locally, but when we look at the site online, the call is never made...
any help or advice would be greatly appreciated...
Flv/attachAudio Scoping Wierdness
Howdy,
Encountered something odd when using attachAudio to control the volume of a netstream from within a class.
Using the following code:
Code:
private function init():Void{
netCon = new NetConnection();
netCon.connect(null);
netStr = new NetStream(netCon);
netStr.setBufferTime(buffer);
container.screen_mc.attachVideo(netStr);
setAudio();
}
private function setAudio():Void{
var myClip:MovieClip =
container.createEmptyMovieClip("audio_mc", container.getNextHighestDepth());
myClip.attachAudio(netStr);
audio:Sound = new Sound(myClip);
audio.setVolume(0);
}
The audio var is declared before the constructor, and it doesn't allow me to control the audio UNLESS I declare the audio var within the setAudio method as a local var. I need it to be accessable from other methods so this is no good to me.
Anyone have any ideas?
Funny IOError
i have a movie that gives an error if you navigate away from the page before all the images finish downloading:
Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.
any ideas on how to suppress that?
IoError Questions
text loads into text field but when I click on button textfield doesn't reload and I recieve output error. is "function clickMenue" constructed properly?
ps. is this error stating that it cannot find the welcome.txt or boat.txt?
if so, is it common practice to construct another textfield to display "cannot load page"
any help will be greatly apreciated, sincerely sybershot
output error
Code:
Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:///C|/Users/HotRodz/Desktop/as3%20working%20on/css%20reload/instance2.txt
at cssreloader_fla::MainTimeline/frame1()
Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:///C|/Users/HotRodz/Desktop/as3%20working%20on/css%20reload/instance1.txt
at cssreloader_fla::MainTimeline/frame1()
code
Code:
var fillType1:String = GradientType.LINEAR;
var colors1:Array = [0x777777, 0x333333];
var alphas1:Array = [999, 999];
var ratios1:Array = [0, 255];
var matr1:Matrix = new Matrix();
matr1.createGradientBox(5,5,0,5,5);
var spreadMethod1:String = SpreadMethod.PAD;
var welcome:MovieClip = new MovieClip();
welcome.graphics.beginGradientFill(fillType1, colors1, alphas1, ratios1, matr1, spreadMethod1);
welcome.graphics.lineStyle(5, 0x111111, 0);
welcome.graphics.moveTo(0,0);
welcome.graphics.lineTo(75, 0);
welcome.graphics.lineTo(75, 25);
welcome.graphics.lineTo(0, 25);
welcome.graphics.lineTo(0, 0);
welcome.graphics.endFill();
addChild(welcome);
var boat:MovieClip = new MovieClip();
boat.graphics.beginGradientFill(fillType1, colors1, alphas1, ratios1, matr1, spreadMethod1);
boat.graphics.lineStyle(5, 0x111111, 0);
boat.graphics.moveTo(0,0);
boat.graphics.lineTo(75, 0);
boat.graphics.lineTo(75, 25);
boat.graphics.lineTo(0, 25);
boat.graphics.lineTo(0, 0);
boat.graphics.endFill();
addChild(boat);
this.boat.x = 150
var textContainer:Sprite = new Sprite();
textContainer.x = 1;
textContainer.y = 26;
addChild(textContainer);
var txtField:TextField = new TextField();;
txtField.width = 487;
txtField.wordWrap = true;
txtField.autoSize = TextFieldAutoSize.LEFT;
textContainer.addChild(txtField);
var cssLoader:URLLoader = new URLLoader();
var cssRequest:URLRequest = new URLRequest("myCssStyle.css");
cssLoader.addEventListener(Event.COMPLETE,cssLoaded);
cssLoader.load(cssRequest);
function cssLoaded(evt:Event):void {
var css:StyleSheet = new StyleSheet();
css.parseCSS(URLLoader(evt.target).data);
txtField.styleSheet = css;
}
var welcomeLoader:URLLoader = new URLLoader();
var welcomeRequest:URLRequest = new URLRequest("welcome.txt");
welcomeLoader.dataFormat = URLLoaderDataFormat.TEXT;
welcomeLoader.addEventListener(Event.COMPLETE,welcomeLoaded);
welcomeLoader.load(welcomeRequest);
function welcomeLoaded(evt:Event):void {
txtField.text = welcomeLoader.data;
}
var contentLoader:URLLoader = new URLLoader();
contentLoader.dataFormat = URLLoaderDataFormat.TEXT;
contentLoader.addEventListener(Event.COMPLETE,contentLoaded);
function contentLoaded(evt:Event):void {
txtField.text = contentLoader.data;
}
function clickMenue(evt:MouseEvent):void {
var content:String = evt.target.name + ".txt";
var contentRequest:URLRequest = new URLRequest(content);
contentLoader.load(contentRequest);
}
welcome.addEventListener(MouseEvent.CLICK,clickMenue);
boat.addEventListener(MouseEvent.CLICK,clickMenue);
Won't Catch IOError. Why?
I'm trying to catch an IOError that is thrown from a Loader object when a URL is not found. I've added an IOErrorEvent listener to the Loader object before the load() method is called. The handler is called but it still throws an error in the browser and an error prompt comes up. I even tried using a try..catch block checking for IOError and even simply Error which should catch any error (as far as i understand).
Essentially I just don't want the error prompt to come up and interfere with the users experience. Any guidance or suggestions would be appreciated. Thank you.
IOerror With Streaming Mp3
Hi guys,
This is probably a standard problem but I couldn't find anything specific here
on the forum.
THE SITE AND THE RELEVANT INFO ABOUT IT
This client's site www.serenitysoinsbio.com is a site I did a few months ago.
There is a background music. It is a streaming mp3.
THE BIT OF CODE RELATED TO THE BACKGROUND MUSIC
ActionScript Code:
// Declaring and starting stream
var MUSIC:Sound = new Sound;
var URL:URLRequest = new URLRequest("SERENITY.mp3");
MUSIC.load(URL);
var sc:SoundChannel = MUSIC.play();
var MUSIC_PLAYING:Boolean = true;
var POSITION:Number = 0;
sc.addEventListener(Event.SOUND_COMPLETE, RESET_MUSIC);
// Handling on/off button
function TOGG_MUSIC (e:MouseEvent):void
{
if (MUSIC_PLAYING)
{
SPEAKER.NO_LINE.visible = true;
POSITION = sc.position;
sc.stop();
MUSIC_PLAYING = false;
}
else
{
SPEAKER.NO_LINE.visible = false;
sc=MUSIC.play(POSITION);
sc.removeEventListener(Event.SOUND_COMPLETE, RESET_MUSIC);
sc.addEventListener(Event.SOUND_COMPLETE, RESET_MUSIC);
MUSIC_PLAYING = true;
}
}
// Handling stream reaching its end
function RESET_MUSIC(e:Event):void
{
POSITION = 0;
sc=MUSIC.play(0);
sc.removeEventListener(Event.SOUND_COMPLETE, RESET_MUSIC);
sc.addEventListener(Event.SOUND_COMPLETE, RESET_MUSIC);
}
THE SYMPTOMS
In FF, when exiting the site after the music has started streaming but before
it has fully loaded, I get the following error
Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
In IE, it's (as ususal) all invisible and Flash player does not throw an error message.
WHAT I TRIED TO DO TO FIX IT
I added an event listener to handle the IOerror:
ActionScript Code:
//additional code to handle IOerror
sc.addEventListener(IOErrorEvent.IOError, PREMATURE_EXIT);
function PREMATURE_EXIT():void
{
//do nothing;
}
But I get the compile error:
1119: Access of possibly undefined property IOError through a reference with static type Class.
--> Any idea as to what I am doing wrong here ?
IOError Handling
There is a text box on the stage named tBox.
I need my error handler functions to deal with the error of a file not being found instead of flash displaying the error. The functions are never called and the output window shows Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
What am I doing wrong?
ActionScript Code:
var imgLoader:Loader = new Loader();
imgLoader.addEventListener(ErrorEvent.ERROR, handleError);
imgLoader.addEventListener(IOErrorEvent.IO_ERROR, handleIOError);
var url:URLRequest = new URLRequest('doesnt_exist.jpg');
imgLoader.load(url);
function handleError(e:ErrorEvent):void
{
tBox.text = 'Test';
}
function handleIOError(e:IOErrorEvent):void
{
dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, IOErrorEvent(e).text));
tBox.text = 'Test: ' + IOErrorEvent(e).text;
}
Xml Socket IOerror
hiyall,
i plan to make an AS3 package to communicate with processing with flash, but it seems i cant even get xml sockets to run. i'd like to know if it's AS3 related or if related to my network (cuz im not really good with networks)
here is what i did
HTML Code:
package {
// imports
import flash.display.Sprite;
import flash.net.XMLSocket;
import flash.events.Event;
import flash.events.DataEvent;
import flash.events.IOErrorEvent;
// class definition
public class Main extends Sprite {
// variables
var socket:XMLSocket;
// constructor
public function Main () {
socket = new XMLSocket ();
socket.connect ("127.0.0.1", 9002);
socket.addEventListener (DataEvent.DATA, xmlSocketDataHandler);
socket.addEventListener (Event.CONNECT, xmlSocketEventsHandler);
socket.addEventListener (Event.CLOSE, xmlSocketEventsHandler);
socket.addEventListener (IOErrorEvent.IO_ERROR, xmlSocketEventsHandler);
}
// events
private function xmlSocketEventsHandler (event:Event):void {
trace (event);
}
private function xmlSocketDataHandler (dataEvent:DataEvent):void {
trace (dataEvent);
}
// functions
}
}
whether i use the loneliest number or the ip i get from my ipconfig (i work on windows xp) i get an IOerror
any help is appreciated!
XML/AS3 Ioerror, URL Not Found
Hi,
Probably something very simple but I don't quite see what !! I have an external xml that looks like this:
Code:
<work>
<piece>
<name cat="GRFX">20's</name>
<url>work/20_1.jpg</url>
<url_big>/work/20s.jpg</url_big>
<url_big>/work/20s_2.jpg</url_big>
<url_big>/work/20s_3.jpg</url_big>
<description>20's a project to recycle the cigarette machines into clothing dispensary object</description>
<link>work/20s/home.html</link>
</piece>
...
and a folder "work" inside the folder containing my swf, with the pictures..
Code:
private function onCompleteSmall(e:Event)
{
e.target.removeEventListener(Event.COMPLETE, onCompleteSmall)
c =0;
d=0;
for (i=0; i > arrayUrl.length; i++)
{
thumb = new Bitmap(e.target.content);
thumb.smoothing = true;
thumb.x = -thumb.width * .5;
thumb.y = -thumb.height * .5;
var image:MovieClip = new MovieClip();
image.addChild(thumb);
image.x = 35+ image.width*c;
image.y = 50+ image.height*d;
//imageMC.bigImage = "big.jpg"
//image.addEventListener(MouseEvent.CLICK, onClick);
//image.addEventListener(MouseEvent.ROLL_OUT, onOut);
//image.addEventListener(MouseEvent.ROLL_OVER, onOver);
c++;
if (c<5){
c=0;
d++;}
gallery.addChild(image);
}
addChild(gallery);
}
private function loadImage(url:String, completeFunction:Function)
{
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteSmall);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError, false, 0, true);
loader.load(new URLRequest( url ));
}
private function ioError(event:IOErrorEvent){
trace ("the **** is"+ event);}
public function navig(Event:MouseEvent) {
//var clickedObject:MovieClip = MovieClip(Event.target);
trace (Event.target.text);
var arrayUrl= new Array();
var arrayName= new Array();
var arrayUrlBig= new Array();
var arrayDesc= new Array();
var arrayLnk= new Array();
//loadImage(clickedObject.bigImage, onCompleteBig);
xmlList = xml.work.piece;
//trace (xmlList);
for (i=0; i< xmlList.length(); i++){
if (xmlList[i].attribut == Event.target.text)
a=0;
var url = new String;
url = xmlList[i].url;
//trace (url);
arrayUrl.push(url);
trace (arrayUrl[i]);
arrayName.push(xmlList[i].name);
arrayUrlBig.push(xmlList[i].url_big);
arrayDesc.push(xmlList[i].description);
arrayLnk.push(xmlList[i].link);
loadImage(url, onCompleteSmall);
a++;}
}
Thank you.
FileRefenerce IOError Under SSL
I'm running a image uploader/cropper tool in Flash 8. The back-end script is C#. The app is sitting under SSL. Certain users are getting a IOError when trying to upload their image.
I've seen rumors on other forums that the upload capabilities of Flash 8 don't always work when hosting under https. Is there a work-around? Does anything have an experience with this?
Thanks.
Trapping Ioerror
hey--
I'm trying to load an unknown number of photos as another slideshow as a series of photos (photo1, photo2, etc).
Loading them isn't a problem, but I want to trap the error I get when the first photo isn't found. In IE only (not Firefox) a window pops up with this message:
Quote: Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.
My code:
Code:
// create a loader object and add a listener for first image
var nextTab:Loader = new Loader;
// create event listeners
nextPicture.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
...
function ioErrorHandler(event:IOErrorEvent):void {
currentPhoto=2;
}
This works fine in Firefox, but the stupid box keeps opening in IE. I can press Continue or Dismiss All and life goes on, but I thought the IOErrorEvent would prevent this.
Any ideas?
:grimey
LoadVars External Txt File Wierdness
I've got this on a button in an attempt to update a dynamic text field (scroller) with the HTML formatted content of a text file (using myhtml=) (other stuff here: storyLoad is a variable. storyArray contains the names of the textfiles e.g. text1.txt.)
code:
if (_root.storyLoad<=32) {
_root.storyLoad++;
loadVarsText.load(_root.storyArray[_root.storyLoad]);
loadVarsText.onLoad = function(success) {
if (success) {
//trace("done loading");
scroller.htmlText = "loadVarsText.myhtml";
} else {
//trace("not loaded");
}
I've got the same action (without the incrementation of storyload) on the frame on which this appears.
when the frame loads. it displays the text from the first one in the array. but my button (above) doesn't seem to do anything.!
am I just being stupid here? or should this work?
LoadClip Wierdness With Loc Of Swf And Calling Html
Hi,
I seem to be having some prolems using Movie Clip loaders to load a child movie clip when the calling HTML file and the parent movie clip are not in the same folder. The parent clip loads fine, but will not load any child clips even if I use absolute paths in loadClip.
The loadClip works fine when the HTML and calling parent movie are in the same folder.
I can't seem to find any documentation on this at all. Anyone else having problems?
My temp fix was to do a JS redirect from the original HTML file to the HTML file that is in the same folder with the parent clip. This fixes the problem, but I would really like to be able to not have to resort to JS.
Thanks in advance.
Using MX2004
Problem in both, firefox and IE
Swaitch/case Website Wierdness
Hello, all!
I´m workig on this website and everything is working wonderfully, but I´ve got one problem!
I have a switch/case type website, so when I click home the menuId = 0; and so on. But the problem is that when I enter the site, no matter which button I press, it goes to the next page which is profile, instead of for example gallery. After that I can press abseloutely any button I want and it works!
If someone knows why this only happens the first time when I have just entered the site, or has a way to solve this I would be very grateful!
Fekke
Dynamic Text Field Wierdness
Ok,
First let me start out by saying that I am by no means a master of flash, actionscript or anything in the middle. However I know enough of php and the above listed, macromedia endorsed, junk to think that i could, maybe, possibly, put together an online store.
Well I still think I can, BUT this little problem is really starting to get to me.
For those of you who are interested here is a basic version of where I am now with the whole thing: www.xplusplus.com/chop.fla
(file is 147k) just barely too big to attatch.
It should run correctly when you test it as I have left the paths to the database scripts intact.
Basically this is what I have so far:
Store moves on and off screen
Store Loads Product List/Prices into a Dynamic (HTML) Text Field
Each product is clickable, and when clicked will pull up product information (also in dynamic text fields, though not html).
It's not much but im happy with how its comming.
The problem arrises when I try to move the dynamic html product list off the screen.
I have it setup so that when you click a product, an animation is initiated which (containing the dynamic text field which houses the product list) moves off to the right of the visible screen and fades to alpha 0.
This works fine.
HOWEVER, even though all of the items have VISIBLY moved off the screen, you can still click on some of the text links as though they had only moved HALF off the screen (roughly half is still selectable) and gone to alpha 0.
I found this very odd, and have tried all manner of things to just get around the problem, but nothing seems to work. No matter how far OFF the visible work area I move the end point its still clickable as though it were half off screen and half on screen, though invisible.
Hopefully you guys can help since basically everything in there came out of tutorials from your site (which, i might add I have recommended to absolutely everyone who wants to learn flash).
Email me if you have any suggestions: scott@originalskateboards.com
Thanks!
-Scott-
Also if you are viewing the file, excuse the slop.
Intermittant Wierdness In Kiosk Interface
I made a kiosk for our sports museum. It runs across 2 screens and is fed data from an XML file generated by FileMaker Pro. Everything works perfectly on my Mac. Problem is that although it works fine on the Windows machine that runs it for the kiosk in the museum (standalone .exe file), after a while it starts acting crazy. Not sure if this only happens after the computer goes to sleep and the screensaver comes on or if it happens sooner than that. I haven't been able to spend enough time with it to know for sure. I just can't figure out how it can act so strangely. One of the things it does is that it will suddenly scroll to the bottom of a window that holds all the names and won't let you scroll back up. Other times it gets the names and links screwed up. I've tested this like crazy and can't get the same results on my computer. It's running on a brand new Dell that's well equipped to handle such a file (or at least we thought). Here is a link to a web version so you can see how it works:
Sports Museum Kiosk (click on Print, then scroll to the B's to see some names that scroll)
Just remember that this stretches across 1600 pixels wide over 2 large monitors, so it looks a lot better in the kiosk. :-)
Is there a good way to narrow down what is causing this behavior?
I've included the code for one of the alphabet letters. The first line was a failed attempt to prevent the scrolling from occurring by clearing the interval as soon as it got to that frame, because as soon as you moved to the B's, for example, it would scroll to the bottom without even hitting the scroll down arrow.
Attach Code
clearInterval(scroll_interval);
slot1_name = "";
slot2_name = "";
slot3_name = "";
slot4_name = "";
slot5_name = "";
slot6_name = "";
slot7_name = "";
sliderKnob._x = 8; ///////////
A_Array = new Array();
images = new Array();
PersonName = new Array();
PersonBio = new Array();
movies = new Array();
audio = new Array();
ProgName = new Array();
ProgPhoto = new Array();
ProgDesc = new Array();
NewsRole = new Array();
NewsRag = new Array();
NewsDates = new Array();
counter = 0;
link = counter;
letter = "B"; ///////////////////
slider.gotoAndStop(2); ////////////////
sports_xml = new XML();
sports_xml.ignoreWhite = true;
sports_xml.onLoad = function(sucess) {
if (sucess) {
//trace("loaded");
processXML(sports_xml);
}
};
sports_xml.load('xml/media.xml');
function processXML(xmlDoc_xml) {
//trace("length = " + xmlDoc_xml.firstChild.childNodes[4].childNodes.length);
for (var n = 0; n<xmlDoc_xml.firstChild.childNodes[4].childNodes.length; n++) {
//Get radio people only
if ((xmlDoc_xml.firstChild.childNodes[4].childNodes[n].childNodes[12].firstChild.firstChild) eq "Y") {
if ((xmlDoc_xml.firstChild.childNodes[4].childNodes[n].childNodes[2].firstChild.firstChild) eq letter) {
PersonBio.push(xmlDoc_xml.firstChild.childNodes[4].childNodes[n].childNodes[5].firstChild.firstChild);
if (PersonBio[n] eq null) { PersonBio[n] = ""; }
// trace("PersonBio = " + PersonBio[n]);
FirstName = xmlDoc_xml.firstChild.childNodes[4].childNodes[n].childNodes[3].firstChild.firstChild;
// trace("FirstName = " + FirstName);
LastName = xmlDoc_xml.firstChild.childNodes[4].childNodes[n].childNodes[4].firstChild.firstChild;
// trace("LastName = " + LastName);
A_Array.push(LastName + ", " + FirstName);
// trace("Last name, First name = " + A_Array[n]);
NumNames = A_Array.length;
PersonName.push(FirstName + " " + LastName);
// trace("PersonName = " + PersonName[n]);
images.push(xmlDoc_xml.firstChild.childNodes[4].childNodes[n].childNodes[6].firstChild.firstChild);
// trace("image = " + images[n]);
if ((xmlDoc_xml.firstChild.childNodes[4].childNodes[n].childNodes[13].firstChild.firstChild eq "Y") && (xmlDoc_xml.firstChild.childNodes[4].childNodes[n].childNodes[14].firstChild.firstChild ne "Y")) {
NewsRole.push("Writer");
} else if ((xmlDoc_xml.firstChild.childNodes[4].childNodes[n].childNodes[14].firstChild.firstChild eq "Y") && (xmlDoc_xml.firstChild.childNodes[4].childNodes[n].childNodes[13].firstChild.firstChild ne "Y")) {
NewsRole.push("Photographer");
} else {
NewsRole.push("Writer/Photographer");
}
NewsRag.push(xmlDoc_xml.firstChild.childNodes[4].childNodes[n].childNodes[15].firstChild.firstChild);
NewsDates.push(xmlDoc_xml.firstChild.childNodes[4].childNodes[n].childNodes[16].firstChild.firstChild);
} //end if sequence
} //end radio people only
} // end for loop
slot1_name = A_Array[counter];
slot2_name = A_Array[counter+1];
slot3_name = A_Array[counter+2];
slot4_name = A_Array[counter+3];
slot5_name = A_Array[counter+4];
slot6_name = A_Array[counter+5];
slot7_name = A_Array[counter+6];
if (slot1_name==undefined) {
slot1_name = "";
}if (slot2_name==undefined) {
slot2_name = "";
}if (slot3_name==undefined) {
slot3_name = "";
}if (slot4_name==undefined) {
slot4_name = "";
}if (slot5_name==undefined) {
slot5_name = "";
}if (slot6_name==undefined) {
slot6_name = "";
}if (slot7_name==undefined) {
slot7_name = "";
}
currentNum1 = slot1_name;
currentNum2 = slot2_name;
currentNum3 = slot3_name;
currentNum4 = slot4_name;
currentNum5 = slot5_name;
currentNum6 = slot6_name;
currentNum7 = slot7_name;
if (slot1_name eq A_Array[0]) { navUp._visible = false; } else { navUp._visible = true; }
if (slot7_name eq "") { navDown._visible = false; } else { navDown._visible = true; }
}
stop();
Any Ideas? Event Based Pr. Wierdness
http://www.nebulouscore.com/examples...on_class2b.swf
I am working on some event based stuffed which is kinda new to me so maybe someone knows why the bug in this thing happens. The fla is there to if you want to see the code.
When you click the pointer springs to the mc you clicked and calls the next function for all the mc's between the two you click... giving it a sort of traveling effect. BUT it has a tendency to almost randomly highlight an mc as though one of the events got lost on the heap.
That text at the bottom is a sema4 I put in to keep track of the queued tweens and it always returns to 0.
If nothing else, the fit-to-n thing I have going on with the Build_mc_Collection() might be worth borrowing.
Anyway.. I hope you guys might have a clue why this wierdness happens.
Switch/case Website Wierdness
Hello, all!
Im workig on this website and everything is working wonderfully, but Ive got one problem!
I have a switch/case type website, so when I click home the menuId = 0; and so on. But the problem is that when I enter the site, no matter which button I press, it goes to the next page which is profile, instead of for example gallery. After that I can press abseloutely any button I want and it works!
If someone knows why this only happens the first time when I have just entered the site, or has a way to solve this I would be very grateful!
Fekke
Uploading Issues.. IOERROR.
hello.. i have this problem in uploading.. It may sound very easy to you or stupid you may say but i'd rather be stupid than not asking help and learning from it.
im creating flash that uploads picture in webserver(im using php and xampp). I put the php file in the htdocs together with the swf file.. i use FileReference class of flash and testing it localhost but im getting IOERROR. what could be the problem? i can post my code here if necessary.. Thank for the urgent reply.
php code:
<?php
move_uploaded_file($_FILES['Filedata']['tmp_name'], "./files/".$_FILES['Filedata']['name']);
?>
IoError #2032 Solely From IE
Hi,
I'm currently working on some web interface for a client.
It is working just fine with Firefox3 or into the flash IDE, but I get an error when launched in IE.
The error comes from making a php request to a distant server, wich should return me an XML file.
I can call that same request directly on my browser and I get a result wich seems ok (no parse error).
But when lanched in IE, the SWF catch an IOErrorEvent:
[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Erreur de flux. URL: "******"]
Within the function catching this event, I can see that bytesLoaded and bytesTotal from my URLLoader instance are set to 0, and that data is undefined.
It doesn't seems to be trying to download.
I don't think it is a security error, cause no securityEvent are launched, cause it is working with Firefox, and simply cause ther should be no restriction to a request I can make from the browser.
As for the HTTPStatut, I get a 200, wich is ok (I checked the doc).
So, I'm realy lost...
I can see no logic to this Error.
An IOError launched solely from the SWF under IE, while it doesn't event load it, and while when I try the request directly from the browser I get no mistake...
I'm stuck until I'm done with this bug.
So if anybody has any idea, please share.
Try / Catch IOError Event
I know "why" I'm getting the error, but I'm trying to make a try/catch statement that will allow the client to fix the error. The try/catch isn't catching.
ActionScript Code:
try
{
try
{
myLoader.load ( myRequest );
}
catch (error:IOError)
{
trace ("IOError");
browseForMissingGraphic ();
}
catch (error:Error)
{
trace ("Error");
browseForMissingGraphic ();
}
catch (error:IOErrorEvent)
{
trace ("IOErrorEvent");
browseForMissingGraphic ();
}
catch (error:*)
{
trace ("*");
browseForMissingGraphic ();
}
catch (error:URIError)
{
trace ("URIError");
browseForMissingGraphic ();
}
}
catch (error:IOErrorEvent)
{
trace ("IOErrorEvent2");
browseForMissingGraphic ();
}
Here is the error:
Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
As you can see in my code, I'm trying the IOErrorEvent, and a slew of other ones too. It's just not catching.
Any suggestions?
UrlLoader: IOError For Correct Url
Hello.
I am using URLLoader to load data from external domain(with open crossdomain.xml). I am using it's REST api. All is going fine if there is no server error in response. But if there is server error - i just receive :
Error #2032: Stream Error. URL:
I don't need this. I want to parse error response(it is in xml). Anybody know why this can happen?
Thanks.Aleksey
Unhandled IOerror Event
Trying to load an image:
ActionScript Code:
//load image
var loader:Loader = new Loader();
loader.addEventListener(IOErrorEvent.IO_ERROR, function(evt:IOErrorEvent):void { trace(evt) } );
loader.addEventListener(Event.COMPLETE, imageLoaded);
try {
:mad:
var r:URLRequest = new URLRequest(dataClass.getGeneralConfigXML().imagePath + faqData.image);
loader.load(r);
} catch(error:IOErrorEvent) {
trace("IOErrorEvent catch: " + error);
} catch(error:TypeError) {
trace("TypeError catch: " + error);
} catch(error:Error) {
trace("Error catch: " + error);
} finally {
trace("Finally!");
}
getting this error message:
Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
WTF??? THIS IS MAKING ME CRAZY!
IoError #2032 Solely From IE
Hi,
I'm currently working on some web interface for a client.
It is working just fine with Firefox3 or into the flash IDE, but I get an error when launched in IE.
The error comes from making a php request to a distant server, wich should return me an XML file.
I can call that same request directly on my browser and I get a result wich seems ok (no parse error).
But when lanched in IE, the SWF catch an IOErrorEvent:
[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Erreur de flux. URL: "******"]
Within the function catching this event, I can see that bytesLoaded and bytesTotal from my URLLoader instance are set to 0, and that data is undefined.
It doesn't seems to be trying to download.
I don't think it is a security error, cause no securityEvent are launched, cause it is working with Firefox, and simply cause ther should be no restriction to a request I can make from the browser.
As for the HTTPStatut, I get a 200, wich is ok (I checked the doc).
So, I'm realy lost...
I can see no logic to this Error.
An IOError launched solely from the SWF under IE, while it doesn't event load it, and while when I try the request directly from the browser I get no mistake...
I'm stuck until I'm done with this bug.
So if anybody has any idea, please share.
SWFLoader - IoError: File Name?
If you call SWFLoader.load() and the source file couldn't be found, it generates an ioError event. But if you try to check
SWFLoader(event.target).source it either is a broken image object or just null. - The source file name has disapearred. That seems pretty ridiculous, not to mention that whether it returns Null or Broken Image for the source seems to be completely random.
So how do you determine at runtime what file couldn't be found - just a process of elimination searching for every single file you were trying to load?
IOErrorEvent(event).text merely returns "Error #2036".
IOError Handling - Not Working
Hello all,
I'm building an image viewer widget for an introductory flash assignment that loads images from an external folder by clicking a 'next' button and using an increment (i++) to change the image. The idea is that it can be easily customised by anyone by simply placing images in the folder and naming their images correctly. Obviously there is no (simple) way to know how many images have been placed in the folder, so what I am wanting to do is use an error handler to catch the load Error that will occur when the last image is reached and instead load a default image or loop back to the beginning.
The error handler code I've been using is simply not working, ive been googling for 3 days trying to find different examples and nothings working for me. Heres the basis of the code I've been using:
note: holder_mc is a blank movieclip used to position the image. Also the code is placed on the timeline, not externally.
Code:
var myURL:URLRequest;
var imgLoader:Loader = new Loader();
holder_mc.addChild(imgLoader);
imgLoader.addEventListener(IOErrorEvent.IO_ERROR, catchIOError);
function catchIOError(error_Event:IOErrorEvent):void
{
trace("This is actually working");
}
myURL = new URLRequest("missingImage.jpg");
imgLoader.load(myURL);
Any help or suggestions would be greatly appreciated!!!!
thanks,
Pat
FileReferenceList Upload IOError On Mac
We have a filereference upload set up and working uploading to a PHP script
on an apache server.
It's a multiple upload script with FileReferenceList and a PHP script that
moves the files and inserts to database.
The file upload works well using Win XP (IE, Firefox, Opera).
On the Mac (safari, Firefox), we get IOErrors, the files won't upload. There
is no authentication necessary, nor are there any restrictions for filenames
etc. as the documentation suggests. We're not starting sessions, as we got
errors that way, too. We tried on several machines all with latest flash
player installed, it works on the PC, doesn't on the mac.
We tried on two different servers, I even removed all PHP code from the
upload script just to make sure it's not a server-side problem, so obviously
there is something awkward happening on the Mac.
Any suggestions?
Thanks,
Bernd
|