A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 26

Thread: Load jpg works on mac, not windows

  1. #1
    Senior Member
    Join Date
    Jun 2003
    Location
    La Mirada California
    Posts
    396

    Load jpg works on mac, not windows

    I'm loading a background image that stretches the screen. On mac it loads fine, but on windows for some reason, it doesn't even load, and there's not even an error.

    One of the images loaded is here:
    http://maybach.websitewelcome.com/~c...os/photo_6.jpg

    This is the site: http://maybach.websitewelcome.com/~cgw/newsite/



    Anyone have any idea?

  2. #2
    Senior Member
    Join Date
    Jun 2003
    Location
    La Mirada California
    Posts
    396
    Anyone have any idea? This is frustrating, it doesn't make any sense.

  3. #3
    Junior Member
    Join Date
    May 2007
    Posts
    18
    thats strange, post the script?

  4. #4
    Senior Member
    Join Date
    Jun 2003
    Location
    La Mirada California
    Posts
    396
    Here's the main snippets of the code without posting 5 pages..

    Code:
    //to load I use this:
    	loader = new Loader();
    	loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeListener);
    	loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener);
    	trace("loading...photos/"+incURL);
    	loader.load(new URLRequest("photos/"+incURL));
    
    
    // on complete I do this:
    	if (container.numChildren){
    		container.removeChildAt(0);
    	}
    	var image:Bitmap = Bitmap(e.target.loader.content);
    	image.smoothing = true;
    	container.addChild(loader);
    It shouldn't be this, because I use the same code on this site: http://davidandbrent.com

    would it have anything to do with the browser or javascript?
    Last edited by brentW505; 11-17-2008 at 11:57 PM.

  5. #5
    Junior Member
    Join Date
    May 2007
    Posts
    18
    jesus, i clicked on david and brent and thought it was a marriage site about david marrying brent....

  6. #6
    Junior Member
    Join Date
    May 2007
    Posts
    18
    seems to be working now?

  7. #7
    Senior Member
    Join Date
    Jun 2003
    Location
    La Mirada California
    Posts
    396
    this one works on windows?: http://maybach.websitewelcome.com/~cgw/newsite/

    I still can't get it to work..

  8. #8
    Senior Member
    Join Date
    Jun 2003
    Location
    La Mirada California
    Posts
    396
    Does anyone know? On windows it only works on firefox, not internet explorer..

  9. #9
    Junior Member
    Join Date
    May 2007
    Posts
    18
    very strange, this makes no sense since I though the browser loaded the same player regardless of what browser.

  10. #10
    Senior Member
    Join Date
    Jun 2003
    Location
    La Mirada California
    Posts
    396
    Doesn't look like the swf is even loading on my pc in IE.

    http://maybach.websitewelcome.com/~c...site/index.swf

  11. #11
    Junior Member
    Join Date
    May 2007
    Posts
    18
    gave me an error message
    Code:
    TypeError: Error #1010: A term is undefined and has no properties.
    	at index_fla::about_4/engage()
    	at index_fla::nav_38/pageTweenFinish()
    	at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    	at flash.events::EventDispatcher/dispatchEvent()
    	at fl.transitions::Tween/set time()
    	at fl.transitions::Tween/nextFrame()
    	at fl.transitions::Tween/fl.transitions:Tween::onEnterFrame()

  12. #12
    Senior Member
    Join Date
    Jun 2003
    Location
    La Mirada California
    Posts
    396
    How did you find that error in the browser?

  13. #13
    Senior Member
    Join Date
    Jun 2003
    Location
    La Mirada California
    Posts
    396
    I accidentally moved the directory it was trying to load.. that error shouldn't come up anymore...

    This doesn't make any sense why it doesn't load the background photos on a pc

    at http://maybach.websitewelcome.com/~cgw/newsite/ There should be background photos loading on each page..

  14. #14
    Junior Member
    Join Date
    May 2007
    Posts
    18
    Im not sure what is up.
    I tried 3 different pc's and all three react differently.
    But, if you install flash player10 it runs in windows IE, at least from my tests.

  15. #15
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    I think you need to change this line:
    if (container.numChildren){
    You are treating this like Boolean. You need to add a number:
    if (container.numChildren>0){
    - The right of the People to create Flash movies shall not be infringed. -

  16. #16
    Senior Member
    Join Date
    Jun 2003
    Location
    La Mirada California
    Posts
    396
    Changed it.. but didn't do anything. >.<

  17. #17
    Senior Member
    Join Date
    Jun 2003
    Location
    La Mirada California
    Posts
    396
    Changed it, but it didn't do anything >.<

  18. #18
    Senior Member
    Join Date
    Apr 2003
    Location
    St. Louis
    Posts
    104
    If I run it with a clean cache in IE it hangs when the site preloader is done, then if I refresh everything works fine. Possibly an event not firing in your preloader?

    I'm not sure how your animating your preloader but, if your using a tween object or something local to the function to animate that bar, the function could be deleting your tween object before the complete event get's a chance to fire.
    Ben

  19. #19
    Senior Member
    Join Date
    Jun 2003
    Location
    La Mirada California
    Posts
    396
    I found where the errors occurring, but it doesn't make any sense!

    This is the function it's coming from:

    Code:
    			public function loadImage(url:String){
    			trace('load:'+url);
    				changeStatus(url, 2);
    				var _loader:Loader = new Loader();
    				_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded);
    				_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIO);
    					var req:URLRequest =  new URLRequest(url);
    					_loader.load(req);
    					_loading = true;
    					
    				_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
    				function ioErrorHandler(event:IOErrorEvent):void {
    					  trace("De Error-ioErrorHandler: " + event);
    				}
    				
    			}
    Notice the trace("load...") before anything happens. In the output, the first thing that shows up is:
    De Error-ioErrorHandler: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2036: Load Never Completed. URL: file:///xxxx/photos/bg-44.jpg"]

    It's giving an error before that function's even called... how can that be?? That makes no sense.

  20. #20
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Ok, I had this problem before, too if that is the case what StunnedGrowth observed and if it only happens with IE. IE has problems with cache, and this happens when images are loaded in a row using a for loop for example. If one reloads the movie it will be ok. To overcome this loading has to be done slowly using a Timer for example.
    - The right of the People to create Flash movies shall not be infringed. -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center