XML And Multiple (separate) Images
hello againI have injected some xml into my site ( slideshow style gallery)but, now i have a questionI have a "gallery image" that shows up at the top half of the screen.At bottom of the screen I have an image that is a block of graphical text Sense these are two disjointed images, but I need them to show up at the same time, should I make a new XML file that contains the text images?so, i would have images.XML and text.xml?or can I add them into the existing XML document?if i need to add them to the existing XML document, im not to sure how to go about doing that!thanks again!dR
KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 08-19-2006, 11:32 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
XML And Multiple (separate) Images
hello again
I have injected some xml into my site ( slideshow style gallery)
but, now i have a question
I have a "gallery image" that shows up at the top half of the screen.
At bottom of the screen I have an image that is a block of graphical text
Sense these are two disjointed images, but I need them to show up at the same time, should I make a new XML file that contains the text images?
so, i would have images.XML and text.xml?
or can I add them into the existing XML document?
if i need to add them to the existing XML document, im not to sure how to go about doing that!
thanks again!
dR
Handling Multiple Separate Sounds
Using AS 2.0, I've got an existing root timeline with a LOT of existing animation on it and it has a soundtrack as a looping event. Also on the same root timeline are individiual voice over events timed to the animation. Works great as a linear piece, but when adding a button for navigation to go to a specific section, there is no simple way to reinitiate the background music once you issued a stopAllSounds() because the music track trigger event was back in the beginning and not in the new section. If you want to just watch it in a linear form.... and this is what it primarily designed to do, you can put another music track trigger event which would work fine for buttons, but not for playback in linear form as it would trigger two soundtrack events.
Help would be very much appreciated as I've been trying to build test cases now for hours in separate files and can't come up with a decent solution.
Adding Images From Separate Class
I'm trying to dynamically add images from a separate class, called from the main document class. I am using CS3.
My main class is as follows:
package imageReader {
import flash.display.*;
public class LoadTest extends Sprite {
public function LoadTest () {
// constructor
var thumbnail = new XMLImage();
}
}
}
This calls a separate class in the same package named XMLImage. The XMLImage constructor dynamically loads an image, created through the Bitmap/BitmapData/addChild() process (seen in part, below):
largeImage = Bitmap(_loader.content);
largeImageData = largeImage.bitmapData;
addChild(largeImage);
If I call XMLImage directly, as my main document class, it works, and the image appears on the stage. So, there does not appear to be a problem with the process of loading images.
However, if I call it through another class, as above, it still works (via trace), but the image does not appear on the stage.
I'm sure I'm missing something simple here, but... I've been unable to figure it out.
Thanks...
Having A Preloader , Load Separate Images
i have a movie with a preloader (which calculates the size of my movie), now i would like to load my whole movie apart from a few images which i would like to load after when requested. any way i can separate the two loading?
tah
How To Display Multiple Galleries In Separate Rows
I have two image categories each of them needs to be displayed horizontally in distinctive rows. ie.
Row 1 : category 1 image thumbnails
Row 2: category 2 image thumbnails
and I am just wondering if I could put the XML objects of each category in an array and process them in a loop? so far the following code is not working.
Please give me advises on how I could display multiple galleries in different rows. Many thanks!
ActionScript Code:
function getCats() { //initialise category objects and store them in an array called catArray.
for (i=0; i<_global.catNames.length; i++) {
_root.catArray[i] = new XML();
_root.catArray[i].ignoreWhite = true;
_root.catArray[i].load(_global.catNames[i]+".xml");
trace(_root.catArray[i].firstChild.childNodes);
}
}
[CS3] Unable To Load Images From Separate Subdomain
Hello,
Recently, I developed a javascript component to dynamically grab data from a database and rotate through the items. It displays a picture and 2 lines of text.
That works perfectly fine.
When creating a Flash version of this component, however, I run into some trouble. XML is dynamically generated by a webservice that makes the same calls to the database. The XML is generated perfectly fine and the component reads the XML fine.
I have several variables passed into the Flash declaration, including a service URL that points to the XML. The component rotates through the items, but does not display the images. I know that it's grabbing the XML because it outputs the appropriate text.
I have checked the image paths and they're all valid. I've had the flash component output the url that it should be loading and that's also correct. The URLs are all fully qualified. Now the weirdest thing is that I can chance the background color (no that's not the weird part :P) and thus see a white placeholder for the images. The image should resize when it becomes the center image, and the placeholder does resize to the size of the image that should be loading. Therefor, it has to be seeing the images so that it can grab their dimensions, as they're all different, but no images come up.
On a local machine in Adobe Flash CS3 Professional, the movie runs fine when I statically put in the XML path. (I've also pushed it online with a static XML path and it doesn't work when you go to the site).
I seem to get conflicting results in my research on the subject of flash loading images from other subdomains. The images that are to be loaded are on a different subdomain than the Flash component and the XML. It is all in the same domain, however. I looked into crossdomain policies, but that shouldn't affect it since it's on the same domain.
I can't post the code here or a site to view this on as we're not ready to release yet, so I was wondering if anyone had heard of a similar issue before or could offer some suggestions.
Here's a screenshot of the program in action though:
As you can see, the images on the side are all a uniform size, but the one in the center resized to the appropriate height.
Ignore the blue text in the back - that was for testing to confirm that the Flash has an appropriate URL and matches the output for the local version.
Thanks,
-- Rob
Help Playing Multiple SWFs In Order On Separate Timeline
Ok, I have about 12 separate SWFs that are all imported and played through a separate SWF that acts as a wrapper with a menu, etc.
I want to be able to load the SWFs continuously on the main timeline when each SWF finishes it goes to another frame label on the main timeline and loads the next SWF and continues to play.
I am aware that I can use loadMovieNum("file1.swf", 1); but that just overlapps what just played and has no communication with the "main" SWF to trigger other actions.
Any help is GREATLY appreciated!
Thanks in advance!
/zach
Help Playing Multiple SWFs In Order On Separate Timeline
Ok, I have about 12 separate SWFs that are all imported and played through a separate SWF that acts as a wrapper with a menu, etc.
I want to be able to load the SWFs continuously on the main timeline when each SWF finishes it goes to another frame label on the main timeline and loads the next SWF and continues to play.
I am aware that I can use loadMovieNum("file1.swf", 1); but that just overlapps what just played and has no communication with the "main" SWF to trigger other actions.
Any help is GREATLY appreciated!
Thanks in advance!
/zach
Multiple Links In Same Frame Opening To Separate Windows
I want to have 4 buttons IN THE SAME FRAME that open SEPARATE URLS in SEPARATE windows.
Currently, I have two problems:
Problem 1: clicking on any of these 4 buttons only opens the first one
Problem 2: when i co-erce it into working by placing the script in separate frames, it still opens up the newest link in the same new window. This is a problem because I have opened up a music player in the first new window, and I don't want to open the next URL in the same window.
I put my code below. I'm sure I'm doing something simple, but the book that I am using doesn't tell me how to do what I want to do. Thanks SO much for your help! This is driving me crazy.
function buysmall1(myevent:MouseEvent):void {
var buysmall1_url:String="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=1749562"
var buysmall1_win:String="newwindow";
var buysmall1_features:String="width=1000, height=800, left=250, top=00, toolbar=0, location=0, directories=0, scrollbars=1, resizable=1, toolbar=1"
ExternalInterface.call("openwindow", buysmall1_url, buysmall1_win, buysmall1_features)
}
small1_btn.addEventListener(MouseEvent.CLICK, buysmall1)
function buymedium1(myevent:MouseEvent):void {
var buymedium1_url:String="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=1749570"
var buymedium1_win:String="newwindow";
var buymedium1_features:String="width=1000, height=800, left=250, top=00, toolbar=0, location=0, directories=0, scrollbars=1, resizable=1, toolbar=1"
ExternalInterface.call("openwindow", buymedium1_url, buymedium1_win, buymedium1_features)
}
medium1_btn.addEventListener(MouseEvent.CLICK, buysmall1)
function buylarge1(myevent:MouseEvent):void {
var buylarge1_url:String="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=1749579"
var buylarge1_win:String="newwindow";
var buylarge1_features:String="width=1000, height=800, left=250, top=00, toolbar=0, location=0, directories=0, scrollbars=1, resizable=1, toolbar=1"
ExternalInterface.call("openwindow", buylarge1_url, buylarge1_win, buylarge1_features)
}
large1_btn.addEventListener(MouseEvent.CLICK, buysmall1)
function viewcart1(myevent:MouseEvent):void {
var viewcart1_url:String="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif"
var viewcart1_win:String="newwindow";
var viewcart1_features:String="width=1000, height=800, left=250, top=00, toolbar=0, location=0, directories=0, scrollbars=1, resizable=1, toolbar=1"
ExternalInterface.call("openwindow", viewcart1_url, viewcart1_win, viewcart1_features)
}
viewcart1_btn.addEventListener(MouseEvent.CLICK, buysmall1)
Masking A Single Image In Multiple Separate Sections
Can anyone tell me if it is possible to reveal two separate sections of one photo at separate times using two different symbols on the same mask? I have tried this but the two symbols seem to be linked to one another and move
Let me explain further, I have two people in a photo. In one set of frames I want to reveal one of the two people from the bottom up. In the next set of frames I want to reveal the other person from the top down.
Is the answer to duplicate the photo to another layer and put the mask for the 2nd person on the second layer?
Many thanks in advance for any assistance.
Andy
Can I Combine Separate Swf's Into One Project To Combining Separate Swf's Into One Pr
I'm working in Flash 5 on a G4 OS 9.2.2 - I need advice - Thanks!
Hey there,
Quick question before continuing on a very large project.
Can I combine separate flash projects or coded swf's into one large Flash final project without making a mess to conserve on space and memory? I would like to leave all my library elements behind as it's taking up too much space.
At the moment, my project is too large to work on - I have too many items in the library, so I'm in the pocess of separating it into individual projects respectively.
What's a good way of attacking this problem? At the moment - I have in 6 different "scenes" using the Flash default (new scene) with approximately 12-17 layers in each scenewhich totals 65 separate screens the player can choose that are linked with gotoAndPlay frame # action. I want to get rid of tweened animations and use script instead in my movies but I'm having difficulty since all is not the root level.
What do you think - your seasoned techno opinion is desparately needed.
Thanks,
Bluevenus
Help With Unique Random Images - Multiple Images At A Time
Ok so what i would like to do is set up a page that has 36 images on it. But every time anyone goes to the site i want them to show up in random order. I have jpgs they are all labeled 1.jpg, 2.jpg 3.jpg and so on. I have used code that pulls the images form a folder that the swf isnt in like /images/1.jpg. So what im saying is i want to pull them externally. Any one have any ideas on how to do this?
Attaching Multiple Images - Load Images One At A Time?
I have a photo gallery that loads many images using a for loop (image data is from XML file). Simplified code looks like this:
Code:
var photos_xml = new XML();
photos_xml.ignoreWhite = true;
photos_xml.onLoad = function(success) {
if (success) {
var photos = photos_xml.firstChild.childNodes;
var itemCount = 0;
for (var i = 0; i < photos.length; i++) {
var path = photos[i].attributes.path;
// attach the photos
var photo_mc = _root.center_mc.photosLevel1_mc.attachMovie("photoFrame_mc", photoName, itemCount);
photo_mc.empty_mc.loadMovie(path);
itemCount ++
...
Then on the photoFrame_mc clip I have a loading like:
Code:
onEnterFrame = function () {
loader_mc._visible = false;
var t = empty_mc.getBytesTotal();
var l = empty_mc.getBytesLoaded();
percent = Math.round((l / t) * 100);
if (l == t && t != undefined && t > 10) {
loader_mc._visible = false;
delete this.onEnterFrame;
} else {
loader_mc._visible = true;
if (isNaN(percent)) {
percent = 0;
}
loader_mc.percent_txt.text = 10 - Math.round(percent / 10);
}
};
So what happens now is that many images get attached at once and they are all loading at the same time.
What I'd like to do instead is to have them load one at a time. The first pass through the for loop attaches an image and then it loads, but it doesn't move on to the next image until the first one is done loading. Is that possible?
Or maybe is it better to let them load all at once? I just think that when the image count is very large it will really bog down loading so many images at once and it might be best to load one at a time. Please advise.
How Can I Load, Multiple Images Into Multiple Key Frames At Once..
Hey guys, I have this..pseudo 3d model viewer for my site that I am working on. The only problem is, I don't want to manually add every image to the flash...especially if I have 45 images or so and I am pretty sure there is no way to automate this in actionscript..
http://www.pcgamemods.com/slideshow/revolve.html
this is a pretty crude example but it shows you what I am aiming for. I just wanted to know if there was an easier way to add images to frames or if there was a program to do it for you.
Loading Multiple Images Into Multiple MC's
Hiya
Basically I have an image gallery where I want to load jpg's into seperate MovieClips and then have some onRelease, onRollover etc actions attached to them. I've managed to write what I need, but now the problem is that if I have 50 pics in my gallery I will have to repeat this code 50 times!!!
Can someone show me how to put this in a for loop or an array, or whatever I need to do so I can write it once, not 50 x.
Here's what I've got so far...
loadMovie("images/thumbs/thumb1.jpg", this.btnHolder.inside);
btnHolder.onRelease=function (){
_root.select = 1;
if (_root.cur == 0) {
trace("same pic!");
} else {
_root.fadeOut(0);
}
}
btnHolder.onRollOver=function (){
this.gotoAndStop(2);
}
btnHolder.onRollOut=function (){
if(_root.select == 1){
this.gotoAndStop(2);
}else if
(_root.select == 0){
this.gotoAndStop(1);
}
}
PLEASE HELP ME.
thnx
Multiple Images With URL's
I have 3 images, I wanted to start with one image and fade into the next one and then the next. While each image is static and not fading in or out I wanted to make that image clickable so It would open up a url (a diff url for each image).
I tired to setup up everything a million times all diff ways but when I save the file to an swf and test it out. The first image url stays throught the whole movie, so when the first image fades out and the next one fades in and I click on the second image the url wont work it is still using the first image url.
nebie to flash.......I was trying this in swishmax 2005 but also have flash 8 - any help would be welcomed
HELP : Can You Do This With Multiple Images?
Hello,
I came accross this car website and notice their 360 degree view. I was thinking if it's possible to have some SNAPSHOTS of an image and do this kind of trick in FLASH.
http://www.buick.com/lucerne/gallery_360view.jsp
Thank You
Multiple Images
Hi
I have to place on a page 8 images from a folder containing about 1000 images and then on the next entry into the page have a different 8 appear without duplicating any images on the page.
As an extra it would be better if there were no reapeats until all the images had been seen.
Any suggestions on how this can be achieved.
Barry
Multiple Swap Images
Hi there....
Can anyone tell me how to swap two keysframe images in one move?
Fx. I have a image fading from 0 to 100% alpha. How can I swap the image without doing it one keyframe at the time?
Please help
//Jake
Multiple Images In Sequence?
Hello everyone.
I have this script that loads 3 swf files randomly at various intervals of time (I got it from Flashkit 2 weeks ago):
__________________________________________________ ____________
// 1. define the files - as you did before
files=["first.swf","second.swf","third.swf"];
// 2. define a timing for each file, each value corresponds to a file respectively
times = [5000, 3000, 8000]; //time in milliseconds
// 3. make a custom load function
function loadNew()
{
var rand = random(files.length);
setInterval(loadNew, times[rand]);
myMc.loadMovie(files[rand]);
}
loadNew();
__________________________________________________ ____________
Can I change this so the 3 swf files load in sequence rather than randomly? Also, how do I set the alpha so each one fades in rather than just pops up?
Thank you very much.
pug
Importing Multiple Images
I am using MX 2004.
Is there a way to import multiple jpg images into individual frames one after another on a sigle layer?
Thanks,
Brandon
Preloading Multiple Images
hi evryone.
i'm pretty new to actionscripting, so this my sound really stupid and basic - but i really tried looking it up in the forum and didn't come up with an answer...
i'm making a website for an architect, to show his portfolio. i want to keep all the images and texts external, and load them into the site dynamically. this was never a problem (i'm not THAT new to flash), but this time i'm trying something different - each project is shown in an external SWF loaded into the main SWF. i want the project SWF to load all the images for a project first (showing a nice preloader) and then the user can browse the images smoothly. the images are supposed to load into an empty movieClip.
the question is how do i pre-load all the images and actionscript the buttons to change the image shown in the empty movieclip.
hope i managed to explain myself... and thanks in advance.
Loading Multiple Images All At Once?
Hi
I want to load six jpegs and six mp3s into my movie when it starts. Despite reading quite a few tutorials I am still unsure of the best way to do this.
At the moment I am using MovieClipLoader for the images. I create a new MovieClipLoader object:
[script]
// set up MovieClipLoader for images
var myMCL = new MovieClipLoader();
myMCL.onLoadInit = function(targetMC) {
// do stuff when image loads
[/script]
Then I call a function that loads the images using a loop:
[script]
loadImages = function():Void {
for (var i:Number=0; i<nTiles; i++) {
var tile_mc:MovieClip = _root.createEmptyMovieClip("tile"+i+"_mc", i);
tile_mc.createEmptyMovieClip("button_mc", 1);
var sImage:String = "_images/" + i + ".jpg";
myMCL.loadClip(sImage, tile_mc.button_mc);
};
};
[/script]
It works OK but Im unsure about how to create a preloader that displays a percentage value for the total amount of all the images Im downloading. IE: 0% would be no images downloaded, 100% would be all 6 images downloaded.
Am I even doing the right way so far? Should I be waiting until each image is fully downloaded before I download the next one?
If downloading them all at once is OK, how do I build one preloader for all the images as described above?
Thanks in advance
thesquirrel
Load Multiple Images?
hi,
how would you use MovieClipLoader to load in multiple images one after the other with say a for loop? it seems to me that the the next image couldn't be loaded until the previous was, but if that one wasn't loaded correctly how would it skip that and move onto the next etc??
thanks for any help
boombanguk
Preloading Multiple Images
Hey everyone,
I'm having some trouble and I was wondering if someone could help me out or point me in the right direction.
I want to create a slideshow of dynamically loaded images, but instead of having a preloader for each image as they are accessed i'd like to load all of the images simultaneously and have a preloader that calculates the percentage of the progress of all the simultaneously downloading images.
thanks in advance,
Jimmy
Preloading Multiple Images
I have a dynamic website created and I need to figure out a way to preload the images and show the user a percentage value while the images are loading, and then run the website so that it will run smoother. I have been searching the internet for the last couple of days but unfortunately i've had a lot of trouble figuring this out. If someone could point me in the right direction or show me some code that does this it would be greatly appreciated.
thanks,
James
[F8] Multiple Images In A Scrollpane
hi,
just started messing around with scrollpanes. i can happily load a jpeg from an external folder into the scrollpane but i want to load lots of images from the folder. is this possible?
i'm setting the contentpath as a constant value in the component inspector window, rather than setting it in actionscript.
is there buzzword for selecting all the files contained in a folder?
eg. flash/images/"buzzword"
i'm using a mac if that makes any difference.
cheers,
dave.
[F8] Help With Centering Multiple XML Images Please
I've read several threads on centering images in a movieclip. Basically I'm loading several images dynamically into a scrolling movieclip - portfolio style in a row. When you rollover the image the image enlarges.
My problem is that the images all load at their top left hand corner so that when you rollover and enlarge the image they also enlarge the image at the top left hand corner. I need them to load at the center so when they enlarge they also enlarge from the center. I have tried many different variations in trying to make this happen but I can't seem to get it to work. I've manage to get the entire movieclip to center according to the first loaded image - but obviously that's no good.
If anyone could help, I would sooooo appreciate it! I'm a bit of a newbie at AS - I hope I explained myself. Here's my code....
Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
thumbnails = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
thumbnails[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
thumbnails_fn(i);
}
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images1.xml");
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._xscale = target_mc._yscale = 75;
target_mc._x = hit_left._x+(target_mc._width+5)*k;
target_mc.pictureValue = k;
smoothImageLoad(thumbnails[k], target_mc);
target_mc.onRollOver = function() {
this.swapDepths(thumbnail_mc.getNextHighestDepth());
this.onEnterFrame = function() {
this._xscale = this._yscale += 5;
if (this._xscale>101) {
delete this.onEnterFrame;
}
}
};
target_mc.onRollOut = function() {
this.onEnterFrame = function() {
this._xscale = this._yscale -= 5;
if (this._xscale<76) {
delete this.onEnterFrame;
}
}
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}
MCL To Preload Multiple Images From XML
hi there,
i'm having a nightmare trying to create multiple instances of the moviecliploader to preload many images referenced from an XML file. i want a preloader for each image but it only ever shows the last one. i think thats because i can't increment the moviecliploader variable name and so after cycling through the for...loop, only the last iteration preloader is shown. i've tried writing the loading portion in a seperate function but got confused as to where i was targetting. i've tried many other ways with temporary references and extra arrays with no luck. the code is below:
PHP Code:
this.createEmptyMovieClip("container_mc", 0);
var gotx:XML = new XML();
gotx.ignoreWhite = true;
var pics:Array = new Array();
var captions:Array = new Array();
var holders:Array = new Array();
gotx.onLoad = function() {
//trace("onLoad");
var photos:Array = this.firstChild.childNodes;
for(i=0; i < photos.length; i++) {
//ADDS PICTURES TO ARRAY
pics.push(photos[i].attributes.pic);
captions.push(photos[i].attributes.caption);
//GENERATES HOLDER FOR MOVIECLIP WHERE PICTURE IS LOADED
container_mc.createEmptyMovieClip("holder"+i, (10+i));
//ADDS HOLDERS TO ARRAY
holders.push(container_mc["holder" + i]);
//trace(holders);
//GENERATES HOLDING CLIPS FOR EACH PICTURE
container_mc["holder" + i].attachMovie("clip", "clip"+i, (10+i), { _x:0, _y:(i * 225) });
//CREATES TEMPORARY REFERENCE TO EACH HOLDER
var rollHold = holders[i];
rollHold.captionValue = i;
//LOADS EACH PICTURE INTO A HOLDING CLIP
//container_mc["holder" + i]["clip" + i].loadMovie(pics[i]);
mcLoader.loadClip(pics[i], container_mc["holder" + i]["clip" + i]);
var mcListener:Object = new Object();
mcListener.onLoadStart = function(target_mc:MovieClip) {
trace("started");
attachMovie("counter", "counter"+[i], (500+i), { _x:0, _y:(i * 10) });
}
mcListener.onLoadComplete = function() {
trace("finished");
//removeMovieClip("counter"+[i]);
}
mcListener.onLoadProgress = function(target_mc:MovieClip) {
//attachMovie("counter", "counter"+[i], (1000+i), { _x:0, _y:(i * 50) });
}
mcListener.onLoadInit = function(target_mc:MovieClip) {
removeMovieClip("counter"+[i]);
}
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(mcListener);
mcLoader.loadClip(pics[i], container_mc["holder" + i]["clip" + i]);
//ROLLOVER BEHAVIOUR FOR EACH IMAGE USING TEMPORARY REFERENCE
rollHold.onRollOver = function() {
//trace("allow that");
trace(photos[this.captionValue].attributes.caption);
}
rollHold.onRelease = function() {
//trace("allow that");
caption_txt.text = photos[this.captionValue].attributes.caption;
}
}
}
gotx.load("autumntry4.xml");
//
i've seen what i want working on many sites so it can't be too tough. this has been driving me nuts all day and i've searched loads of threads and tutorials but not found an answer. can anyone help me???
cheers,
dave.
Moving Multiple Images..
There is probably a simple solution to this problem, but unfortunately I do not have a clue.
I loaded multiple .pngs to the stage (80), but they are mapped to the wrong X, Y positions. I need to move all of them to a specfic X, Y location without changing the position one at a time. They are all mapped to seperate keyframes. I have tried a few methods, but with no luck. If there is a simple solution plase let me know.
Thanks.
Loading Multiple Images At Once
Hey There,
I am having problems loading 4 images at once into 4 different place holders. I am trying to simply load the jpg image, then when its finished loading, fade on:
_root.loadIMG("large1","loader1");
_root.loadIMG("sm1","loader2");
_root.loadIMG("sm2","loader3");
_root.loadIMG("sm3","loader4");
Then to actually load the image into (filename, movietarget) I use:
function loadIMG(image, movie) {
movName=eval(movie);
movName.loadMovie("flImages/"+image+".jpg");
this.onEnterFrame = function() {
l = movName.getBytesLoaded();
t = movName.getBytesTotal();
if (l == t && movName._width>1) {
_root.flashon(movName);
delete this.onEnterFrame;
}
};
}
However 1 random image loads then the rest fail to load. Is this becuase its deleting the function for the rest of the image loads, or perhaps l & t arent unique variables when its called more than one time?
Any help greatly appreciated!
Thanks!
MovieClipLoader For Multiple Images
I use a MCLoader to load several images from within a FOR loop. What would be a simple and effective way to:
a) monitor the progress (e.g. with a preloader) for all the images at once, not separately for each one
b) wait for the mcloader to finish loading all the images before proceeding with the next part of the code (e.g. before calling any further methods)
Thanks in advance
Loading Multiple Images At Once
Hello,
I'm developping a site that must load about 100 small images at once. I noticed that the player seems to drop some of the requests sometimes. I coded a queue system to avoid this but this means loading them one after the other. I'm just wondering if anybody encountered the same problem, and if anyone has a better solution.
Thanks,
Joseph
Load Multiple Images
Hi All,
I have an issue with loading images into a flash movie. This function only displays the last image loaded. I have a feeling that the other loaded images are underneath it, all set to the same dimensions and coordinates. I wonder if there is a pause code sort of thing that would stop the loop until the image has been loaded and the dimensions etc changed.
Code:
function init_images() {
j = 1;
while (j<(images+1)) {
filename = eval("template_data.image"+j+"filename");
foldername = template_data.foldername;
x1 = eval("template_data.image"+j+"x1");
y1 = eval("template_data.image"+j+"y1");
x2 = eval("template_data.image"+j+"x2");
y2 = eval("template_data.image"+j+"y2");
x1 = x1*zoom;
y1 = y1*zoom;
x2 = x2*zoom;
y2 = y2*zoom;
_global.imgx1 = x1+framex1;
_global.imgy1 = y1+framey1;
_global.imgx2 = x2+framex1;
_global.imgy2 = y2+framey1;
var image_mc = "image"+j;
image_mc.removeMovieClip();
window.createEmptyMovieClip(image_mc, window.getNextHighestDepth());
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
target_mc._x = imgx1;
target_mc._y = imgy1;
target_mc._width = Number(imgx2-imgx1);
target_mc._height = Number(imgy2-imgy1);
};
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip((domainURL+"client_data/"+foldername+"/"+filename), this.window[image_mc]);
j = j+1;
}
}
Any help with why this only displays the last image would be greatly appreciated.
Thanks
Worked-Over
Multiple Images Loading
Hello!
I'm doing an images gallery and I want all the images to load just one time, and then display them one after the other without loading.
It should look like the images gallery on this page :
http://www.joshuadavis.com/
hope someone can help me.
Thank you and best regards
Multiple Images In Textfield
hi,
i'm trying to load multiple images into an html formatted textfield but they stack on top of each other rather than butting up against one another as i want. i see other people have had trouble.
is there a way around this???
cheers,
dave.
Help With Showing Multiple Images
Hi
I've a prolbme displaying multiple images by using ActionScript 3.0
I store image names in an Array
and want to display the images one by one
but I just simply don't know how to do it
If you have time please enlighten me.
Here is my code
var loader:Loader = new Loader();
var url:Array = new Array();
for (var i = 0; i < imageArray.length; i++) {
url.push(imagesFolder + imageArray[i].name);
}
var urlRequest:URLRequest = new URLRequest(url[0]);
loader.load(urlRequest);
addChild(loader);
The above code just shows the only first image store in the array but I want to show all one by one.How?
Thank you
Loading Multiple Images In IE...
Hi,
I encountered a very strange problem (probably bug) while loading multiple images from IE. Flash is very simple (code is stripped version of match larger program) it contains simple for loop that loads image 20 times, and COMPLETE handler that position image.
Running application from Flash IDE is ok, but if user run flash embeded into html from IE (IDE auto generated html) and interrupt loading (closes IE tab (not whole IE, just tab)) next load of same html stop working. What is event more strange, is that image url entered in addres field of IE will not work?!?!
To conclude, to reproduce this behavior: run html from IE and close tab in middle of loading process (after few images loaded). Running html again will not work (or typing image url into address). NOTE that tab must be closed (not whole IE). Closing IE and running html again will work normaly.
Is there any idea how to correct this? Note that I used different image links, and any of them have same behavior, so i excluded url as error.
ActionScript Code:
// flash have TextArea named 'trt' on stage (x:319, y:15, w:135, h:366)
var nxy:Number = 0;
for (var i=0; i<20; i++) {
var loader:Loader = new Loader();
loader.load(new URLRequest("http://maptp12.map24.com/map24/webservices1.5?action=renderMapImage&cgi=Map24RenderEngine&mid=xxxxxx&cgi=Map24RenderEngine&iw=256&ih=256&cmd0=MOV&nav0=NORTHWEST&x0|0=100&y0|0=80"));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete2);
}
function onLoadComplete2(e:Event) {
trt.text += "LOADED
";
var l:Loader = e.target.loader;
l.x = l.y = nxy;
nxy += 10;
addChild(l);
}
stop();
I reproduce same behavior on Vista with IE7 and on XP with IE7. On firefox it works ok.
Also, flash program is used for map display (tiled map images), like gmaps.
P.S.
It seems that any flash based map viewer have this error: flash yahoo maps have same issue, www.flashearth.com too, and also google flash based map have sam error.
Loading Multiple Images...
Hi there.. im guess what - a beginner!! ive played around in flash cs3... and know a little.. but here is the probs.. i have 40 images, which form a flash image..
here check it out http://www.anclchess.net/j/anclLogo.html..
now the problem is.. those images are perfectly clear beautiful pics!! but as a swf they are notttttt clear.. well. the file is about 160kb.. so.. im guessing that.. i need to preload the images right? then it will look as it does on my pc? (which is perfectly clear)..
ok, well ive been searching google for hours.... and.. i have found plenty of preloaders and code, but not exactly what i want..
how should i go about this guys? do i need a preloader? should i put the code into an actions frame in the above .swf file? or should i make a seperate preloader file and like it? and.. how would be veryyyyyy useful
ok.. thank you for listening to my probs
hope to hear from you soon..
jeffers
Loading Multiple Images
I am trying to load 3 images inside a movie clip using the following code:
Frame 2:
-----------------
PHP Code:
image1Loaded = false;
currentQuestion = _root.quiz.questions[_root.cq-1];
currentImage = currentQuestion.childNodes[1].attributes.src;
holder_mc = this.createEmptyMovieClip('holder', 1);
holder_mc.loadMovie(currentImage);
monitor1_mc = this.createEmptyMovieClip('monitor1', 2);
holder = holder_mc;
holder._alpha = 0;
monitor1_mc.onEnterFrame = function(){
var loaded1 = holder.getBytesLoaded();
var total1 = holder.getBytesTotal();
if(total1 > 15){
if(loaded1 >= total1){
trace('completely loaded');
delete this.onEnterFrame;
image1Loaded = true;
gotoAndPlay(3);
}
}
}
stop();
-----------------
Frame 3:
-----------------
PHP Code:
if (image1Loaded == true) {
holder._x = 11;
holder._y = 119;
holder._width = 125;
holder._height = 90;
holder._alpha = 100;
play();
} else {
gotoAndPlay(2);
}
-----------------
Frame 10:
-----------------
PHP Code:
image2Loaded = false;
currentQuestion = _root.quiz.questions[_root.cq-1];
currentImage2 = currentQuestion.childNodes[2].attributes.src;
holder2_mc = this.createEmptyMovieClip('holder2', 3);
holder2_mc.loadMovie(currentImage2);
monitor2_mc = this.createEmptyMovieClip('monitor2', 4);
holder2 = holder2_mc;
holder2._alpha = 0;
monitor2_mc.onEnterFrame = function(){
var loaded2 = holder2.getBytesLoaded();
var total2 = holder2.getBytesTotal();
if(total2 > 15){
if(loaded2 >= total2){
trace('completely loaded');
delete this.onEnterFrame;
image2Loaded = true;
gotoAndPlay(11);
}
}
}
stop();
-----------------
etc. until image 3 is loaded
This doesn't work when the movie is first served. You have to refresh to get all the images. Any ideas on problems with this code or can you over any guidance on a better approach to load 3 jpegs.
Many thanks,
Adrian
Multiple Images Questions
Hi,
I am a total beginner with Flash however I have bought a template for my website and wish to make some additions to it.
Basically when the template loads up it always has a main image present and the page options down one side. What I would like to do is have multiple images set for the opening image so that everytime you enter the site you will view a different main image.
I'm sorry if I haven't explained this correctly. If you follow this link www.gsa.ac.uk and hit refresh a few times you should get what I mean.
Is there some sort of online guide I can follow to do this ?
Thanks
Euan
Preloader For Multiple Images
I want to create a preloader which loads multiple images at a time.
i tried the normal script with getBytesTotal() but it provides the bytes of currently loading image, so the preloader only works for one image at a time.
how can i get the size of all images that i want to load ?
Thanks
Multiple Images In A ScrollPane
Hey. I want to add multiple images (in movie clips) to a scrollPane, and it's giving me more problems than I think it should. I thought of adding many images to one movie clip, but what I may end up doing is switching the order of the images several times, so I began to think of another way.
What I have now is a scrollPane with two movie clips in it. They are on top of one another. I thought that I should be able to leave the y value of one at 0 and set the other so that it's 200 and then they would scroll one after the other. I haven't been able to get this to work. Is this something that is do-able within a scrollPane, or not? I'm working the best I can with the AS, but it's still new to me.
Thank you for your insight. Create a great day.
Loading Multiple Images In IE...
Hi,
I encountered a very strange problem (probably bug) while loading multiple images from IE. Flash is very simple (code is stripped version of match larger program) it contains simple for loop that loads image 20 times, and COMPLETE handler that position image.
Running application from Flash IDE is ok, but if user run flash embeded into html from IE (IDE auto generated html) and interrupt loading (closes IE tab (not whole IE, just tab)) next load of same html stop working. What is event more strange, is that image url entered in addres field of IE will not work?!?!
To conclude, to reproduce this behavior: run html from IE and close tab in middle of loading process (after few images loaded). Running html again will not work (or typing image url into address). NOTE that tab must be closed (not whole IE). Closing IE and running html again will work normaly.
Is there any idea how to correct this? Note that I used different image links, and any of them have same behavior, so i excluded url as error.
P.S. I use IE 7 under the Vista, but IE 7 with XP also have same behavior.
Thanks
Attach Code
// flash have TextArea named 'trt' on stage (x:319, y:15, w:135, h:366)
var nxy:Number = 0;
for (var i=0; i<20; i++) {
var loader:Loader = new Loader();
loader.load(new URLRequest("http://maptp12.map24.com/map24/webservices1.5?action=renderMapImage&cgi=Map24RenderEngine&mid=EVAL_MAPNETWORK_NT_EUROPE&cgi=Map24RenderEngine&iw=256&ih=256&cmd0=MOV&nav0=NORTHWEST&x0|0=100&y0|0=80"));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete2);
}
function onLoadComplete2(e:Event) {
trt.text += "LOADED
";
var l:Loader = e.target.loader;
l.x = l.y = nxy;
nxy += 10;
addChild(l);
}
stop();
Load Multiple Images In A Row
hi..
I am going to make a simple gallery in flash
I have a html-file with 10 <img>'s in a row. but when i load that htm-file into flash every single image is on the same place, and the last image is on top..
How do you solve this problem?
Multiple Images, ONE Loading Bar
My deepest apologies if this has already been discussed. I recently checked out the Image Slideshow tutorial here at Kirupa, and loved it. The only problem is that the images load one by one, and therefore a preloader bar comes up for every image. I was wondering if there is a way for Flash to read the XML file, load all the images at once using ONE preloader bar at the start, and THEN go through each image in the slideshow. Anyone have any knowledge about this?
Many thanks,
Agra
Preload Multiple Images From XML
Hi,
i am using XML to load multiple images to flash. Now my vision is to make some kind of preloader. What is the best way to know that all images are loaded?
Thanks!
|