Loading Jpegs Into Swf Via LoadMovieNum
Hy you all!
Apparently you can load pictures, jpeg or gif format, directly into a swf file without First importing it into a new swf-file using Flash. Would spare me a lot of time!
One problem, though.
When you us <<loadMovieNum ("somepicture.jpg", 1);>>, The picture is always positioned _x=0 and _y=0.
Has anyone got a solution for me to change this position in e.g. _x=100 an _y=200? I don't want to first position it in an swf-file. I really want to be able to load the picture directly into my parent-swf-file.
Thanks a lot for helping me!
FlashKit > Flash Help > Flash ActionScript
Posted on: 01-23-2003, 10:08 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Loading Jpegs Into Swf Via LoadMovieNum
Hy you all!
Apparently you can load pictures, jpeg or gif format, directly into a swf file without First importing it into a new swf-file using Flash. Would spare me a lot of time!
One problem, though.
When you us <<loadMovieNum ("somepicture.jpg", 1);>>, The picture is always positioned _x=0 and _y=0.
Has anyone got a solution for me to change this position in e.g. _x=100 an _y=200? I don't want to first position it in an swf-file. I really want to be able to load the picture directly into my parent-swf-file.
Thanks a lot for helping me!
Loading Jpegs...?
This might be really simple for some but I seem to mess up...? I want to load alot of jpegs one by one as a slide show from a external ftp folder......how do I do this....can i use the loadmovie action or what's the secret?
Loading JPEGS
I am loading, or at least trying to load jpegs into my project. Here's my code...
on (release) {
loadMovie("Bassett_Carmen.jpg", _root.target);
}
...and it doesn't work. I looked at an example, it works and the code is the same. I have the jpeg in the same folder as the fla file. Can anyone help?
Loading Jpegs
Hi,
i have a question in which i need some advice
I have a movie clips in frame 4 that tweens a movie within it
the tweened movie clip is a place holder for loading jpegs
is there a way that while frame 1 is playing i can load the jpeg into the place holder before it gets to frame 4 to play the movie clip?
is there a way i can load the image before the movie plays so that it can hold in memory until it reaches frame 4 so it doesn have to load?
Loading JPEGs
Is there a tutoria on how to dynamicly load .jpeg files onto an empty MC?
thanks
Loading Jpegs
Ok I am having some small problems. All I am trying to do is load a JPEG using loadMovie into a container mc. The site is at http://www.markertphoto.com/flash.htm
My code right now is as follows on one of the buttons (which is actually invisible button on an mc)
on(rollOver){
_root.fade1 = true;
}
on(rollOut, dragOut){
_root.fade1 = false;
}
on(release){
_root.mc_loadImage.loadMovie("oo1.jpg");
}
The statements are referring to a script written on the timeline to control the fade, so I guess ignore that...unless it's part of the problem. Thanks!
Loading Jpegs?
I have a question in regards to loading jpegs...
I want to load thumbnails dynamically and have the ability to enlarge the thumbnails upon clicking.
I checked out a few components, but all didn't have preloaders, what's the easiest method for this process other then entering the code below....
MC.loadMovie("url;
Loading JPEGS
I am running into an issue with loading jpegs into a movie.
I created a square box to hold the image and gave it instance name (imagebox) I then add to the Timeline an action script to load the image in the imagebox.
LoadMoviesNUM("school.jpg", "imagebox");
It loads the image - into the box - but the box is not where it is supposed to be it is off centered. It is like the coordinates change when the image loads. Can anyone help
Loading Jpegs
Okay now i have this section which constantly need jpegs to be updated.
Now how do i load a external jpeg into my flash movie?
Loading Jpegs
hey guys, this might be a dumb question but is there any way to alter the width and height of a jpg in a movieclip after i load it using loadMovie?
thanks
XML Loading Jpegs
i have a simple gallery loading jpegs into an empty movieclip. The information on what to load and the menu are all generated by an XML file. My problem is trying to provide a preloader, or "loading" message while the images load for users on slower connections. Here is my complete code
menuXml = new XML();
menuXml.ignoreWhite = true;
menuXml.onLoad = function(success) {
if (success) {
menuItem = this.firstChild.childNodes;
for (var i = 0; i<menuItem.length; i++) {
menu_mc.item = menu_mc.attachMovie("itemClip", "itemClip"+i, i);
menu_mc.item._x = 15*i;
menu_mc.item._y = 0;
menu_mc.item.itemLabel.text = menuItem[i].attributes.name;
menu_mc.item.path = menuItem[i].attributes.path;
menu_mc.item.onRelease = function() {
holder_mc.loadMovie(this.path);
holder_mc.onData = function() {
trace("on data called");
};
};
}
}
};
menuXml.load("content.xml");
//
stop();
holder_mc is the empty movieclip being loaded into, and the path info is in the XML file. The image loads fine, but the trace action never executes. i would like to set the holder_mc._alpha to 0, and then have the holder_mc tween in once the jpeg is loaded. Or have a dynamic text field that displays "loading" until the jpeg loads, and then it displays the title. But i'll never get that far if i can't even get the trace action to run. Please help. Thanks in advance.
Help With Loading JPEGs
Hi All,
I have made a flash movie as seen at http://www.coffeemamma.com.au and would
like to change the following:
I'd like to generate three random numbers from 1 to 5 inclusive but I want
to ensure that each number is different - e.g. 2, 4, 1 (not 2, 4, 2). I know
how to generate ONE random number, but I'm stuck on comparing them to see
whether they are the same (and if they are, then generate new numbers until
they are unique).
With the three numbers I would like to load images based on those numbers -
e.g. '_image_2.jpg' then '_image_4.jpg' then '_image_1.jpg'. This part is
fine IF I can generate the numbers.
I'd also like to have the images come to the front when they are hovered
over with the mouse and then to go 'back' to their original position when
the mouse moves away. This I'm completely stuck on.
I'd also like to be able to put the newly loaded images into certain
positions (as per the example) rather than only loaded to (0,0) coordinates.
I also want to be able to have the images masked as they come in (as per the
example) in order to avoid white corners on the top images.
I also have a page as per http://www.wasabi.org.au/wodonga.shtml which has
some of the functions I want to use, but I can't seem to get some of the
functions working in my new movie...
Many thanks,
Bruce
Best Way Of Loading Many Jpegs
A function calles startup() needs to have many jpegs loaded in order to start, so I nested the as shown below. However it seems a messy way to be sure they are all loaded, and I wondered if anyone knows a better way?
administrationLdr.load(new URLRequest("administration.gif"));
administrationLdr.contentLoaderInfo.addEventListener(Event.COMPLETE,onCompleteAdministrationLdr);
function onCompleteAdministrationLdr(e:Event):void {
vidBkgndLdr.load(new URLRequest("vidbkgnd320.jpg"));
vidBkgndLdr.contentLoaderInfo.addEventListener(Event.COMPLETE,onCompleteVidBkgnd,false);
function onCompleteVidBkgnd(e:Event):void {
barLdr.load(new URLRequest("topbar.jpg"));
barLdr.contentLoaderInfo.addEventListener(Event.COMPLETE,onCompleteBar);
function onCompleteBar(e:Event):void {
cornerLdr.load(new URLRequest("bottomCorner.gif"));
cornerLdr.contentLoaderInfo.addEventListener(Event.COMPLETE,onCompleteCorner);
function onCompleteCorner(e:Event):void {
vidBkgndLdrSmall.load(new URLRequest("vidbkgnd160.jpg"));
vidBkgndLdrSmall.contentLoaderInfo.addEventListener(Event.COMPLETE,onCompleteBarSmall);
function onCompleteBarSmall(e:Event):void {
chatControllerLdr.load(new URLRequest("chatcontrol1.gif"));
chatControllerLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, __onChatCtrlrComplete);
function __onChatCtrlrComplete(e:Event):void {
chatBkgndLdr.load(new URLRequest("chatbkgnd.jpg"));
chatBkgndLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, __onChatBkgndComplete);
function __onChatBkgndComplete(e:Event):void {
startup();
}
}
}
}
}
}
}
}
Loading Jpegs
hi all,
right, i'm loading a jpeg into my movie using loadMovie().
1. should i optomize my jpegs before loading them into my swf, or does flash optomize the loaded jpeg.
2. can you stick a preloader on a loading jpeg like you can with a loading swf? eg can you say "if myImage exists then display it, else loop my preloader"?
i've been playing, but unable to come up with anything.
cheers guys!
- D
Loading Ext Jpegs
I have buttons which when pressed fade out the last image and fade in the new image, my problem is i cant get the external images to load into the area. it works well if i have the images within the fla. library but i want to load them externally. i have tried loadMovie and nothing is working. any advice is welcomed - thanks
Loading Jpegs Into Same Mc?
hi
im having trouble loading up a jpeg into an empty mc
i have a gallery.swf and viewer.swf
viewer has empty mc named empty_mc and i am trying to load the image via clicking on a thuumnail in the gallery.
in frame 1 of the gallery for instance i have the code:
Code:
btn_9.onRelease = function ():Void {
var cram1;
cram1 = loadMovieNum("cramView1.swf",65);
cram1.empty_mc.loadMovie("32meBookBW.jpg");}
but wen the viewer loads up it is empty??
can any one see any immediate faults with this code??
thanks in advance
Loading Swf With LoadMovieNum
Hi
please help help help guys
easy one im sure for you pros, ive loaded an external .swf onto a main template with the loadMovieNum("xxxx.swf", 1)
thats all i put in the action and it works but when i go to other pages its still there. i have 400 frames and i load at about 300 thats it.all i need is where and what the actions is to release when i leave the page. Cheers
Dynamically Loading Jpegs
Hi Flash experts,
Have two questions, hope you can come to the rescue as I am pretty new to Flash.
1) Is it possible to display an image in Flash? Say I have a text file containing the URL to the images, is it possible for flash to read those URL and display it?
2) Is it possible to change the Flash canvas size (after it has been published) using Actionscript?
Thanks!
- boon
Loading External Jpegs
hi there,
i need to load jpeg-images from somewhere in the file system dynamically into my flash-movie. i think it works easily with flash generator, but i haven't got it. so, is there a way to load image files dynamically using only standard-actionscripting? like loadMovie(*.jpg) or something?
thanks, stevie.
Loading Jpegs Into Movieclips
Has anyone loaded a jpeg using loadmovie() or duplicatemovieclip() and was able to use a motion tween on it? I have been trying for one week now and I run into the most ridiculous problems.
First of all at work I had my tween effect went backwards what I had set it to. it started at 100% and then went to 0% but when I watched it it was transparent. I don't know what the hell the deal with flash mx is but mine is not working to well.
I really have no idea why this is not working. I have not been able to find any tutorials that load jpgs from an external file except for the webcam thing but the zipwas corrupt
Here is a version that somewhat works.
http://fast-cars.net/Image.fla
When flash files get worked on a lot can they become corrupt? cause I do not know why my actual movie is not working right.
Here is what I've been working on. http://fast-cars.net/spyker/
It would be good to know how to do this for my site and if my work needs me to do it but I'm going crazy flash seems to not be working correctly.
Also another thing. I was loading my jpg into my movieclip and then the movieclip would turn all black and where the picture was it would just be a black fill. I got so mad when that kept happening and I had checked all the instances and all of them were named correctly.
Loading Thumbnail Jpegs
I am having a bit of a problem loading some jpegs and having them show up on the associated clip(button). here is how the script looks right now...
I load from imagethumb.php
it tells me how many icons "numicon"
and what the associated name should be pic#
then, i populate little icons that act as buttons with the script...
// populate images
spacingx = -45;
for (i=1; i<=numicon; i++) {
attachMovie("icontainer", "temp"+i, i);
spacingx = spacingx+45;
setProperty("temp"+i, _x, spacingx);
setProperty("temp"+i, _name, _root.boxhold["pic"+i]);
}
nextFrame();
Inside of the attached movie "icontainer" is a button that says...
on (release) {
loadMovie("images/"+(_name), _level1.mover.holder);
_level3.cover.gotoAndPlay("skip");
}
and that works all fine and i get the image loaded. The problem lies on the first frame of that same movie clip where i put the script that is supposed to put an icon in there so people know what they are going to click on. it looks like this...
loadMovie("thumbs/"+(_name), emptybox);
emptybox is just a place holder in the attached clip.
the nonworking sample of this is found here at http://www.cornwallinnpa.com (CLICK ON THE IMAGES BUTTON)
the little empty boxes on the botton are where there should be thumbnails.
Also, is there a way i can set up a scroller for these thumbnails?
So, I dont konw what to do from here. If anyone has any tips or help on this I would love to hear from you. thanks a bunch.
Loading Jpegs (name) Into An Array
Is it possible to use MX to read a directory, scanning for all the jpegs in that folder and turn them into an array?
I've been manually adding all the jpegs into an array and this is becoming a bit time consuming.
Cheers
Vincent
Loading Jpegs Externally
Hi,
I found a few good components that simplify the task of loading dynanic jpegs. The prob is, not one comes with a preloader.
Anyone know of a image component that has a preloader?
If not, then i guess i will need to write the script which brings me to a few questions.
1. If i load a jpeg into a MC (mymc.loadmovie("photo.jpg") how can i control the size of the image within the MC? It seems that the MC has no bounderies thus making the image hard to match up with the template on the main timeline.
Allso, i have worked with preloaders alot, is the concept the same for loading jpegs?
thanks for any answers, Danny
Loading JPEGS Dynamically
Hi people!
Does anybody know of a tutorial on Loading JPEGS Dynamically?
Could really do with it!
Cheers
Deadhands
Loading Jpegs From A Directory?
Hey guys,
I'm designing a simple gallery style website and got asked whether using FlashMX other people could upload images (jpegs) to a directory (eg /images) and have FlashMX automatically detect and access these images for viewing?
I'm open to ideas that are roughly along these lines if anyone wants to throw some at me.
Cheers,
Gatorage
---------------------
Follow-on:
I saw that there is a sample movie included with MX that deals with this issue, but I found two more problems that I wanted to ask about. The sample movie deals with images named image1.jpeg, image2.jpeg, etc.
Can I get Flash to read all images in a directory regardless of name? (eg *.jpeg)
Also, how can I deal with the issue of having images of different sizes displayed? (someone mentioned to me the use of a scrollpane?)
Thanks, asking a fair bit!
Gatorage
Loading Jpegs Dynamically
Hey All,
i was wondering if someone could maybe tell me the answer to this.
ok say your making a menu from XML with a for loop
how would you go about loading the thumbnail image into the holder clip, i know the XML is working coz i traced it but well look.
...
_root.nav.attachMovie("module","module"+i,i)
_root.nav["module"+i]._y = (i*heightTotal);
loadMovie (picXML[i],_root.nav["module"+i].pic);
trace (picXML[i]);
..
third line see this is prob the worst thing i have tried so dont make fun of me
i tried
_root.nav["module"+i].clip.loadMovie (picXML[i]);
(clip being the holder for the jpeg)
that dont work either but i know for a fact the xml is giving me the name
1.gif
2.gif etc etc
Any ideas what im doing wrong? Never used this loding in before of images and its got me
thanks :P
2 Questions On Loading Jpegs
Hi,
Question 1: I want to load a jpeg so I can use it in various places in the movie. So I guess I would load it to a movie? So whenever say 'mymovie' is called, it shows. Can someone tell me how this works.
Question 2: Is there a way to make a preloader so the jpegs must be fully loaded before play starts? I am loading 6 jpegs.
Thanks
Loading Jpegs Dynamically?
I saw that this is possible and am wondering if it's just like dynamic text? Are these jpegs from an outside source? Any articles or tutorials about this would be amazing. Thanks
Randomly Loading Jpegs
I am making a jigsaw with randomly loading pics. The pic randomly loads into a movie clip (container) then the pieces are made up of instances of this clip which are then masked to make the pieces.
The problem is that different pictures are loading into each instance, which obviously make for a good jigsaw!
I am using MX,
here is the code applied to the first frame of the container clip:
footers = 10;
directory = "photos/";
container.loadMovie(directory add Math.ceil(Math.random()*footers) add ".jpg");
stop();
Any ideas???
Tim
Randomly Loading Jpegs
Randomly loading Jpegs
I am making a jigsaw with randomly loading pics. The pic randomly loads into a movie clip (container) then the pieces are made up of instances of this clip which are then masked to make the pieces.
The problem is that different pictures are loading into each instance, which obviously doesnt make for a good jigsaw!
here is the code applied to the first frame of the container clip:
footers = 10;
directory = "photos/";
container.loadMovie(directory add Math.ceil(Math.random()*footers) add ".jpg");
stop();
Any ideas???
Tim
Dynamics Jpegs With Loading Bar
Hi,
I'm trying to create a movie that loads an external jpeg into flash, and while its loading displays a 'loading bar' graphic. Ive read through all sorts of threads on preloaders and have tried tweaking them to get the result I want.
I nearly works - apart from the loading bar 'flicks up full' on screen at the start? - can anyone help in stopping this happen? - or use another bit of code to prevent it happening.
thanks
Muddy
Im using this code to reference a tween of a bar stretching over 100 frames as if its growing.
---------
stop();
this.onEnterFrame = function() {
var Loader = int((holder_mc.getBytesLoaded()/holder_mc.getBytesTotal())*100);
bar.gotoAndStop(Loader);
};
holder_mc.loadMovie("1.jpg");
// this will load 1.jpg into the instance 'holder'
--------
EXAMPLE
http://www.graymatter.co.uk/flash/pre2/
FLA FILE
http://www.graymatter.co.uk/flash/pre2/LOAD.fla
Dynamic Loading Of Jpegs
When I dynamically load jpegs into my swf some work and some dont. Generally the ones that dont work are the ones I produce on my computer using photoshop... ones that I download from the web tend to dynamically load in fine. Is there some setting in photoshop which I should use or any other reason that this should happen?
Thanks
Mark
Loading External JPEGs (?)
Hi Guys,
I'm having a bit of trouble loading some external JPEGs into my movie and I was wondering if anybody could help out.I've simply created an empty movieclip to load external images into and given these actions to the corresponding button in the main timeline:
btn1.onRelease
loadMovie("/desktop/vicprof/tfwebnew/manjpegs/kiss1.jpg","holder")
...and the image(s) won't load.
I've never had a problem with loading external swfs in the past, so I'm not sure what's up. The only thing i can think of, is that the holder MC is a slideshow which is placed within another MC, and the button with the actions is on the Main MC timeline, and not the root timeline. Does this make any difference?
If not does any one have any advice?
thanks!
Loading Multiple Jpegs
Hi i'm trying to load several jpgs at once into my site and am having some difficulties. i just painstakingly put together a php script (i'm a complete newbie at php) that searches within a subdirectory and sends back a string of variables that are the names of the jpgs i want to load into my flash movie. this is the code i tried within falsh. When the button is pressed two variables are sent to the php script that help it deside which jpgs to send back in the string of variables. their names are image0 image1 etc. for some reason my attempt doesn't work. I am sure i am getting the variables sent to flash though. i checked them using a dynamic textbox.
on (release) {
variable = "";
info = new LoadVars();
info['projtype'] = 1;
info['location'] = 0;
info.sendAndLoad('directory.php', info, "POST");
info.onLoad = function(success) {
// inside onload event you do not have to target the object info (this.info all you need to do is write this or info)
for (n=0; n<8; n++) {
this['newclip'+n]._x = 70;
this['newclip'+n]._x = 50*n;
avariable = 'http://turnoffthe.tv/experimental/directorytest/images/'+this['image'+n];
this['newclip'+n].loadMovie(avariable);
}
};
}
does anyone know of any tutorials that guides you through a case like this in which several jpgs are loaded simultaneously check out the following site it's really clean and does just that. also each jpg has preloader!!
http://pics24.com/
Loading JPEGS From Movieclips
My main timeline has a movie clip (MENU) with a few buttons inside and a display movie clip (DISPLAY) in which to load JPEGS. I'm controling the actionscripts from the main timeline but when I tell the buttons within MENU to load jpegs to DISPLAY nothing happens. Yet when the buttons from MENU are on the main timeline, it works. Please help.
Loading External Jpegs Into .swf's
Hey everybody,
I need help writing a script so that I can bring external jpegs (from within the same .swf folder) into an mc so that it appears when I view my .swf.
Thanks for the help!
John
Problems With Loading Jpegs
check out http://www.clarebird.co.uk
go to fine art or travel photography i'm loading jpegs from the thumbs into a mc clip called imageholder with this script
on (release) {
imageholder.loadMovie("images/red/img_1.jpg");
}
this works fine on my local files but when i upload it it loads nothing. Any ideas? (ignore the loading image clip this is just visual for the moment). Thanks for yor time
Loading Different JPEGs With Same Function
I need to load a bunch of small jpegs(thumbnails)and line them up next to each other. Should i use the duplicateMovieClip function, what is an easy way to load a lot of jpegs into flash? this is what i have so far...
function thumbnailLoader(){
_root.createEmptyMovieClip("myMovieClip", 1);
myMovieClip.createEmptyMovieClip("imageHolder", 1);
myMovieClip.imageHolder.loadMovie("thumb/abbott, alice.jpg");
}
i tried to have parameter for the name of the jpeg file but was unable to make it work.
i have tried this as well
function imageLoader(pic) {
_root.createEmptyMovieClip("myMovieClip", 1);
myMovieClip.createEmptyMovieClip("imageHolder", 1);
myMovieClip.imageHolder.loadMovie("pic");
myMovieClip._x=0;
myMovieClip._y=0;
}
imageLoader(abbott, alice.jpg);
any suggestions?
Please Someone Help Me Loading Jpegs Sequentially.
Hello.
I have a movie clip called holder_mc I want to load 01.jpg into it. After 01.jpg is fully loaded into holder_mc I want the movie clip to swap out that jpeg for 02.jpg after that jpg is loaded I want it to swap out for 03.jpg and so on and so on. Could someone please tell me how to do this or point me in the direction of a tutorial?
Thank you,
Liz
Loading External Jpegs
I’ve found a bunch of questions about loading external jpegs but mostly with a button.
I need a simple code that will load .jpegs from the source folder into a MC onto my stage without clicking anything.
I’ve saved them as non-progressive but none of the code I’ve found seems to work.
I just don’t want the images in my library.
Thanks in advance.
Loading Jpegs With Progress Bar
I am having trouble when loading external jpegs into an empty movie on the main timeline. The jpegs load but I'm trying to assign a preloader to the empty movie clip as the jpegs can have a large filesize.
When the page initially loads it has a main preloader which works fine it then loads the page and the first jpeg I have assigned to load into the movie clip loads WITH the preloader as I want it to.
However when I click on the thumbs to load other jpegs the progress bar does not appear and therefore they are not preloading. Does anyone have any idea why.
Here is the AS on the main timeline:
holder_mc.loadMovie("Images/1.jpg");
this.onEnterFrame = function() {
l = holder_mc.getBytesLoaded();
t = holder_mc.getBytesTotal();
p = Math.round((l/t)*100);
if (p<100) {
preloaderPic_mc.gotoAndStop(p);
} else {
preloaderPic_mc._visible = false;
this.onEnterFrame = null;
}
};
The AS on each of the thumbnail buttons:
on(release) {
holder_mc.loadMovie("images/1.jpg");
}
on(rollOver) {
pic1_btn._alpha-=50
}
on(rollOut) {
pic1_btn._alpha+=50
}
Thankyou in advance
Sequentially Loading Jpegs
I've done some serious searching but I haven't found anything close. I'm wanting to sequentially load jpegs but I'd like a visual display on how many will, and have loaded. For instance 5/12 images loaded and so forth. Very similar to http://www.almavivaresidence.com/ in its gallery section. Although I can do without the spinning images.
Any help would really be appreciated.
Loading Jpegs With MovieClipLoader
Hello Everybody
I am loading some jpegs with the MovieClipLoader and dynamcally created movie clips. I was thinking that if I load the new jpeg into a new movieclip and then unload the old movieclip there would be no gap between the jpegs. But I am still getting a time gap between the new and the old jpegs when I test on my remote site.
Can anyone tell me what I am doing wrong?
stop();
var pic_counter:Number = 1;
var container_counter:Number = 1;
var orig_container:Boolean = true;
this._lockroot = true;
var mcLoader:MovieClipLoader = new MovieClipLoader();
var myOldContainer:String = "";
_root.return_btn.onRelease = function () {
_root.unloadMovie();
_root.loadMovie("front.swf");
} // End of the function
var container:MovieClip = createEmptyMovieClip("container", getNextHighestDepth());
container._x = 216;
container._y = 49;
mcLoader.addListener(this);
mcLoader.loadClip("1.jpg", container);
_root.right_btn.onPress = function () {
if (pic_counter < 8) { pic_counter++; }
else if (pic_counter == 8) { pic_counter = 1; }
if (pic_counter > 1) { container_counter = pic_counter-1; }
else if (pic_counter == 1) { container_counter = 8; }
var myOldContainer:String = "container"+container_counter;
var myContainer:String = "container"+pic_counter;
var container:MovieClip = createEmptyMovieClip(myContainer, getNextHighestDepth());
myContainer._x = 216;
myContainer._y = 49;
mcLoader.addListener(this);
mcLoader.loadClip(pic_counter+".jpg", myContainer);
mcLoader.unloadClip(myOldContainer);
if (orig_container == true) { mcLoader.unloadClip(_root.container); orig_container = false; }
}// End function
_root.left_btn.onPress = function () {
if (pic_counter > 1) { pic_counter--; }
else if (pic_counter == 1) { pic_counter = 8; }
if (pic_counter < 8) { container_counter = pic_counter+1; }
else if (pic_counter == 8) { container_counter = 1; }
var myContainer:String = "container"+pic_counter;
var myOldContainer:String = "container"+container_counter;
var container:MovieClip = createEmptyMovieClip(myContainer, getNextHighestDepth());
myContainer._x = 216;
myContainer._y = 49;
mcLoader.addListener(this);
mcLoader.loadClip(pic_counter+".jpg", myContainer);
mcLoader.unloadClip(myOldContainer);
if (orig_container == true) { mcLoader.unloadClip(_root.container); orig_container = false; }
} // End function
var myVar:LoadVars = new LoadVars();
myVar.load("mytxt_backyard");
myVar.onData = function (content) { my_text1.text = content; }
Albert
Loading Jpegs And Audio
heres my project:
I have 50 bitmap slides (jpegs) that were saved out from a powerpoint presentation.They are numbered 1 to 50.
for these 50 bitmaps I also have 50 mp3 sound files (narration for each slide) numbered 1 to 50.
sound 1 is the narration for bitmap 1,sound 2 goes with 2 etc,etc,
I would like to combine these files into an slide show that advances when the narration for each slide is finished. I also would like to add forward and back buttons to allow a user to move forward and back to different slides.
Im a bit unsure on how to approach this.Specifically,how do i load the jpegs and sound files at the same time ? Would i be better off loading seperate swfs with sound ? I would deeply appreciate any ideas on this .IM fairly new to FLASH,having spent most of my time with Director
Thanks
Pre-loading Dynamic Jpegs
Ok so i was trying not to ask for any help, but i can't figure something out myself (probably something simple, and i'll kick myself later for asking...).
I have a button which, when pressed, defines the ''_root.section" and goes to another MC which has this actionscript: loadMovie(_root.section+".jpg", "_root.photo_holder");. This is to load a jpeg into a MC.
The next frame contains the following actionscript as a pre-loader:
if (_root.photo_holder.getBytesLoaded()>=_root.photo_ holder.getBytesTotal()) {
gotoAndPlay("loaded");
} and the following just says gotoAndPlay(_currentframe-1);
Once the if condition is satisfied, it plays ''loaded'' which basically says:
_root.photo_holder.gotoAndStop(1);
_root.mask.play("unmask");. Mask is a masking MC located ontop of the MC containing the JPEG.
All works fine during testing, but when uploaded to a server, sometimes the ''mask'' movieclips starts playing before the jpeg is fully loaded. The jpeg is not saved as progressive.
I don't really see a problem with the Action Script i've written above? Can anyone see something wrong or suggest something i may have needed to add? I haven't been doing this for long.
Pre-loading Multiple Jpegs. Into Mc
ok I'm stumped as to why this isn't working. I check through some of the threads here but nobody seemed to be in the same situation as me so unless I skipped over something here is the problem.
I have an xml file that has chapter and page tags, chapters hold the pages the pages are jpegs or swf files. I load the xml and sort it out to be left with chapter arays. each array called chapter+"num" and within the array are the pages in order. ok that aside here is the problem
I have a function that creates a chapter movieclip. calling it chapter 1 to start (clever I know) I'm using the createEmptyMovieClip() to make this chapter holder MC.
with the chapter holder made I need to fill it. so I pass that chapter to a function that is going to build the pages of that chapter I use a simple for loop that loops through the chapters page array and make a movie clip for each page z sorting the next pages beneith the previous to give the page "layout"
with this happening I have also a watcher clip on the stage that was created via createEmptyMovieClip. its waiting for some instructions so after the for loop I give it some on EnterFrame goodies to play with, and its supposed to watch the chapter holder clip and monitor the pages loading via a simple load bar based off of thew chapters getBytesTotal and getBytesLoaded.
this is where the code is failing as the watcher clip can never retrieve the bytes total or loaded.
thus the pages indeed get loaded but there is no visual representation via a loading bar, this in turn is causing me great anger. bah.
please help if you can othewise I'm gonna have to try a different approach. if youhave suggestions fire away.
cheers
Random Loading Jpegs
Hi, I'm new to Flash for all intents and purposes even though I've been dabbling in it on and off since 5. I'm a video editor by trade, FCP & AE. Anyway, I doing a site for this new magazine a friend is starting and am going crazy trying to figure out how to get a siteside folder full of pictures to randomly display on the homepage. I've temporarily setup the page using a .flv of the pix, but I hate it. I want to use jpgs and have them alternate as long as the page is up. (Fade transitions would be a plus, but I'm not greedy.) Every tut I've been able to find will only load a random background everytime "refresh" is hit. I'm assuming I would need some type of XML call to do what I'm after. If anyone can point me in the right direction I'd be much obliged. The site is for dog lovers. I'm a cat guy, go figure. www.theurbandogsource.com Thanx, Stoney XL.
Loading Jpegs Randomly
I want to load a series of .jpg files randomly into my main movie so that all of them are seen at the same time. For example if there are 8 .jpg files, all 8 should appear on the main movie. I would like there to be 8 containers for the jpgs on the main movie and for each jpg to load randomly into those containers. The idea is that a user can click a button and the jpgs will load and be shown in a different sequence each time, without any of the jpegs repeating.
Let me know if I am not being clear. I would really appreciate any help. Thanks in advance.
Loading Jpegs Into MovieClips
This may be more appropriate in the rookie section but:
I need to create several miniature 'slideshows' in a flash standalone.
Each slide show probably contains 20 jpegs, and like I said, there are several of them.
This amounts to enough images that it seems best to load them into the slideshow movieClip from their folders on the cd on which the standalone will run.
Question is:
a.) does this logic make sense to the more experienced flash developer?
b.) how does one go about loading jpegs into movieClips
(couldn't find a tutorial)
Thanks in advance
|