Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
Bianca FlashChick #1
Need help loading jpg's
Hi all
I'm having problems preloading jpg's and displaying them
Here is what I want to do
Preload jpg's from a dir
this.pathToPics = "fotos/"
this.pArray = ["image0.jpg", "image1.jpg", "image2.jpg", "image3.jpg",
"image4.jpg", "image5.jpg", "image6.jpg", "image7.jpg"]
this.pIndex = 0
loadMovie(this.pathToPics+this.pArray[0], _root.photo)
Set the change photo function
MovieClip.prototype.changePhoto = function(d)
this.pIndex = (this.pIndex+d)%this.pArray.length
if (this.pIndex<0)
this.pIndex += this.pArray.length
this.onEnterFrame = this.photo._alpha = 100
this.loadPhoto()
}
MovieClip.prototype.loadPhoto = function()
var p = _root.photo
p._alpha = 0
p.loadMovie(this.pathToPics+this.pArray[this.pIndex])
}
Put them in a MC on the exact middle of the stage:
var intStageWidth = 760
var intStageHeight = 420
this._x = (intStageWidth-this._width)/2
this._y = (intStageHeight-this._height)/2
MC must be invisible at first
this._visible = false
Then show first jpg - With a command on a keyframe
this.onEnterFrame = function()
this.changePhoto(1)
this._visible = tru
Then make it invisible on a next keyframe
this.onEnterFrame = function()
this._visible = fals
Load the second photo on a next keyframe
this.onEnterFrame = function()
this.changePhoto(1)
this._visible = tru
and so on..
I have problems putting this together and the photo's aren't preloading
You can find an example [L=here]http://www.styledesign.nl/cyberimage/[/L] of
what it should look lik
(in this fla there are only 4 jpg's not loaded dynamically
Here is the file I'm still working on:
The fla is [L=here]http://www.styledesign.nl/cyberimage/introfoto.fla[/L
And here is the actual file, wich won't work :
[L=link]http://www.styledesign.nl/cyberimage/intro.html[/L
Is there someone who could assist me
Please help ...I'm really stuck!!
Thank you so much in advanc
Bianc
Bianca FlashChick Guest
-
some JPG's won't be placed
Hi, I'm using indesign to place (CRTL D) JPG images and suddenly I can't place certain JPG's which appear to be exactly as the others which I can... -
Need help loading and positioning jpg's.
Hi all I'm having problems preloading jpg's and displaying them Here is what I want to do Preload jpg's from a dir this.pathToPics =... -
Need help loading and positioning jpg's
Hi all I'm having problems preloading jpg's and displaying them Here is what I want to do Preload jpg's from a dir this.pathToPics =... -
OK, Here we go again saving jpg's
"Being a hacker has many drawbacks... " Yeah, dude, like having no one with any sense of intelligence, who PAID honest, hard earned dollars (took... -
My jpg's stink
OK, I admit to being a hacker in the old sense of the word. (Untrained, unmethodical, clueless in general). But how come my files that look pretty...



Reply With Quote

