Problems Loading external Jpgs into Flash

  • beedge
  • Born
  • Born
  • beedge
  • Posts: 4

Post 3+ Months Ago

Hi,

Ive just completed a site for a music venue.
I put in a very simple Flash movie that reads a file and then loads the jpgs specified in the file.

It works just fine in IE but not in netscape or firefox

Are there any issues with these browsers that Im not aware of when It comes to loading jpgs?


The site is http://thehighstool.ie for anyone who can take a look.

Thanks in advance


Beedge
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • beedge
  • Born
  • Born
  • beedge
  • Posts: 4

Post 3+ Months Ago

hmmm.... no takers?

maybe I should be more specific.....

I set up a test page to show what I mean


http://thehighstool.ie/test.htm

action script for frame 1:

Code: [ Select ]
var heading ="";
loadVariablesNum("flash/Heading.txt", 0);
  1. var heading ="";
  2. loadVariablesNum("flash/Heading.txt", 0);


frame 3:

Code: [ Select ]
if(heading!=""){
    gotoAndStop(4);
}else{
    gotoAndPlay(2);
}
  1. if(heading!=""){
  2.     gotoAndStop(4);
  3. }else{
  4.     gotoAndPlay(2);
  5. }


frame 4:

Code: [ Select ]
head = "http://thehighstool.ie/flash/"+heading;

dateHolder.loadMovie(head);
stop();
  1. head = "http://thehighstool.ie/flash/"+heading;
  2. dateHolder.loadMovie(head);
  3. stop();



dateHolder is the instance name of an empty movie clip on the main timeline.

There is also a text box that outputs the variable "head".

IE loads everything fine but netscape and firefox don't load the jpg...

the fact that you can see the variable "head" means that it is reading the .txt file no problems....



Is there anything I should know about loading jpgs into non IE browsers?

Any help would be GREATLY appreciated.. Ive asked around in other forums but have got no feedback.... I cant believe that Im the only one who's had this happen! :(

Thanks Again

Beedge

PS I should add that the file Heading.txt just contains one line:

heading=dec.jpg &
  • SharkShark
  • Guru
  • Guru
  • User avatar
  • Posts: 1013
  • Loc: Living In Today

Post 3+ Months Ago

hmmmm....this is interesting. Correct me if i am wrong please, but you have a flash movei, that reads from a .txt document? and inside this .txt document is the link to the image?

I am not very good at actionscript at all, but perhaps you could explain your scripting to me. Is all of the code in frame 4 necessary to loading the .txt? It seems like you already told it to load in frame one.

All I can tell you is double check your code, and possible insert the image into the movie beforehand rather than load it in. I often have issue with scripting when I use the nonIE browsers. It seems it requires the scripts to be precise before they can work with them. Where IE doesn't really care. So my suggestion at thei point is there is something wrong in your actionscript.

Sorry I couldn't be more help.
  • beedge
  • Born
  • Born
  • beedge
  • Posts: 4

Post 3+ Months Ago

SharkShark wrote:
hmmmm....this is interesting. Correct me if i am wrong please, but you have a flash movei, that reads from a .txt document? and inside this .txt document is the link to the image?

I am not very good at actionscript at all, but perhaps you could explain your scripting to me. Is all of the code in frame 4 necessary to loading the .txt? It seems like you already told it to load in frame one.

All I can tell you is double check your code, and possible insert the image into the movie beforehand rather than load it in. I often have issue with scripting when I use the nonIE browsers. It seems it requires the scripts to be precise before they can work with them. Where IE doesn't really care. So my suggestion at thei point is there is something wrong in your actionscript.

Sorry I couldn't be more help.


Im pretty sure the script is ok...

frame 1 loads the text file with the variable "heading" (in this case its dec.jpg)

frame 4 adds the url of the actual file dec.jpg


all the pictures needed to load into the movie will come from this url. All the .txt specifies is which jpg to use. This is a simplified version of the app I am trying to get fixed. In the main app I will be able to specify what pictures to load by changing the txt file without changing the .swf because its meant to be an app showing upcoming events for a music venue so it will constantly need to be updated. the only way I can think of for this to work is to load the txt file which specifies which pictures to load
  • roarmeow
  • Professor
  • Professor
  • User avatar
  • Posts: 861
  • Loc: BKNY

Post 3+ Months Ago

wish i could test this out, but my computer's fried right now...

first thing I would do is make sure that the .jpg is the right color format and everything...

i would also experiment with putting dec.jpg in quotes...

another question, though... where, on the site, is the piece that's not loading right? I use FF and it all seems to look fine to me.

Peace,
puck
  • beedge
  • Born
  • Born
  • beedge
  • Posts: 4

Post 3+ Months Ago

Ok I finally figured it out....

When flash read from the txt file it was reading a space before the jpeg name:

so it was trying to load

Drive:/directory/flash/ pic.jpg

it turns out IE could handle the extra space in the file name but other browsers could not



Beedge
  • SharkShark
  • Guru
  • Guru
  • User avatar
  • Posts: 1013
  • Loc: Living In Today

Post 3+ Months Ago

Glad you figured it out! And thanks for posting your fix so we could all learn! Good luck with the rest of your site :D

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 15 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.