The value of the newMC variable will be the newly created clip, so you can use that value to adjust the properties of that clip

I hope this info helps

Willy

Graduate

Posts: 199

3+ Months Ago

Yes that was a nice response, i'm looking forward to tackling it when i get home from work.

I tried methods similar to what you said, but mostly guessing at the syntax.

needless to say i'm going to smuggle the actionscript bible home from work today, I'm sure you'll be hearing much more from me before i get this project done.

WILLY

lostinbeta

Guru

Posts: 1402

Loc: Philadelphia, PA

3+ Months Ago

If you are looking for any AS books, even though I have never read any, I can recommend Actionscript Definitive Guide by Colin Moock (preferably the MX version because it is newer, I hear he is working on an MX2004 version as well). I hear it is pretty much a must have for anyone planning on getting into Actionscript (heard from everyone I know who has it and uses Actionscript). I would buy it if I wasn't so poor at the moment

So yeah, I haven't heard much about AS Bible, so let me know how it is after you read it, i'm always interested in hearing what AS books are good.

I hope things work out for you

Willy

Graduate

Posts: 199

3+ Months Ago

Woooow flash is the most frustrating app i've ever tried to use.

I'm having a great deal of difficulty getting newer versions of my .fla to execute (meaning when either "test movie" or "publish preview" or save and upload to server I dont always see my current updates)

I was wondering what method is common practice for dealing with a.scripts?

-------

A second reoccurring problem i have is really having difficulty seeing where the bounds of my swf file are, as i re-run my script the location of it seems almost random.

again, the pannels show up, but do not contain anything I think its the loadMovie method... when i do picHolder.loadmovie it works =(

WILLY

lostinbeta

Guru

Posts: 1402

Loc: Philadelphia, PA

3+ Months Ago

Are you testing this locally or on your server?

Since you are using a full URL, Flash may not be able to load the image from a server that is not the same as the server the file you are testing is on. This is seen as a security risk.

Chances are, if the image isn't loading that either the addressing is wrong to the image, or the image is not a non-progressive .jpg image. These are the only images Flash can dynamically load in.

Willy

Graduate

Posts: 199

3+ Months Ago

Can i Get a definition of non - progressive jpg?

after i do my for loop on the dynamic array, if i just do picHolder.loadMovie(url) it displays correctly ....

thx

WIlly

i really think it is the this["pic"+i]. method ....

i did an output test by doing this["pic"+i]._width and got a null

lostinbeta

Guru

Posts: 1402

Loc: Philadelphia, PA

3+ Months Ago

Non-Progressive:

Have you ever been to a webpage and you see image that load from top to bottom progressively and not all at once? This is a format called "proressive jpg", where the browser reads the information of the image and displays it as it loads instead of waiting for it to fully load before it is displayed. However, since this is a browser interpreted action, Flash does not support dynamically loading these images in, so in order to load an image into Flash you will need to save it as a "Non-Progressive jpg". This is typically an option in the "Save As..." feature of a graphics program when JPG is chosen as the file format.

The dot syntax that started with Flash 5 means you don't need to suffer through setProperty and all that jazz. And as for how I wrote the duplicateMovieClip code, that is a secondary method, both methods will work, but I prefer the above method because it is more clear to me.

Keep in mind that picHolder must be the instance name of a clip already existant on the stage (which i'm pretty sure you already know and have done).

If you don't know what is up, then in the above for loop add this code

trace() is a feature of flash for sort of run-time debugging, you can use it to output the value of something and check if it exists of not. In this case, if newMC returns null then for some reason your clip is not getting duplicated, and the problem is then with your duplicateMovieClip() code (which I see no coding problem, so it must be a problem with the clip you are duplicating). If your clips are getting duplicated, the location/instance name of your clip will be returned (ex: _level0.pic1, _level0.pic2, _level0.pic3), if this does happen then there is something wrong with another aspect of your code, most likely the loadMovie(), but again, I see nothing wrong with that, so it might be the image you are loading in.

Willy

Graduate

Posts: 199

3+ Months Ago

My problem with the resizing was actually that the guts of my picHolder object was a different size than the outside ... weird and a pain in the butt, but i got it.

thx

lostinbeta

Guru

Posts: 1402

Loc: Philadelphia, PA

3+ Months Ago

Something to keep in mind when using loadMovie() to a clip is that...

1) The object you load in replaces the content of the clip you load it to.

2) The object you load in inherits the properties of the clip you load it to.

3) Even though it inherits those properties, things such as _alpha, _width, _height, etc reset to default when the clip is loaded to it, so you may have to re-adjust that as needed after the clip has been loaded in.