I Load A Jpeg Into An Mc, And When I Try To Set Its _width, It Disappears
why does this happen. am i not allowed to set the width of mc's with jpegs in them? i can change the _xscale, but this won't help me because i still need to know the _width of the jpeg to set its size with _xscale.
FlashKit > Flash Help > Flash ActionScript
Posted on: 07-30-2003, 08:37 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Load Jpeg, _width, _x
Can I load four different-sized jpeg's into one movieclip and place the second one's _x where the first one's end. And so on.
As I see it there could be problems with not loading the jpeg in the correct order and so placing them on the wrong _x values.
Am I thinking right here.
Is this however possible to do?
Trouble Getting/using _width/_height Of A Loaded Jpeg
Hi,
I'm having trouble getting the _width & _height of a jpeg loaded using loadMovie.
I'm trying to reposition it (pseudo-registration point) for rotation in a container movie clip.
If I use hard-coded numbers, it works fine. However, if I try to position it based on its _width and _height properties, it's no go... in fact, it doesn't even show up on stage.
Are there problems getting those properties from loadMovie clips?
Trouble Getting/using _width/_height Of A Loaded Jpeg
Hi,
I'm having trouble getting the _width & _height of a jpeg loaded using loadMovie.
I'm trying to reposition it (pseudo-registration point) for rotation in a container movie clip.
If I use hard-coded numbers, it works fine. However, if I try to position it based on its _width and _height properties, it's no go... in fact, it doesn't even show up on stage.
Are there problems getting those properties from loadMovie clips?
_height And _width Values Of Newly Loaded Jpeg's
hello.
Im loading a jpeg into a blank MC, but if I try to determine the _height and _width of that jpeg after (getBytesLoaded() == getBytesTotal() ) value returned for both is 0... except for a couple MC, for which it returns the correct value.
So thinking that there's a small time delay while the flash player determines the size of new data I added a timeout mechanism but most clips still dont return the new _height and _width values even if I set the timeout to more than a sec, which should be enough time.
Can anyone point me in the right direction?
Thanks
Load Movie And Dyno Text Disappears...what The?
Okay.
I finally got this dynamic text box working in a flash document (YAY i also made it scroll *happy*) but when i load this swf into another movie the text doesnt appear...Help would be much appreciated. It will probably be loaded onto: beanie-dude.50webs.com
cheers
Load Movie And Dynamic Text Disappears...what The?
i dont understand. I have a swf which the dynamic text works perfect on. I use the loadMovie and load in the swf with the text, and the text doesnt appear. Can anyone help. beanie dude
goto the link to see the thingo..press enter and goto characters...
(please ignore the silly voice and my noobiness at flash)
Load Jpeg
I am a little confused on how exactly to use the new flash mx feature-load Jpeg.(ie:containers)
any advice,input,or good tutorials?
Load Jpeg
hi
I just got MX and have no problem calling an external jpeg from a fram action into a layer.
But I'm haveing real trouble loding it into an empty movie clip?
Any help would be fantastic
mbt
Load Jpeg From Url
i am new to flash. i am using flash mx 2004 mac. i need a really easy and simple way to pass along the URL of an jpeg to a flash movie dyanmically using a PARAM=. the goal is to be able to tell the flash movie where the image is from a php script. i know how to embed the flash movie in the php file and how to use php to set the PARAM, but inside flash mx i have no idea how to create a blank image and assign it a param. help!
peter
Jpeg Load
this should be easy but i cant get it to work
i have a scroll pane with my thumbnail buttons inside
which are there to load the main images
the script i'm using is
th1.onPress = function () {
_root.createEmptyMovieClip("container", 1);
loadMovie("Bunbeg.swf", "container");
container._x = 150 ;
container._y = 20 ;
}
where th1 is the instance name of the first thumbnail button
what ami i doing wrong?
thanks for any help!
Hi All Load Jpeg Q ?
i have set mc on my stage to which i woiuld like load a jpeg, the jpeg raw could be any size but when it gets loaded i need it to fit into the mc i have on stage ?? any ideas, many thx in advance
Dynamic Jpeg Load
Hello,
I have an image viewer that I got working pretty good, but for the lowband users, I'd like them to have a preloader for each image. No matter what I do in the MC, I can't get the loader to identify the specific image(s). It keeps preloading the MC only. I have
"mypic = 1"
as an initial variable, then eventually a
loadMovie(url,"+mypic+".jpg "MC")
where my images are image1.jpg, image2.jpg, etc. How do I tell the preloader to .getbytes for the images only? I've even tried targeting "+mypic+", but I get a syntax error. Just a little help please. I keep reading that Flash MX is still buggy in this area. Has anyone got it to work as advertized? Any advise would ease my head, thanks.
Load Centered Jpeg
hi everyone!!
i'm trying to rebuild a flash site that contains a lot of jpeg images, because it's to big to load my movie (some movie are more than 1meg)
i'm doing a lot of search and i found that we can load jpeg as the same way we do for load movie....but my problem is that the jpeg load but not centered.
i found this code on this forum to centered:
// recipient = an empty movieclip
// loading mc in a recipient
// center_x and y ... is center coord where you want your mc to be centered
center_x = 275
center_y = 200
recipient._alpha = 0
loadMovie("img.jpg",recipient)
interval = setInterval(check_loaded,100,recipient)
function check_loaded(mc_){
if (mc_._width>0){
clearInterval(interval)
center_movie(mc_)
}
}
function center_movie(loaded_mc){
loaded_mc._x = center_x-loaded_mc._width/2
loaded_mc._y = center_y-loaded_mc._height/2
recipient._alpha = 100
}
i think that could help me but i dont understand the code (i'm new in flash)
i dont know where to put this code.....
if someone could help me.....
thanks!
Load JPEG Problem
Hello,
I'm trying to load a jpeg into a MC. It doesn't load in the MC, but opens up my browser and loads in there. I'm sure it's something simple I'm not doing.
This is the code
:
tshirt.onRelease = function(){
loadMovieNum("images/tshirt_red.jpg","shirt");
}
tshirt is my button, and shirt is my target MC of course.
Jpeg Load Query
hi
i'm trying to set up a preload for loading a jpeg but it isn't working.
please help!!
how can i get the value of a loading jpeg as a loadPercent variable so i can set up a dynamic % readout??
i'm loading the jpeg into an MC like so:
this.mc.createEmptyMovieClip("jpg", 0);
this.mc.jpg.loadMovie("project1/1.jpg");
thanks for ANY help.
Load JPEG Dynamically
Please take a look at
http://www.rayfresh.com/retouche/
I want to create a slider like this and load the jpeg dynamically.
Slider can be create through masking but dont know, how to load these two jpeg images dynamically for slider and 1 dynamic image of zoom. Please tell me how to do it.
Load Jpeg Issue
Hello all,
I have a site that loads photos into flash using loadMovie
However, sometimes to photo fails to load. Is it possible to set up a function that will reload the photo if it fails?
Thanks
A Trick To Load Jpeg Once?
let's say I have _root.mcA and _root.mcB.mcC, and I want load same image in both. is there any trick for that, or do I absolutely have to load image twice?
No Flash? Load A Jpeg...
hi there,
I'm looking to display an image if the user doesnt have flash on their computer.
e.g. if browser doesnt detect flash, then load a jpeg.
Is there any script to offer this alternative automatically?
Cheers
James
Load A Jpeg Into A Mc With A Variable
Hello actionscript.org people, this is my first post
Now i know its been covered in many tutorials and forum posts, but each time the problem is slightly different to mine and so the solution is also different. I'm not lazy, its just not knowing squat about actionscript makes editting a script for a similar problem as hard as starting from scratch.
If anyone can find the time to help me, that would be great!
I have a flash movie that acts as a 360 degree panoramic veiwer of a room. (got that script to work fine) but I want to set it up so I can load in the jpeg with a variable number. I have a folder of images (room1.jpg, room2.jpg, room3.jpg, etc etc)
I know it's got to be loaded into a blank mc which I have setup and ready to go!
I've got this bit of a script:
room.loadMovie("myImage.jpg");
room._x = 20;
room._y = 20;
Not sure if thats on the right path ?
And in the html I have:
<param name="room" value="images/1.jpg">
Is this bit correct ?
As you can probably tell I've got myself in a right muddle.
Oh and the values in the html are guna be pulled through from a database? Just incase that makes a difference.
Thanks
What's The Pause In Jpeg Load?
does flash take a second to load a photograph? like a quick little pause as it loads into memory or video memory?
seems like there's a little pause when jpegs are reloaded (from cache) i can't account for
Load Jpeg From A Loop Pb
Hello,
Here's what i'm trying to do: I load a variable (image url) from PHP/SQL and i'm trying to resize the images on the fly:
PHP Code:
myLoadvars = new LoadVars();
myLoadvars.load("http://localhost:8080/Tests/music.php");
myLoadvars.onLoad = function(succes) {
if (succes) {
_global.songtotal = parseInt(this.musictotal);
for (i=0; i<_global.songtotal; i++) {
_root["mycover"+i] = this["Cover"+i];
_root.createEmptyMovieClip(["container"+i], 400+i);
loadMovie(_root["mycover"+i], _root["container"+i]);
_root["container"+i]._x = 50*(i+1); //only to check result
}
}
};
well i'm stuck here cause only the 1st pic get stored in the 1st container .. Any idea why??
Jpeg Load Progress
Is it possible in flash mx to report the download progress of a jpeg in the same way that the progress of a downloading swf can be reported.
If so would it be correct to address the jpeg or the container into which the jpeg will be loaded and contained?
No Flash? > Load Jpeg...
I am making a flash ad. My boss wants to know if there is a way to load a jpg image intstead of the flash applet in case there is someone out there who doesn't want Flash installed.
Thanks.
Cant Load A Movieclip With A Jpeg
My problem is quite straightforward, i really dont understand why it doesnt work...Iv got an array which contains the Instance names of some movieclips;
ImageFolders = new Array("Folder1","Folder2","Folder3","Folder4");
Now when I load a jpeg in it using the following command nothing happens;
for(a=0;a<=3;a++){
_root.ImageFolders[a].loadMovie("Pic1.jpg");
}
but if i just use this following construct, its ok;
_root.Folder1.loadMovie("Pic1.jpg");
Could someone please tell me whats wrong with my code?
thanks
Strange Load JPEG Into Same Mc
Hi! Is this a bug in flash mx (6)?
Try loading a jpeg into a mc and then loading another jpeg into the same mc - the second time around the mc goes blank and only if you repeat twice does it load the second jpeg.
the code is something like this:
2 buttons with diferent jpgs and a mc called mc on the stage...
on (press) {
mc.loadMovie("my.jpg");
}
on (press) {
mc.loadMovie("other.jpg");
}
is this a bug?
Load Jpeg Into DataGrid
Hi all. Anyone know how to load an external jpeg into a DataGrid component. Is there any way to setup an array of image names as a dataprovider & call a function to load them in?
Trying To Load An External Jpeg In AS3
I'm trying to load an external jpeg in AS3. I know I need to do something like this:
Code:
loader.addEventListener( EventType.COMPLETE, loadComplete );
load( new URLRequest(myImageVAR));
but I can't figure/find out how to load it into a movieclip like in the old days (AS2) when you could use:
Code:
loadMovie(myImageVAR, myMovieClip)
god that was so easy ...
Help?
Trying To Load An External Jpeg...Am I Retarded?
Upon looking through the slideshow open source files, I've been trying to load an external jpeg. Here's the (individual) codes I've been testing:
loadMovie("i/pic2.jpg", _root.dropZone);
and
_root.dropZone.loadMovie("i/pic2.jpg");
pic2.jpg is in a folder called "i".
These codes were working with .swf files.
I've used the loadMovie function many times before with swf's . Am I retarded or something?
Load Random Jpeg In Movie
Hi!
I don't know how to randomly load a jpg.
I have 60 jpeg in a file, and I'd like to load them randomly on my 1st page.
PLEASE SOME HELP
LOAD EXSTERNAL JPEG'S / MPEG'S
Hello, I am slowly developing a showreel and am stuck, I have a main movie.swf and I would like to load JPEG, MPEG’s from the main movie. These file simply need to be in new windows that pop up on command _blank, nothing else. I’ve achieved the process using getURL for my HTML/SWF files but none of the above. Also can I control the new window size, as some of the JPEG’s are only 5cm by 5cm. Thanks, leo.
Why Can't I Load Jpeg Into An Empty Movieclip?
I am trying to first create an empty movieclip, then use that empty MC to load jpegs dynamically. The reason I go through this extra step is that I want to resize the picture if it is bigger than the initial (parent) movieclip (not sure that it will even work, but...). Here's my code. Could anyone tell me what is wrong? Thanks.
imagePath = // got it from somewhere, it works
// target Clip is what I have in the flash movie, the "parent" MC
targetClip.createEmptyMovieClip("newImg",1);
newImg.loadMovie(imagePath);
ratio2 = getScale(newImg);
statusText = " picture size: "+newImg._width+"x"+newImg._height+" ("+newImg._yscale+") ratio: "+ratio2+" ("+newImg.getBytesLoaded()+"/"+newImg.getBytesTotal()+")";
There is no picture loaded and the height and width are zero, causing the ratio to be Infinity, and no Bytes are loaded and zero total bytes.
So did I forget something?
Thanks.
Another How To Load External Jpeg Question
I found some topics with this question but none of them are direct questions and are about other load image functions.
I have a row of 10 buttons and I want a different jpeg to load with each button.
I have put the 10 buttons in its own MC called "controlPanel".
That's the first stage. What's next. PLEASE be detailed as I am a newbie.
For example: where do I put the jpegs, what and where instances go, what frame or button has action script etc..
Thank you
Using LoadMovie To Load A Jpeg And Need A Placeholder
Hi all,
Okay, as the title suggests, I am using loadMovie to load a jpeg image from a URL. Now, obviously it going to take a little time for the image to come up so what I need is a simple "loading..." placeholder so that the user knows that something else is on its way.
Basically all I need to know is how do I know when the image is loaded.
Any help would be much appreciated.
Shanan Gough
Load External Jpeg Problem
Hi,
Just wondering, is it possible to load external jpeg that is stored in a web server ?
I tried: this.loadmovie("http://www.myserver.com/picture.jpg", 1);
But it does not work.
I can load SWF file that way.
Thanks for any input
If this is impossible, I will stop researching
Load External JPEG And Animate?
Hi, I want to load an external JPEG into my Flash movie and animate it. This will make it easy for me to change the image.
I tried using this code but it doesn't animate:
----------------
//create a new movieclip to load
//the external movie into
this.createEmptyMovieClip("holder",1);
//load the external movie into the new movieclip
holder.loadMovie("photo.jpg");
//check the download status of the external
//movie once every frame
this.onEnterFrame=function(){
//trace the % of the movie that has loaded
percent=(this.holder.getBytesLoaded()/this.holder.getBytesTotal())*100;
if(!isNan(percent)){
trace(percent+"% loaded");
}else{
trace("0% loaded");
}
if(percent == 100){
delete this.onEnterFrame;
}
}
speed=1;
_root.holder.onEnterFrame=function(){
if (this._x < Stage.width){
this._x += speed;
trace("_x = " + this._x);
}else{
trace("_x is < Stage.width");
delete _root.holder.onEnterFrame;
}
}
----------------
I put a trace statement in, which shows that the image is moved one time only, but then the OnEnterFrame event doesn't run anymore.
Any ideas why?
Thanks,
May
Easy Question... Load Jpeg
I know this is easy, but I'm a designer...
I am attempting to externally load a jpeg into a flash movie that has already been externally loaded into a navigation shell. I know I have to utilize the root layers of the movie i.e.
stop();
loadMovieNum("medalBronze.jpg", 1);
but how do I specify the postioning of that jpeg, I know how to do it with another movie clip by putting x,y positions inside the actionscript. But is there a way just to add the x,y to the script I have above????
you guys are great, always a big help
massmediaworks.com
Load Single Jpeg Into Multplie Mc's
Hi
What's the usual way to deal with a single jpeg you want loading into multiple containers? I'm making a gallery, and going to set up one of those photoshop-style zoom navigation panels so I need a mini version of the main gallery image. The gallery image load is using MovieClipLoader.
thanks
mark
flash8
Load JPEG And Center To Target?
Hi there,
I am trying to dynamically load images into a "picture frame" which is essentially is an image with a transparent centre to reveal the image.
My question is to accomodate images that are slightly larger than the frame size (so if they dont match the exact aspect ration for example). I am loading images into a target, and therefore always loads the image to the top left 0,0 point of the target. Is there anyway I can then centre the loaded image to this movie clip?
See here for an example, I wish I could recentralise this loaded jpeg, so the middle is aligned and revealed?? Anyone have any ideas?
Thanks for any help in advance.
[F8] Load External Jpeg With Preloader
Hi
I am wanting to randomly load 1 of 10 external jpegs into an container_mc.
Does anybody know if it is possible to have a preloader for each jpeg with out making them swf's??
cheers Max
Full Screen Jpeg On Load
Hello,
I'm trying to load an external jpeg when my swf loads, which fills the browser screen. I was able to implement this just fine when the jpeg was imbedded into the swf, but I'd like to load it in externally to cut down on file size. Here's the code...
var holder=holder_mc.createEmptyMovieClip("container", "100");
holder_mc.loadClip("clouds.jpg", holder);
Stage.scaleMode = "noScale";
Stage.align = "tl";
function intialLoad() {
holder_mc._width = Stage.width;
holder_mc._height = Stage.height;
}
intialLoad();
I also have a very similar code which listens to see if the browser has been resized, which then sizes the "clouds.jpg" accordingly. That code works fine, but this initial code does not. Any help would be greatly appriciated.
-Aaron
Set The Height & Width Of Load JPEG
My script:
on (release) {
setProperty(_root.loadMovie("jpg.jpg", 1), _height, 40);
}
The image stays the same size. when it has been loaded. I want to set size of image on stage. What am I doing wrong?.
Thanks
Randomly Load JPEG With Fade
A call to all for help.... Is there a way to use ActionScript to randomly load JPEG files so that one fade's out smoothly while the other fade's in.... without a button or mouse trigger, like in a banner? I posted this question the other day but so far have received 0 replys. Not sure if I'm asking something extreemly difficult or so darn simple everyone figures it should be obvious! I tried using setInterval with a function call and it works sort of but caused other problems in the movie...Please, if you have any suggestions I would be very greatful.
Randomly Load JPEG With Fade
A call to all for help.... Is there a way to use ActionScript to randomly load JPEG files so that one fade's out smoothly while the other fade's in.... without a button or mouse trigger, like in a banner? I posted this question the other day but so far have received 0 replys. Not sure if I'm asking something extreemly difficult or so darn simple everyone figures it should be obvious! I tried using setInterval with a function call and it works sort of but caused other problems in the movie...Please, if you have any suggestions I would be very greatful.
HELP With LoadMovie: When I Load Level 1, Level 2 Disappears And Shouldn't
Hi I have a problem...
I have a movie on level 0 with menu buttons A, B and C. Every button loads a new movie (movie A, movie B and movie C) and they all load the movie in level 1. I have another movie containing the music (movie MUSIC).
When I load the site (level 0) I first load the music (movie MUSIC) in level 2 with a loadMovie(2) and later I let the user choose if he wants to see movie A, B or C by loading them with loadMovie(1). Unfortunately when the user clicks on a button to load any of the three movies A, B and C, the music MOVIE disappears and therefore the music stops. I need the movie MUSIC to be in the top-most level and to load before the other movies do, that's why I have it in level 2, so the controls (play, stop, volume) are always on top of all other movies loaded.
Can you please help me make the music play without the music MOVIE disappearing and stopping when a movie UNDER/BELOW is loaded in a level lower that the music movie's level?
Thanks a lot!
Load Jpeg Into Button As Opposed To Movieclip?
Hi,
Im having some problems loading a jpeg into a button as opposed to a movieclip.
eg. Im using load movie with the target "_level4.scrollpanel.button1.ThumbLoader" where THumbLoader is an empty movie clip.
The problem is it just refuses to load into the empty movie clip inside the button.
I've tried putting a copy of ThumbLoader at _level4.scrollpanel.ThumbLoader and it loads in fine, so why not within the button?
Any help or ideas would be greatly appreciated
Thanks
Load Jpeg From Server /text File
there r multiple jpeg stored on the server. should communicate with the text file and server and loads that perticular file in to it
help pls
sabs
|