Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








[CS3] Problems Loading Images From External Urls Into Flash Movie


Hi All,

I created a continually scrolling horizontal panel of images which are loaded via XML from an external server.

However i get strange results when im playing the movie. Sometimes all the images load without a problem but occasionally the loading process will stop on one image and cause the movie to stop working.

Because i load all of the images into the flash movie first, this means that the movie never shows any images.

Does any one have any idea whay externally hosted images may not load correctly?

My code is the following:


PHP Code:




import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;

var home:MovieClip = this;
var xml:XML = new XML();
var curX:Number = 0;
var curX2:Number = 0;
var curTX:Number = 0;
var curTX2:Number = 0;
var nodes:Array;
var numOfItems:Number;
var i:Number = 0;
//variable declarations to hold the values
var thisWidth:Number;
var thisHeight:Number;
var thisWidth2:Number;
var thisHeight2:Number;
var maximumHeight:Number;//height to which movieclip to be resized
var maximumWidth:Number;//width to which movieclip to be resized
var maximumHeight2:Number;//height to which movieclip to be resized
var maximumWidth2:Number;//width to which movieclip to be resized
var oldx:Number;
var oldy:Number;
var oldx2:Number;
var oldy2:Number;
var ratio:Number;
var ratio2:Number;
var mclis:Object = new Object();//An object that listens for a callback notification from the MovieClipLoader event handlers.
var mclis2:Object = new Object();
var temp:MovieClip;
var temp2:MovieClip;
var startX:Number = 0;
var checker = true;
var speed:Number = 1;
var centerX:Number = Stage.width / 2;
_root.createEmptyMovieClip("slider",3000);

xml.ignoreWhite = true;

block1_mc._visible = false;
block2_mc._visible = false;

xml.onLoad = function()
{
    nodes = this.firstChild.childNodes;
    numOfItems = nodes.length;
    loadImages();
}

function loadImages()
{
    var t:MovieClip = home.block1_mc.attachMovie("item","item"+i,100+i);
    var z:MovieClip = home.block2_mc.attachMovie("item","item_"+i,100+i);
    temp = t;
    temp2 = z;
    
    home.load_txt.text = "Loading Photo "+(i+1)+" of "+numOfItems;
    
    t.image = nodes[i].childNodes[0].firstChild.nodeValue;
    
    t.image_mc.loadMovie(t.image);
    z.image_mc.loadMovie(t.image);
    _root.mcl2.loadClip(z.image, z.image_mc);


    this.onEnterFrame = function()
    {
        percent = Math.ceil((t.image_mc.getBytesLoaded()/t.image_mc.getBytesTotal())*100);
                
        if(percent == 100)
        {
            if((t.image_mc._width > 200) && (z.image_mc._width > 200)){
                
                /////////////////////////////  load images into block 1  /////////////////////////////////
                
                _root.thisHeight = t.image_mc._height;//loaded movieclip height
                _root.maximumHeight = 305;
                _root.thisWidth = t.image_mc._width;//loaded movieclip width
                _root.maximumWidth = 830;
                ratio = thisHeight/thisWidth;//calculation ratio to which resize takes place
    
                if (thisWidth>maximumWidth)
                {
                    thisWidth = maximumWidth;
                    thisHeight = Math.round(thisWidth*ratio);
                }
                if (thisHeight>maximumHeight)
                {
                    thisHeight = maximumHeight;
                    thisWidth = Math.round(thisHeight/ratio);
                }
                
                top = Math.round((maximumHeight-thisHeight)/2);
                t.image_mc._width = thisWidth;//applying new width
                //temp._width = thisWidth;
                t.image_mc._height = thisHeight;//applying new height
                //temp._height = thisHeight;
                t.image_mc._x = curX;
                t.image_mc._y = top;
        
                curX = curX + (thisWidth + 20);
                startX = startX + (thisWidth + 20);
                
                /////////////////////////////  load images into block 2  /////////////////////////////////
                
                _root.thisHeight2 = z.image_mc._height;//loaded movieclip height
                _root.maximumHeight2 = 305;
                _root.thisWidth2 = z.image_mc._width;//loaded movieclip width
                _root.maximumWidth2 = 830;
                ratio2 = thisHeight2/thisWidth2;//calculation ratio to which resize takes place
    
                if (thisWidth2>maximumWidth2)
                {
                    thisWidth2 = maximumWidth2;
                    thisHeight2 = Math.round(thisWidth2*ratio2);
                }
                if (thisHeight2>maximumHeight2)
                {
                    thisHeight2 = maximumHeight2;
                    thisWidth2 = Math.round(thisHeight2/ratio2);
                }
                
                top2 = Math.round((maximumHeight2-thisHeight2)/2);
                z.image_mc._width = thisWidth2;//applying new width
                //temp._width = thisWidth;
                z.image_mc._height = thisHeight2;//applying new height
                //temp._height = thisHeight;
                z.image_mc._x = curX2;
                z.image_mc._y = top2;
        
                curX2 = curX2 + (thisWidth2 + 20);
            
            
                if(i+1<numOfItems)
                {
                    i++;
                    loadImages();
                }
                else
                {
                    home.block1_mc._x = 0;
                    home.block2_mc._x = 0-startX;
                    home.block1_mc._visible = true;
                    home.block2_mc._visible = true;
                    home.load_txt._visible = false;
                    delete this.onEnterFrame;
                }
            }
        }
    }    
}

xml.load("images.php?boat_id="+_root.boat);

_root.onMouseMove = function()
{
        speed = (centerX-_root._xmouse)/80;
}

_root.slider.onEnterFrame = function()
{
            
    if(_root.block1_mc._x > 900){
        _root.block1_mc._x = _root.block2_mc._x - startX;
    }
    if(_root.block2_mc._x > 900){
        _root.block2_mc._x = _root.block1_mc._x - startX;
    }
    
    if(_root.block1_mc._x < (0-startX)){
        _root.block1_mc._x = _root.block2_mc._x + startX;
    }
    if(_root.block2_mc._x < (0-startX)){
        _root.block2_mc._x = _root.block1_mc._x + startX;
    }
    
    if (_root._xmouse > 415){
        _root.block1_mc._x += speed;
        _root.block2_mc._x += speed;
        checker = false;
    }
    if (_root._xmouse < 415)
    {
        _root.block1_mc._x += speed;
        _root.block2_mc._x += speed;
        checker = false;
    }
    if(checker == true)
    {
        _root.block1_mc._x -= speed;
        _root.block2_mc._x -= speed;
    }
}







The xml code im generating from images.php is:

PHP Code:




<?xml version="1.0" ?>
- <boats>
- <boat_advert>
  <media>http://www.website.net/pictures/main/Sunseeker_Manhattan_74_2001_64_main.jpg</media>
  </boat_advert>
- <boat_advert>
  <media>http://www.website.net/pictures/main/2007121564164_plan.jpg</media>
  </boat_advert>
- <boat_advert>
  <media>http://www.website.net/pictures/main/2007121564164_1.jpg</media>
  </boat_advert>
- <boat_advert>
  <media>http://www.website.net/pictures/main/2007121564164_2.jpg</media>
  </boat_advert>
- <boat_advert>
  <media>http://www.website.net/pictures/main/2007121564164_3.jpg</media>
  </boat_advert>
- <boat_advert>
  <media>http://www.website.net/pictures/main/2007121564164_4.jpg</media>
  </boat_advert>
- <boat_advert>
  <media>http://www.website.net/pictures/main/2007121564164_5.jpg</media>
  </boat_advert>
- <boat_advert>
  <media>http://www.website.net/pictures/main/2007121564164_6.jpg</media>
  </boat_advert>
- <boat_advert>
  <media>http://www.website.net/pictures/main/2007121564164_7.jpg</media>
  </boat_advert>
- <boat_advert>
  <media>http://www.website.net/pictures/main/2007121564164_8.jpg</media>
  </boat_advert>
- <boat_advert>
  <media>http://www.website.net/pictures/main/2007121564164_9.jpg</media>
  </boat_advert>
- <boat_advert>
  <media>http://www.website.net/pictures/main/2007121564164_10.jpg</media>
  </boat_advert>
- <boat_advert>
  <media>http://www.website.net/pictures/main/2007121564164_11.jpg</media>
  </boat_advert>
- <boat_advert>
  <media>http://www.website.net/pictures/main/2007121564164_12.jpg</media>
  </boat_advert>
- <boat_advert>
  <media>http://www.website.net/pictures/main/2007013102325564_13.jpg</media>
  </boat_advert>
- <boat_advert>
  <media>http://www.website.net/pictures/main/2007121564164_14.jpg</media>
  </boat_advert>
- <boat_advert>
  <media>http://www.website.net/pictures/main/2007121564164_15.jpg</media>
  </boat_advert>
- <boat_advert>
  <media>http://www.website.net/pictures/main/2007121564164_16.jpg</media>
  </boat_advert>
  </boats>




FlashKit > Flash Help > Flash ActionScript
Posted on: 12-01-2008, 11:35 AM


View Complete Forum Thread with Replies

Sponsored Links:

Loading Text, URLs, And An Images Via XML
Why wont this work? Ive checked out a couple tuts and XML with its child and nextChild nodes are driving me insane. I cant get these dynamic text instances, links, and images to load dynamically from my XML document. Help!

View Replies !    View Related
Loading Text, URLs, And An Images Via XML
Im stumped! Why wont this work? Ive checked out a couple tuts and XML with its child and nextChild nodes are driving me insane. I cant get these dynamic text instances, links, and images to load dynamically from my XML document. Its gotta be Monday! Help!

View Replies !    View Related
Loading External Images Loading Bar (Movie Clip)
I have managed to have external images loaded with the progress bar. However, when I place these items into a movie clip the preloader no longer works. can someone please take a look at the flash file for me.

http://www.bloggot.co.uk/file.zip

View Replies !    View Related
Loading External Images Into Movie
Hello,

I am wondering if someone can share the knowledge about the most appropriate way to create a flash file that will be able to get external images from some kind of code (XML or some cookies) that will have a path to the image that will be needed to download into flash movie. The problem is that the path will be all the time different. As a result I'd like to know how can I make the flash file reading that path from XML file and then download the image into flash.
It is kind of challenge for me. I never did something like that.
Any advice is highly appreciated. Maybe there are some examples. It would be the easiest way to learn about it.

Many thanks in advance.

View Replies !    View Related
Loading External XML Images Into A Movie Clip
I'm trying to load an external image thru an XML file, into a empty movie clip, so that I can control it after thru AS

This is the code I'm using, but It dosen't seem to work properly.


Quote:





var imageLoader:Loader;
var boxX:int = 0;
var myXML:XML;
var myXMLList:XMLList;
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.load(new URLRequest("assets/xml/bottom.xml"));
xmlLoader.addEventListener(Event.COMPLETE, xmlComplete);

function xmlComplete(evt:Event):void {
myXML = new XML(evt.target.data);
myXML.ignoreWhitespace = true;
myXMLList = myXML.caseStudies.children();

for (var i:int = 1; i <= myXMLList.length(); i++) {
imageLoader = new Loader();
imageLoader.load(new URLRequest(myXML.caseStudies["jpgURL"+i]));
MovieClip["box_"+i] = MovieClip(imageLoader.content);
["box_"+i]x = boxX;
boxX = i * 86;
["box_"+i]addChild(imageLoader);
}
}

View Replies !    View Related
Scrolling Movie With Invisible Buttons That Link To External URLs
I need to build a Flash movie similar to the one at www.avantafcu.org, which I'm assuming uses invisible buttons to link to the external URLs. How do I make the buttons travel with the movie as it travels to the left of the viewing area?

TIA for your help.

View Replies !    View Related
Loading External Images Into Flash
Currently I'm working on a simple car game with simple graphics that I did in a 3D software. I'm wondering if the car can run smoothly if i load the jpegs which contain my 3D graphics externally? cuz if it's smooth i'm goin for full screen (1024x768) otherwise i would have to reduce my jpeg file size and my game screen will be much smaller. Please advice.

View Replies !    View Related
Loading External Images In Flash 2004?
Hello,

I am wondering about the easiest way to count the percentage of loaded bytes of the loaded external images into flash movie. I need to completely load an external image into flash movie before telling to go and play next frame.

Any advise is highly appreciated.

Thanks.

View Replies !    View Related
Loading External Images To Flash At Run-time
I have a map (created in Flash MX) which consist of many location node's represented by the 'square' icon (image in JPEG format, 3KB in size). It will take nearly 50 seconds to load all the icons (more than 90 icons) and display it on the map. I'm using actionscript to fetch the icons from server.
Few questions to ask here :- Hope you expert guys out there can hands the help.
1. What's is the best way to load all the icons in terms of design, coding and technology wise.
2. How to make faster loading time of icons?
3. Is there any possibilities to load and save the icons(images) to local PC (using cache) for future local-loading?
4. What about using XML for loading images?


Icon Table
ID status url blink
1 11 yellow.jpg 1
2 12 red.jpg 1


ASP coding
---
strSQL = "select * from map_ico"
Set rs = objConn.Execute(strSQL)

i = 0

While Not rs.EOF
Response.Write "&ico_status" & i & "=" & rs("status")& "&<br>"
Response.Write "&url" & i & "=" & rs("url")& "&<br>"
Response.Write "&blink" & i & "=" & rs("blink")& "&<br>"'add for
i = i+1
rs.MoveNext
Wend

Response.Write "&icoNum=" & i & "&<br>"
---


Actionscript coding
----
_root.icoUrls.splice(0);
_root.icosNum = lvData.icoNum;

for (i=0; i<lvData.icoNum; i++) {
_root.icoUrls[i] = new icoUrlClass(lvData["ico_status" add i],lvData["url" add i],lvData["blink" add i]);

}

some codes here
for(j = 0; j<_root.icosNum; j++){
if(_root.icoUrls[j].status == lvData["ico" add i]){

eval("_root.summary" add i).ico.url = _root.icoUrls[j].url;
eval("_root.summary" add i).ico.gotoAndStop(2);

break;
}
}

----

View Replies !    View Related
Flash Banner Loading External Images
Hi all. Glad to join the community. Now, on to the matter at hand:

I am designing a banner with rotating (that is, constantly loading new images) images. Basically, it loads a random image every 8 or so seconds. My problem is this: without any transition effects or the correct actionscript (which is the point of the question basically) I am unable to have one image load smoothly over the previous image.

What happens now is while the image is being called, via getURL(), there is a short period of time when the previous 'movie' or image is unloaded and there is nothing displayed.

I would like to be able to have the 1st image fade out while the second image fades in. OR even just not have that 'nothing' time where nothing is being displayed.

I realize there are many questions similar to this. however, I am having a hard time find an answer that does NOT deal with either a preloader screen or buttons or both. This will be going on automatically, or behind the scenes if you will. I suppose I may not have looked hard enough, but I have found it difficult figuring out what specifically to search for. So, I have finally ended up at this, from what I have seen thus far, really great site that seems too have a lot of very intelligent people who are familiar with Flash.

If you have any suggestions, please help. If it would help for you to see my current .fla or see the action script (since that's really all it consists of, since I"m just loading external content) let me know.

Thanks a lot in advance!!

View Replies !    View Related
Loading External Images Into The Flash Object
im working on a flash site for my freind's design company, and i want to know if it is possible to be able to keep a file which has pics and info on it and just load the info from there, without having to re-publish the .fla after every update.

In other words, i want to be able to load pics and descriptions from an external file.

I would appreciate all the help i can get! Thanks

View Replies !    View Related
Loading External Images Into Flash Via HTML?
Hey I have a flash banner at the top of my page that I want to stay the same when you click on a button in the navigation (which are standard HTML links). Here is the URL so you can understand what Im trying to do http://www.greyfilmpro.com/test.html . Anyways Im trying to figure out how to tell the .SWF banner to load a certain image into its self depending on what button they press in the navigation.

View Replies !    View Related
Use External Images In A Flash Movie
Hi,

i want to use an external image in my movie. This image changes every 10 seconds. How can i get this image in my flash movie? (fscommand?)

tnx!

View Replies !    View Related
Generating A Playlist From A Database Of Urls And Loading Into Flash
I am trying to figure out a way to query an audio database for a series of urls to audio files that I can load into flash and stream one after another.

any ideas?

I have no clue how to even go about this.


Thanks guys.

e
2
1

View Replies !    View Related
Loading External Images Randomly, Getting The Amount Of Images Out A *.txt
hello there!


i've made an a script that loads images externaly from a specific map
randomly. there's only one thing:


how can flash learn to know how many images are loaded?


it's for a client so he can only upload the images and that's it.
can he somehow fill in a *.txt-file that flash can use further???


this is my sourcecode for the external-stuff:

code:

_root.importImage = "background_netomzet"+random(*)+".jpg";



(the * has to be a value that needs to be generated by how many pics
there are in the image map")


thanks a million people!


g

View Replies !    View Related
Loading Images From Flash Movie
I was wondering if there is a way to load images from Flash... my movie starts playing before the entire page has loaded, and my boss didn't like that
If anyone knows a way to do that, please help me!

The problem can be seen at: www.mastro.com.br/mc_eng

Thanks!

View Replies !    View Related
Loading Multiple Images Into One Flash Movie Clip
Is there a way to make it so I can automatically insert my 200 images into 1 big movie clip? So I do not have to add all of them manually?

View Replies !    View Related
A Sample On How To Include Multiple URLs In A Flash Movie
Hi gurus

I am a bit stuck could you help me please!
I am designing at the moment Flash based web site, but my problem is that, how can I include multiple URLs in a Flash movie?
many thanks to you all
newbies
Sahih

View Replies !    View Related
Retrieve All Images Paths/urls From A Webpage
Is there a way to put in a url, and get all of the image paths/urls from that page?

Ideally, I'd like to get the list of images from a google image search.

Thanks!

View Replies !    View Related
Loading External Images (from External Domains)
Hello kirupa users

I had a small problem in my latest work project where i wanted to load images from external domains.
The problem was that i did not know if i really need the checkPolicyFile set to true or if i really need to load the crossdomain.xml to tell flash player where the acces is.
As far as i know, in adobe as3 reference they stated that in order to load images from an external domain (a domain other than the one where the actual swf runs) you need a policy file or a security acces file in order to be able to do that.

My question is:
1: could i load an image from external domains without having to load some external file (or the crossdomain.xml file)?
2: if there is no possibility to load an image without the crossdomain policy why the checkPolicyFile method could take the value of false?

Thanks in advanced!


Regards.

View Replies !    View Related
Loading External Movie Clips Into Flash Movie
I was wondering if anyone could help me, I attached the code below to a button in an existing flash movie in hopes that when it is clicked it would create an empty movie clip on level 1 of the movie with the button and then load an external .swf (from the same directory) into or in place of the empty movie clip. However this isn't working for me does anyone have any suggestions?
--Thanks


ActionScript Code:
on (release) {
_root.createEmptyMovieClip("dummyclip", 1);
dummyclip.loadMovie( "Untitled-1.swf");
}

View Replies !    View Related
Loading External Flash Movie (swf)
Hello,
Until now I have not made a main movie which opens other external movies.
This is ofcours the best solution for, loading and updating sites.
I am just a beginner with action scripting.
Until now I know simpel stuf like "goto, play stop and getting urls"

I have tried to search alot of tutorials on the flashkit tutorials,
But canot find the right anwser for the following problem.

I want to make a page like the classic html pages with diferent frames, or somthing which look like that, in other words on the left e menu buttons, and in the midel diferent movies which has to load when you klik the button.

I have done this here is a preview:
http://www.v-mp.com/Movie test/Main movie.swf

And this is the source file:
http://www.v-mp.com/Movie test/Extern_loading_test.zip

The problem is the following:
I have put the loading movie-script on the layer lower than the "blue mask".
But the loaded movies always playes top of every thing.
I want in between the movies a nice transition, when you klik the diferent movies.
Transition is the yellow square-fade thing which you see.
So I thought to play a transition to play on top, when the external movie is loading under.
Thats not possible now because the loaded movies always playes top of every thing (all layers)
And I also canot return to the main page. the loaded movie only goes away if you load another movie.
And I do not know how to close an loaded movie.
Going to another key frame dosent seem to work.
I think that there is a much easier way to do this.
Please look at the source file.
Please help thanks,

Vighnesh

View Replies !    View Related
FLASH MX Loading External Movie
I have movie (level 0) which loads a menu bar (level 1) into the movie. What is the actionscript code to place the menu where I want it?

Thanks your help
kleb

View Replies !    View Related
Loading An External Flash Movie
Hi
I have this project I am working on with Flash MX 2004. I have a primary flash movie which acts as a menu I guess. This movie has buttons that are supposed to open another flash movie (.swf format). When clicked, the other movie seems to open fine, but there are some formatting issues. For example, the primary movie's background color is white and its size is 1024x768 and the other movies have a blue background and are 640x480. When go from the primary movie to another movie, the background changes properly and the document resizes, but when I go from the other movie to the primary movie the background remains blue and the size is still 640x480. I have tried many different actionscript codes to open the movies, right now I am using loadmovieNum... I should also mention that this is not going to be played through a web browser, probably as an .exe file so I can have it autorun from a CD. I hope this makes sense, any help would be greatly appreciated

View Replies !    View Related
Loading An External Flash Movie
Hi
I have this project I am working on with Flash MX 2004. I have a primary flash movie which acts as a menu I guess. This movie has buttons that are supposed to open another flash movie (.swf format). When clicked, the other movie seems to open fine, but there are some formatting issues. For example, the primary movie's background color is white and its size is 1024x768 and the other movies have a blue background and are 640x480. When go from the primary movie to another movie, the background changes properly and the document resizes, but when I go from the other movie to the primary movie the background remains blue and the size is still 640x480. I have tried many different actionscript codes to open the movies, right now I am using loadmovieNum... I should also mention that this is not going to be played through a web browser, probably as an .exe file so I can have it autorun from a CD. I hope this makes sense, any help would be greatly appreciated

View Replies !    View Related
Loading External Images
How to load external images

View Replies !    View Related
Loading External Images
hie,
I need to load images into a flash movie from an outside directory, i have a movie that take contents from .txt files, and i wan't to let the user to change the images as well, without need of editing the flash.

Is this can be done ?? any idea ??

thanks in advance..

View Replies !    View Related
Loading External Images
I'm trying to load a group of external images (JPG's) into a flash file, and I'm using the LoadMovie command as explained in the Flash MX help files. I want there to be thumbnails of each picture loaded as well, and I am trying to use the original pictures rather than creating actual thumbnail jpgs. However, I am having trouble specifying the smaller size. Sometimes they appear way too big, and the size I specify, for example 50px X 50px, does not really make them that size.

Any suggestions on this? Is there a better way to load external jpgs in Flash MX? I saw someone mention somthing in an old thread about putting a "#p" somewhere but I don't understand what that meant.

Any help would be appreciated.

Thanks

p.s. I don't want to do it some REALLY complex way with like thousands of lines of code.

View Replies !    View Related
Loading External Images
I'm trying to load a group of external images (JPG's) into a flash file, and I'm using the LoadMovie command as explained in the Flash MX help files. I want there to be thumbnails of each picture loaded as well, and I am trying to use the original pictures rather than creating actual thumbnail jpgs. However, I am having trouble specifying the smaller size. Sometimes they appear way too big, and the size I specify, for example 50px X 50px, does not really make them that size.

Any suggestions on this? Is there a better way to load external jpgs in Flash MX? I saw someone mention somthing in an old thread about putting a "#p" somewhere but I don't understand what that meant.

Any help would be appreciated.

Thanks

p.s. I don't want to do it some REALLY complex way with like thousands of lines of code.

View Replies !    View Related
External Images Done Loading?
i'm trying to see in my flash application if all the images were finished loading in the flash document. how could i do something like that?

View Replies !    View Related
Loading External Images
Hi ,

First of all i searched the forum and checked a whole bunch of 'loading external images' threads, and the reason why i'm posting is because i'm getting a bit frustrated that it doesn't work !

What i want to have is this.

2 scenes
- preloader
- main

in the main i have these

myMC.loadMovie("pic01.jpg");
myMC.loadMovie("pic02.jpg");
myMC.loadMovie("pic03.jpg");


All i want to have is a simple preloader that loads those jpg into the cache(because i don't want the preloader to run everytime).

Please please i hope someone can help me !!!!!

View Replies !    View Related
: : : Help With Loading In External Images
Ok.... the problem im having is this :

Im running my web camera at this address

http://www.spotlife.com/users3/gerr...GBR&language=EN

now... it displays an image every 10 seconds and im wanting to pull that image onto my site each time.

So far what ive done is :

Created a movie clip with the instance name of 'picture' and on the 1st frame of that m/c ive put this line of code

loadMovie("http://www.spotlife.com/users3/gerrymckay007/webcam/pic/image.jpg?"+random(9999), picture, "");

Also on the m/c ive added a timer so that it takes the next images every 10 secs which is :

onClipEvent (enterFrame) {
newTime = getTimer();
if (newTime-oldTime>10000) {
this.loadMovie("http://www.spotlife.com/users3/gerrymckay007/webcam/pic/image.jpg?"+random(9999), "");
oldTime = getTimer();
}
}

I get the 1st image but when i goes to get the second it cant for some reason.

Hope you can help me out

Thanx


Oh and the site im trying to get it all working on is www.popcop.co.uk

Have a look at the .fla is u want

View Replies !    View Related
Loading External Images
To whom it may concern-

Hopefully someone on here can help me out. I am having a hard time tracking down a script or 'method'.

I am doing a spoof project in school where I have to build a website for a 'photographer.' So i need to showcase his pictures. I have to create 1 portfolio with 30 photos that been provided to me. The photos are all about 50K each. So naturally I cannot import all of these photos into my movie, the file size would be way to big.

There has to be a way to load each picture individually from the server. There must be a script or scripting that can load the picture from an outside source. I want to be able to have buttons that scroll through the pictures and each picture loads (or preloads) indivually onto the stage from an external position (images folder on the server).

Im not allowed to use thumbnails. Just a back and forth button.

I dont know if someone has a script or tutorial on this. Ive done a bit of researching and cant find something that works. Any help is greatly appreciated!

I am working in Flash MX.

Johnathan

View Replies !    View Related
Loading External Jpg. Images
I want to load external jpgs. into my flash movie, to save file size, can someone explain to me how to load them into movie clips?



please advise?


g.g.

View Replies !    View Related
Loading External Images
Hey. I was hoping someone outthere might know why the following code doesn't completely work. When the button is pressed a couple of variables are sent to a php script, which in tern uses the vars to read the files in a directory, and match certain filenames. the filenames are then sent back to the flash movie. Up until here everything is running smoothly the problems begin when i try to use the filenames sent back, to load the images into flash.

on (release) {
info = new LoadVars();
info['projtype'] = 1;
info['location'] = 0;
info.sendAndLoad('directory.php', info, "POST");
info.onLoad = function() {
for (n=0; n<15; n++) {
this.createEmptyMovieClip(this['newclip'+n], n);
this['newclip'+n]._x = 80;
this['newclip'+n]._y = 60*n;
textbox = 'http://turnoffthe.tv/experimental/directorytest/images/'+this['image'+n];
this['newclip'+n].loadMovie(textbox);
}
};
}

everything is working except for the loadMovie () part. the URL i placed in the variable 'textbox' is the right one. i tried outputing it to a dynamic text box and it is correct. can anyone spot the mistake i have made? anyhelp will be appreciated

View Replies !    View Related
Loading External Images
is there any reason why the following code should not work. the URL is definetly correct.
when i make 'somevar' an input text box and type in the same address it works.

on (release) {
this.createEmptyMovieClip ('newclip')
newclip._x = newclip._y = 120
somevar = "http://turnoffthe.tv/experimental/directorytest/images/i1p1l1.jpg";
newclip.loadMovie(somevar);
}

View Replies !    View Related
Loading External Images
HI i am looking for some help with loading external.jpg images into a movie clip. A button when clicked should load the image into the movie clip 'topClothingMC'. This mc is located on the main stage within two other movie clips, 'PatchContainer. clothingPatch(.topClotingMC)'. The button is within an external swf that is loaded onto the main movie at runtime. I have tried an OOP appreach using the clothingPatch as a container to call a function that loads the image but i cant seem to get any of it to work.

Any help with this would be great.

Phill Jones

View Replies !    View Related
Loading External Images.
I have a lot of images that I want to load into my applet but they are all different sizes. How can I have them be the same size once they are loaded. I know it can be done but I am not sure how.

Thanks

View Replies !    View Related
Loading External Images
Hey Ppl

I would like to create a portfolio in flash. I would like to attach external jpgs to specific buttons, and have the images fade in when the button is clicked. I created a site with images inside flash, but the loading time is too long, especialy that I have to add more images. (www.alvisions.com/test it is a work in progress so many things don't work as they should yet)

Thanks in advance for any help

Paul

View Replies !    View Related
Loading External Images
Hey Ppl

I would like to create a portfolio in flash. I would like to attach external jpgs to specific buttons, and have the images fade in when the button is clicked. I created a site with images inside flash, but the loading time is too long, especialy that I have to add more images. (www.alvisions.com/test it is a work in progress so many things don't work as they should yet)

Thanks in advance for any help

Paul

View Replies !    View Related
Loading External Images
I know it is simple, and have done it before, but I cannot remember how to load an external image. I want to be able to change an image in my presentation without editing the .fla. The image will be saved in the same folder.

View Replies !    View Related
Loading Bar --> External Images
Hi,

Im loosing time on this project. Please help.

I scripted a simple external image gallery of images for a client. it works great except for one thing:

The loading bar only shows when I "simulate download" offline. When its online it just doesn't show?? It just loads all sloppy and says complete before its really complete. I have the bar show the loading for one image at a time and when it's loaded, it starts loading the next image.

Heres it online: http://www.millyny.com/html/collections/index.asp

Heres my script:


Code:

MovieClip.prototype.loadImage = function(ammountOfImages, extention, category, imageWidth, prefix) {
BT = 0;
BL = 0;
loadNum = 1;
percent = 0;
_root.thumbs.buttons._x = 0;
_root.percent_txt.text = "Loading...";
loadMovie("Images/"+category+"/"+prefix+"1"+"."+extention, _root.thumbs.buttons["buttonHolder"+"1"].dropZone);
this.onEnterFrame = function() {
BT = this["buttonHolder"+loadNum].dropZone.getBytesTotal();
BL = this["buttonHolder"+loadNum].dropZone.getBytesLoaded();
percent = Math.round(BL/BT*100);
if (percent<100 && loadNum<=ammountOfImages) {
loadingBar.bar._xscale = percent;
_root.percent_txt.text = percent+"%";
} else {
if (loadNum<ammountOfImages) {
loadNum++;
} else {
loadNum = 0;
delete this.onEnterFrame;
break;
}
trace(loadNum+" of "+ammountOfImages);
if (loadNum<=ammountOfImages && loadNum != 0) {
loadMovie("Images/"+category+"/"+prefix+loadNum+"."+extention, this["buttonHolder"+loadNum].dropZone);
} else {
delete this.onEnterFrame;
_root.percent_txt.text = "";
}
loadingBar.bar._xscale = 0;
}
};
};
d = 2000;
function highestDepth() {
d++;
return d;
}
function loadThumbs(ammountOfImages, extention, category, imageWidth, prefix) {
trace(category);
season.text = category;
toLoad = 0;
if (prefix == undefined) {
prefix = "";
}
for (var i = 1; i<=ammountOfImages; i++) {
_root.thumbs.buttons.createEmptyMovieClip("buttonHolder"+i, i+1000);
_root.thumbs.buttons["buttonHolder"+i]._xscale = 50;
_root.thumbs.buttons["buttonHolder"+i]._yscale = 50;
_root.thumbs.buttons["buttonHolder"+i].number = i;
_root.thumbs.buttons["buttonHolder"+i]._x = (i*(imageWidth/2))-(imageWidth/2);
_root.thumbs.buttons["buttonHolder"+i].xPos = _x;
_root.thumbs.buttons["buttonHolder"+i].createEmptyMovieClip("dropZone", i+1000);
_root.thumbs.buttons["buttonHolder"+i].onRollOver = function() {
this.swapDepths(highestDepth());
this.scaleIt(100, this.xPos-58);
imNum.text = "Image Number: "+this.number;
Scroll = false;
//Mouse.hide()
};
_root.thumbs.buttons["buttonHolder"+i].onRollOut = _root.thumbs.buttons["buttonHolder"+i].onReleaseOutside=function () {
this.scaleIt(50, this.xPos+58);
imNum.text = "";
Scroll = true;
//Mouse.show();
};
}
if (category == "") {
category = "spring03";
}
_root.thumbs.buttons.loadImage(ammountOfImages, extention, category, imageWidth, prefix);
}
Thanks,
Joe

View Replies !    View Related
Loading External Images From A URL
I am making a Flash Powered PhotoGallery but i wanted to know if its possable to load the images from a folder over the net.

EG:

mysite.com/photos
in the folder photos have 10 photo's named what ever

Would i make an array to find the names of each photo in that folder and then load each photo by its array number?

The hole idea was that i didnt have to change the code in the SWF. It would just know that there are 10 photos and if i added another it added it to the array.

Is this possable?

View Replies !    View Related
Loading External Images [F8]
I'm trying to a make a simple file that will load two images on top of each other (one is a smart object) from an external folder.
I've got one loading by using the Loader Component and listing the image path in contentPath under the Parameters tab. How should I load the other or is there an easier way to do this all together.

View Replies !    View Related
Loading External Images
Hi guys, im loading an external image in to my movie using the

myMovie.loadMovie(imageURL);

command, which works fine, but i dont want the rest of the movie to play untill the image has loaded. i tried using the

myMovie.getByteLoaded(); etc etc

method but doesnt seem to work, i tried entering the wrong url for the image (to test it) but it just gave me exactly the same answer as when it was the URL was correct. i guess its giving me the BytesLoaded for the movie the image is being loaded in to rather than the image.

so how can i do this??

View Replies !    View Related
Loading External Images?
I have a questions about:
http://www.fusionwebdesigns.com/web_.../pictures.html

I'm basically using a flash document to load external gif images. I call a loader and than using actionscript call each of them by using:
Picture3.contentPath = "http://www.fusionwebdesigns.com/web_sites/photojam/images/photo_3.gif";

It works fine, except for the fact that the image gets stored in the temporary internet files, and when i upload a new image, it doesn't acknowledge the new image, but keeps the old image.

Are there any ways to make it so flash doesn't store the image in the temporary files, but checks to see if there is a new image each time it is loaded?

Any help would be greatly appreciated.
Thanks,
Chris

View Replies !    View Related
Loading External Images
Hi all,

I'm needing to create a front page which loads images externally. At first, I thought this would be relatively easy - loading images externally isn't a problem - but there are two things that I'm not hugely familiar with:

1) I need to have a random 'main static' image (out of about 8) load each time a user visits the page

2) I also need to have a selection of much smaller images load externally as a slideshow (which will sit on top of the 'main static' image) - also, I'll need those slideshow shots to fade in transition between each other.

Have had a look at some online tutorials for this, and believe it's possible, but haven't found anything quite right.

Any help, hugely appreciated!

Many thanks,
Jon

View Replies !    View Related
Loading External Images
Okay, I know that by itself flash cannot load external .bmp files, but I have to load a bunch of images dynamically and some of them are potentially bmp files. I figured I'd just used PHP to dynamically convert the files to jpgs and then load the jpgs, but apparently PHP with the gd library will only do wbmp images and doesn't like my bmp's. Is there another way to easily convert images on the fly so I can get them into flash.

I've got to find a work around for this because the images are always changing so I can't hardcode them in the swf or convert them ahead of time.

Thanks in advance,

carriker

View Replies !    View Related
Loading Images Through External Swf.
Hello.

Sorry if this has been asked before, but my search did not give any results.

I'm using a 'Window' component in Flash 8, which through the main swf loads an external .swf file. Let's call that one Stuff.swf.

In Stuff.swf, there are several 'Loader' components which loads a bunch of external images. If you watch Stuff.swf by itself these images load just fine. When Stuff.swf is loaded through the window component in the main swf however, the images does not load. Anyone have a clue why and how to solve this?

Also, if I'd want to simply load a movieclip into the window component instead of a .swf. How would I do?

Thanks

View Replies !    View Related
Loading External Images
Here is a basic skeleton of the code I'm using right now:

ActionScript Code:
package {
    import flash.display.Sprite;
    import flash.display.Loader;
    import flash.net.URLRequest;
    public class mapTile extends Sprite {
        var tileImage:String = null;
        var tileLoader:Loader = new Loader();
       
        public function mapTile(fileLoc:String, LocX:int, LocY:int) {
            tileImage = fileLoc;
            tileLoader.load(new URLRequest(tileImage));
            x = LocX;
            y = LocY;
            addChild(tileLoader);
        }
    }
}

What I'm looking to have is something like this:

ActionScript Code:
package {
    import flash.display.Sprite;
    import flash.display.Loader;
    import flash.net.URLRequest;
    public class mapTile extends Sprite {
        var tileImage:String = null;
        var tileLoader:Loader = new Loader();
       
        public function mapTile(fileLoc:String, LocX:int, LocY:int) {
            tileImage = fileLoc;
            x = LocX;
            y = LocY;
            if (!LOADED) {
                tileLoader.load(new URLRequest(tileImage));
                addChild(tileLoader);
            } else {
                addChild(LOADED FILE);
            }
        }
    }
}

The issue I'm having right now is that the first code causes the program to reload an image everytime I want to make a new instance of it. The problem is that I'm not sure how I can store a loaded image.

My first idea was to create an array of loaders, but the loaders seemed to have issues being used more than once. My class file doesn't have any way to check if a file has been loaded and I don't know how to store those loaded files.

Any suggestions on how to do this would be helpful.

View Replies !    View Related
Loading External Images
Ok for some reason whatever I do to try to proload images doesnt work, heres the code I have:


Code:
grass.loadClip("images/grass.jpg");
grass._x = x0;
grass._y = y0;
It wont work... ive tried a ton of variations but it doesnt want to load the image... anything wrong with the code?

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved