Groups | Blog | Home
all groups > flash actionscript > april 2004 >

flash actionscript : Loading JPGs



Dinghus
4/29/2004 9:42:39 PM
I want to dynamically load JPGs and display them. I've tried loadMovie but
that doesn't seem to work or else I'm doing something wrong. Been looking for
an example but can't find one that does this for some reason. I would think
one of these picture viewer programs would include how to dynamically load.

So somebody help me out here pretty please.
Dinghus
4/29/2004 10:49:08 PM
Currently I have created an empty movie clip and made it a symbol in the
library, and then dragged it onto the stage and gave it an instance name of
myClip

I made AS for onLoad for myClip that goes to a function loadPic()

so then I have :

function loadPic() {
myClip.loadMovie("http://www.mysite.com/images/pic1.jpg");
}

If I put a trace inside loadPic I see the trace so I know I'm getting inside
the function. For some reason the loadMovie isn't working. I found 1 tutorial
on this and that is exactly how it was done.

I also imported the jpg directly into the library and that worked.

Scratching my head.
N Rohler
4/29/2004 10:50:24 PM
Do you have progressive jpegs? These won't work.

Also, I just recently realized that according to MM help, loadMovie is now
used as follows:
Old way:
my_mc.loadMovie("someswforjpeg.swf", "method");
New way:
loadMovie("someswforjpeg.swf", [b]my_mc[/b]);

I hadn't realized this. It seems as though the old way works when testing the
movie in Flash, but doesn't work in the browser.
Dinghus
4/29/2004 10:57:37 PM
Dinghus
4/30/2004 12:02:52 AM
That seems to have done the trick tho. I opened it in Photoshop and then saved
it for the web and it now loads just fine.

Now I need ice for my head where I've been banging it on the monitor all day.
Laiverd.COM
4/30/2004 12:21:59 AM
What have you done sofar? Did you check the manual on the appropriate JPG
format?

John

--
----------------------------------------------------------------------------
-----------
RESOURCES
http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
----------------------------------------------------------------------------
-----------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------

Laiverd.COM
4/30/2004 12:52:17 AM
pic1.jpg is a non-progressive jpg file?

John

--
----------------------------------------------------------------------------
-----------
RESOURCES
http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
----------------------------------------------------------------------------
-----------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------

Laiverd.COM
4/30/2004 1:00:07 AM
Better check and resave then. OLD does not necessarily mean non-progressive.

--
----------------------------------------------------------------------------
-----------
RESOURCES
http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
----------------------------------------------------------------------------
-----------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------

Laiverd.COM
4/30/2004 10:10:15 AM
Always good to check the obvious first and only after that make your life
difficult. ;-)

John

--
----------------------------------------------------------------------------
-----------
RESOURCES
http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
----------------------------------------------------------------------------
-----------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------

AddThis Social Bookmark Button