We help IT Professionals succeed at work.

flash 5 loadmovie problem w/jpg

earthman100
earthman100 asked
on
529 Views
Last Modified: 2012-08-13
this should be really simple, but it evades my comprehension...

2 files, exactly the same dimensions, same directory
....one jpg in a swf, the other just a jpg (the same jpg)

this works

_root.holderOne.loadMovie("./image001.swf");

image shows up fine

this, however...

_root.holderOne.loadMovie("./image001.jpg");

does not work, the image doesn't show...
i have my suspicions that it is in fact loading and maybe i can't see it??

im stumped

cheers
Comment
Watch Question

Commented:
Try using "image001.jpg" without the "./"

So....

_root.holderOne.loadMovie("image001.jpg");

I'm not sure what ./ does so I'm pretty sure that should fix your problem.
Let me know how you go.

Cheers

-OBCT

Author

Commented:
the ./ tells flash to use the same directory as the main swf is in (the one calling the jpg with loadmovie)
tried that, makes no difference....


cheers

Commented:
a few things to try...

loadMovie("image001.jpg", "_root.holderOne");

_root.holderOne.loadMovie("image001.jpeg");

_root.holderOne.loadMovie("image001.JPG");

Sometimes the extension can be slightly different to what you may think. To be 100% sure, type in the URL or file path and attempt to load the image.

Cheers

-OBCT
Top Expert 2009

Commented:
Hey, that's odd, cause
_root.holderOne.loadMovie("./image001.jpg"); works fine here.

there's nothing wrong with the code, I'd suggest you check the naming conventions of the jpeg, have you named it properly, and check case ie. upper vs lowercase.

blu.
ps. did you create the jpeg by exporting image from flash or from othe rthing?

Commented:
earthman100 & blue,

I'm not sure if I've done something wrong on my computer but when I'm using Flash MX 2004, several times I have had code work perfectly in one of my files however the exact same code may not work in another file.
I've also heard other reports of this happening so if you're using Flash MX 2004, it could be some sort of bug. Depending on how much content you have in the fla, would it be an option to test some of the code in another or new file?

This is really weird!  :s

Cheers

-OBCT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
>geeze i feel old..:)

lol!
Top Expert 2009

Commented:
i'm working in MX and i save as flash 5 and export it for 5 and it loads the jpeg?

Commented:
MovieClip.loadMovie()
Availability
Flash Player 5.

^ From the help menu.
It's probably not the problem but I'm interested to know which version earthman100......?

Commented:
>>MovieClip.loadMovie()<<

exactly..
not load jpg..
loadmovie:)

Z

Commented:
MovieClip.loadMovie()
Availability
Flash Player 5.

Usage
my_mc.loadMovie("url" [,variables])

Parameters
url The absolute or relative URL of the SWF file or JPEG file to be loaded.
------------------------------------------------------------^

Sorry Zeffer, no disrespect intended :)

Commented:
I can see you're not convinced..review of MX features from Webmonkey..
>>Flash 5 could load text and XML files directly to a SWF file, which was pretty cool. So why not images and sounds too? In Flash MX, the new loadMovie() function can also load JPEG files at run time via a URL. <<

Z

Commented:
Sometimes a client may request an online catalog or similar project, where arbitrary images may need to be displayed in the >>Macromedia Flash file in response to user choices. This can be done using the Macromedia Flash MX authoring tool's loadMovie action. The Macromedia Flash Player 6 is required to view content that uses this method.

Earlier versions of Macromedia Flash can not use loadMovie to load an external JPG. The Macromedia Flash Player has traditionally been optimized for small file size, fast startup, and easy portability and prior to Macromedia Flash Player 6 did not include import filters for a range of file formats like the authoring environment does. Macromedia Flash MX improves the abilities of the Macromedia Flash Player 6 to include linking to external JPG and MP3 files and video playback.<<

http://www.macromedia.com/support/flash/ts/documents/runtime_import.htm

Z

Top Expert 2009

Commented:
i agree that it can be done, and that the problem is with either his/her pathing and/or naming.
blu
Top Expert 2009

Commented:
the plot thickens, back to the original problem, could simply load the jpg into flash and export as swf.

Commented:
>>the plot thickens, back to the original problem, could simply load the jpg into flash and export as swf.<<

yes..said that above

Z

Commented:
well not the plot thickens part:)

Z
Top Expert 2009

Commented:
I'm female, have to repeat things ... part of nagging :-)

but my point is ... its not a problem, until i get hold of flash 5 and try wangle something.

Commented:
blue-genie
read that page I posted ..

http://www.macromedia.com/support/flash/ts/documents/runtime_import.htm


>>Summary
Macromedia Flash Player 6 is the most efficient solution for linking to external JPG files at runtime. The Macromedia Flash 5 Player cannot insert arbitrary file types such as JPGs, though it can dynamically link to external SWF files which contain imported JPG images<<

It's late here..I have to go to bed..and when you do..sweet dreams:)

Kind Regards
Zeffer





Commented:
My sincerest appologies Zeffer.
Your only right because your old! :p jks
I must admit, you've done well to spot this one out! You two blue! :)

Author

Commented:
i have been loading them in swf, i guess i will continue with that route
thx all!

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.