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




Loading External Image Into A Blank _MC



can someone tell me how to add an image into a blank movieclip using XML please that would help thanks.....................................



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 01-10-2006, 08:00 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Loading A Blank Mc From An External Swf
I was wondering if this was possible:
I have swf1 that has a button to getUrl as _self for swf2, in swf2 i have 3 buttons, each calls swf3,4,5 (respectivly) into the same blank movie clip called "clipper" and they are called all on the same level. So...i press a button in swf1 to goto swf2 and press one of the 3 buttons in swf2 to load either swf3,4,or 5 into level 2.

MY question:
I am creating a tree menu of the site/ pages....How would it be possible to access from a button on the main stage in menu_swf, swf2 with either swf3,4, or 5 called into "clipper" ? Therefore in menu_swf i can press a button and it would lead me to swf2 (via get url and loaded as _self) with swf3 displaying, or swf4 or swf5.

I guess I would like to: from swf1, getUrl as _self, to swf2, and instigate one of the buttons in swf 2 to load one of the external swfs (3,4,5), all from a button in swf1. Can that be accoplished?

I'm having such a problem cause i'm using flash 5 and can't use button names

thank you.

Loading External SWF - Blank Output Message
Hello. I have been trying to get this external SWF by panoweaver inside of another SWF. Say to mask it. I have the following code in the main frame, just for testing purposes, a blank scene:


Code:
var bgLoader:Loader = new Loader();
addChild(bgLoader);
var bgURL:URLRequest = new URLRequest("pw.swf");
bgLoader.load(bgURL);
However, when I run the movie-- It comes up with the output window with a blank output message and no movie is loaded. Do you have any ideas?

Thanks,
Jon

Loading External Swf Into A Blank Movie Clip
i have my main timeline that has a blank movie clip.

the main timeline loads an external swf that houses the menu.

i want the menu to be able to load external swfs in the blank movie clips in the parent time line.

say the instance title for one of the blank movie clips is window1.

the button that i want to coorespond to that movie clip has the actionscript

ActionScript Code:
on (release) {
loadMovie("about.swf", "_parent.root.window1");
}
ive tried some other variations of that with out luck as well.

help asap would be appreciated.

Loading External Swf Files Into Blank Movie Clip
Im having some troubles getting this to work... ive done it before but i cant remember how i did it and i no longer have work to look back on.

I set up a button with the following action script


Code:
on (release) {
movieContainer.loadMovie ("peacenews.swf",".swf")
}
The file im trying to load is peacenews.swf and the instance name of the empty movie clip is movieContainer Am i doing this wrong... this seemed like it would work logically to me but then again... im a flash trainee

Yogi

Loading External Swf Files Into Blank Movie Clip
Im having some troubles getting this to work... ive done it before but i cant remember how i did it and i no longer have work to look back on.

I set up a button with the following action script


Code:
on (release) {
movieContainer.loadMovie ("peacenews.swf",".swf")
}
The file im trying to load is peacenews.swf and the instance name of the empty movie clip is movieContainer Am i doing this wrong... this seemed like it would work logically to me but then again... im a flash trainee

Yogi

Having Problems Loading An External File Into A Blank Movie Clip In The Parent Movie.
alright I have a main swf. and there is an empty movie clip called window1.

I have an external swf that is loaded that contains the menu. i have the clip loaded into level 14.

i am having problems having the menu load an swf into the empty movie clip.


Code:
on (release) {
loadMovie("about.swf", _parent.window1, "GET");
}
in firefox, the code above loads the swf, but it replaces the menu. it does the same thing in ie.


Code:
on (release) {
loadMovieNum("contact.swf", _parent.window7, "POST");
}
and this bit of code makes the swf open in another browser tab in firefox, and in ie it replaces the whole parent movie.

I need the menu and the parent movie to stay intact.

i really need help with this asap.

Having Problems Loading An External File Into A Blank Movie Clip In The Parent Movie.
alright I have a main swf. and there is an empty movie clip called window1.

I have an external swf that is loaded that contains the menu. i have the clip loaded into level 14.

i am having problems having the menu load an swf into the empty movie clip.


Code:
on (release) {
loadMovie("about.swf", _parent.window1, "GET");
}
in firefox, the code above loads the swf, but it replaces the menu. it does the same thing in ie.


Code:
on (release) {
loadMovieNum("contact.swf", _parent.window7, "POST");
}
and this bit of code makes the swf open in another browser tab in firefox, and in ie it replaces the whole parent movie.

I need the menu and the parent movie to stay intact.

i really need help with this asap.

Loading External Image > Image Appears Invisible
Hé,

I'm not posting here very much, so hi to anyone new.
I tried search for a solution to my problem, but I couldn't find one.

I'm using a button to load an external image:

code: on (Release) {
_root.temp.loadMovie("img.jpg");
}

Don't worry, both img.jpg and _root.temp (a box-shaped MC) excist.

When I press the button, _root.temp should be swaped by the image. Instead, it disappears, but no image appear. I have absolutely no idea what I'm doing wrong! I'm using Flash MX btw.

Here are my files:

http://www.cmd.tech.nhl.nl/users/regne200/test/

Loading External Image N2 MCs
Can we call an external .jpg or .gif into an 'empty' movie clip of a Flash movie?

Just got a call from a guy who wants me to call an external image into a premade Flash template which contains an imported image which will be overlayed.

I don't hava all the details, but it's like this. The Flash template is a mailbox overlay of like tole painting or some crap like that.

He wants to be able to have a folder in which a customer submits the image of his/her mailbox, it drops into a folder and is immediately read, via loadvariables (of some sort) and the customer can see what a beautiful mailbox it would be with the elfen paintings on it, via the overlay template.

I know how to bring in text and .swf movies, but I'm not having much luck bringing in straight up .jpg or .gif images per loadvariable.

Any guidance would be greatly appreciated. Thanks.

External Image Loading?
Hi, I already posted this question, but the solutions didn't help...

Now I've attached a file, so if anyone can help me?

I want to load an external image(.jpg) into a movie...

What am I doing wrong?

I've used loadmovie().

Thx already,

ilClandestino

Loading External Image In MC Only Once
I wonder if anyone would be kind enough to help me out.

I'm trying to load an external image into a placeholder inside a MC that reloads everytime the fame is loaded. Because of this the image loads time and again and i get a screen flicker. Can anyone tell me the code to load the image at the begining of the swf and only call it once inside the mc.

I'm a actionscript newbie and i'm just using the following to load the image inside the mc and then resize it:

loadMovie("images/image02.jpg", "pic01");
_width = 21;
_height = 21.4;
resize("pic01", _width, _height);

I know i'm probably being dumb, but i just don't know how to do it

Loading External Image
Im trying ot load an external image with this line:


Code:
_root.a1.loadMovie("./imgs/a1.jpg");
I used it on another scene, and it worked ok. But on the scene this line is, the image do not appear. I assure you the name and path of the image is correct, and that the MC is called "a1".
This is not the first time it happens.
Any ideas?
Thanx in advance

Loading External Image
Hi,
Can anyone explain to me how do I load an image into an empty movieclip that I used to load a text file. Is loading the text file and image the same way?

Cheers

External Image Loading Help Please
I am currently trying to load 10 different jpgs into a tweening movie (basicly fadeing in from alpha 0) and these will follow a simple time line one fadeing in after another, i can do this with swf files, but this needs to be done with jpgs from another directory.

External Image Loading
I need soime help retrieving an external image using actionscript. I tried loadMovie(), attachMovie, and loadVariables() but it doesn't seem to respond. Perhaps I'm using them wrong. The attached fla file is a partial sample. the process is simple: click on Project button (left) and the project image and description pops ups (right). can someone help me out with this seemingly simple problem. Thanks in advance.

External Image Loading
for (a=0;a< My_TotalSlides;a++)
{
thumbnails_mc.createEmptyMovieClip(("t" + a), (1001+a));
thumbnail[a] = My_ParentNode.childNodes[a].attributes.filename;
thumbnails_mc["t" + a].loadMovie("photos/" + thumbnail[a], 1001+a);
thumbnails_mc["t" + a]._xscale=20;
thumbnails_mc["t" + a]._yscale=20;
_root.mcwidth=thumbnails_mc["t" + a]._width;

}


The above script works fine expect for the last line (_root.mcwidth=thumbnails_mc["t" + a]._width. can anyone please help? I need to know the width of the images that are being loaded.

Loading An External Image
Hi -

I have a page with text variables that load external text from a .txt file.

I also want to be able to define an image to load from the same .txt file and be next to the imported text on the page.

How can I do this?

iam using CS3 and AS3 also...

Thanks

External Image Loading
I have created a slideshow using LoadXML. The slideshow changes images every 3 seconds and there is a manual navigation element as well where the user can stop the show and go forward and back with individual buttons. The problem I am having is that sometimes the image does not load quick enough but the slideshow moves on.. missing some images. How do I tell flash to make sure the image as loaded completely before continuing on to the next image?
any help would be greatly appreciated.

Help Loading External Image
hi all
i need to know how to load external image with scale it down like the loader component but i don't want to use the loader component

thanks

Loading External Image
Hi,
Can anyone explain to me how do I load an image into an empty movieclip that I used to load a text file. Is loading the text file and image the same way?

Cheers

Loading External Image
Hi,
Can anyone explain to me how do I load an image into an empty
movieclip that I used to load a text file. Is loading the text file
and image the same way?

Cheers

External Image Loading
I’m looking to load random backgroud jpg’s into a Flash movie upon load. These images will just sit there looking pretty. Ultimately, I will likely have an additional image with a higher “depth” that I will set a blend mode on – blending with the stationary background images.

My questions:
Is a loader instance the best “container” for this approach?
Would using a Sprite be a better practice & why?
Commonplace to put loader instances inside(as children) of sprites? – beneficial here?
Anything wrong with sending various images to the same loader instance or is that the logical solution?

Thanks

working test so far


PHP Code:



//constructorsvar imgLoader:Loader = new Loader();var sRequest:URLRequest = new URLRequest("images/bg/plants.jpg");//event handleimgLoader.addEventListener(Event.COMPLETE, onComplete);imgLoader.load(sRequest);addChild(imgLoader);function onComplete(evtObj:Event):void{        trace("loaded");    }//----------------------------------------------------//test button to verify multiple images go into single loadervar spr:Sprite = new Sprite();spr.graphics.beginFill(0xFF0000, 1);spr.graphics.drawRect(0,0, 100, 22);spr.graphics.endFill();var btn:SimpleButton = new SimpleButton();btn.upState = spr;btn.overState = spr;btn.downState = spr;btn.hitTestState = spr;btn.useHandCursor = true;btn.x = 20;btn.y = 20;btn.addEventListener(MouseEvent.CLICK, clickHandler);addChild(btn);function clickHandler(event:MouseEvent):void {          imgLoader.load(new URLRequest("images/bg/tulips.jpg"));     } 

Loading An External Image
From the tutorial "Loading an external image" I learned how to load an image externally using AS3. My question is how do I apply tweens to the image once it is dynamically loaded. I was able to do a simple motion tween but I couldn't figure out how to stretch it, resize it, or even see the image to make sure the crop works within the design of the page. Any thoughts?

Loading External Image
Hi,
Can anyone explain to me how do I load an image into an empty movieclip that I used to load a text file. Is loading the text file and image the same way?

Cheers
:( :( :confused: :confused:

Help With External Image Loading
I am new to Flash and have been searching for an answer that I could understand to solve this problem, but I cannot.

I realize that there may be a better way to do what I'm doing, but this is the best way I could figure it out.

I have create a simple scrolling slideshow and used the UILoader component to make external images load into each frame.

However, after I did this, the images load each time the slideshow changes so I have a second of just white background before the next image shows. How do I make this a smooth transition? Do I need to create code to have the external images preload and stay loaded while the movie is running?

I have attached my .fla file and photos. Please advise!

~Mike

Movie Loading Into Bankmc Is Loading Blank After Its Been Published
I created this site where it loads movies into a blankmc on in the main Fla file. It works fine when I view it on my computer. And Broadband connections show no problem. But on dial up connection. when you click a bar on the navigation. The fla movie loads in blank. You have to click another button then click on the previous but to load. Why is that?
here is the site (its for some community developer)
Doubletree Lake Estates

Thanks for you time..Let me know if you need to see the file and I'll attach it.

Patrick

Loading An Image From An External Source
how can i load an image from an external sourse when my project has been compiled.

i want to be able to load an image into my flash project from a certain url.

can this be done?

Lookin For Help(loading External Image)
as we can load the external text file by using
loadvariable;

what i want to ask is?
is it possible to load external image.

External Image Loading Whha?
Does anybody know if thres a way to load an external image into a flash movie? I'm trying to make a dynamically updatable portfolio that loads using LoadVariable so I have the text ready but I want to put images too. Any help would be appreciated.

Loading External Image Files
I am trying to find the best or easiest method to load external image files into a movie... Any ideas?

THANKS!

Loading An External Image In Movie
Hi,

I want to display an external image(gif, jpeg,png,...) into a flash movie at a certain position.

can anyone help me out?

thx already,

ilClandestino

Loading External Image Problem
I am using flash mx when i use

loadMovieNum("image.jpg", 1);

to load an external image in a movie it appears at the top left of the screen if the image size is smaller than my movie size.
How to currect this if i want the position of my movie to be at x 100 and y 200 or is there some other way.

Thanks for any help in advance .

Loading External Image Under Mask?
Hi all,

I noticed that my question comes up quite often, but I haven't seen a definite answer on this. Is it possible to load external images into a movie under a mask?

I am using Flash MX 2004. I hope someone can help me out here.

Currently I am using the following code:
Code:
loadMovie("pic1.jpg", "_root.fotoblok.picholder");


I also tried to no avail:
Code:
loadMovie("picholder.swf", "_root.fotoblok.picholder");


Thx in advance.

Regards,

RF

HELP External Image-loading Problem
hey there!

i'm making a website for a client of mine.
i've made an dynamic textbox where he can type in his own text.


my question is:

can he also (up)load pictures somehow without having a perticular place reserved for it on the flashpage? like in the textbox or whatever??


hope you can help me out
thanks a million!

[F8] External Image Loading Woes
Not everything is in the most cleaned up of states because I'm just trying to get it working before I refine it all. If you'll test the movie you'll see in console something like:

DEBUG: loadNewImage: finished loading images/ad7.jpg (43084bytes) in holder: _level0.images.holder1
DEBUG: holder: its loaded and width=573 and height=362 and totalBytes=43084

But some of those images will be of width and height 0, which, of course, means they won't show up at all. The movie clip is supposed to resize correctly when the image is finished loading. It seems like some of them do and some don't. It changes each time I run it. The fla and the images I'm using are attached.

Here's one bit of code:

Code:
function loadNewImage(url:String){
myMC.loadMovie(url);
this.onEnterFrame = function() {
myMC.stop();
myMC._visible = false;
if (myMC.getBytesLoaded()>25 && myMC.getBytesLoaded() == myMC.getBytesTotal()) {
trace("DEBUG: loadNewImage: finished loading " + url + " (" + myMC.getBytesLoaded() + "bytes) in holder: " + this);
status_txt.text = "url = " + myMC._url;
loadedStatus = true;
myMC._visible = true;
//myMC._width = 500;
//myMC._height = 500;
trace("DEBUG: holder: its loaded and width=" + myMC._width + " and height=" + myMC._height + " and totalBytes=" + myMC.getBytesTotal());

this.onEnterFrame = undefined;
}
}
}
A smaller issue is that of the next and previous buttons. There's a function on the third frame of the Advertising scene called checkFades() that is supposed to call fadein and fadeout function in the next_btn_mov and previous_btn_mov symbols when they're at the last or first image in the series. It doesn't and, of course, since this is flash there are no errors giving indication of whats wrong.

Thx in advance.

Loading External Swf On Sliding Image
hi there

I was looking through the flash demos on flashkit, for examples of what I am trying to do, I found something but the problem I have now is trying to understand what script is used to load in an external swf.

For example the zip folder example_01.zip attached to this thread contains the fla example. there are three buttons at the bottom, when you click the button the image slides across to the next section. Because this is done with the script

on (release) {
/:xpos = "647.4";
}

the number being the position along image, how do I then get an external swf to load in once the image has slides across into positon. I understand I could just attach a 'loadMovieNum' to the buttons, but this would mean that the movie loads in straight away as soon as button is pressed before the image has stopped sliding into position. Does this make any sense????

basically ,once the image has stopped moving into position I would then like an external swf to load in.

get any one explain a little more on how this is done, I'm still trying to get my head round action script so please go easy : ) Please would you have a look at the example file and tell me what you think!

....many thanks

External Image Loading Problem
Hi, i've made a gallery, which loads external jpg's using loadMovie("images/"+ct.text+a+"1.jpg", "img1");. Everything was perfect until i uploaded it to the server. The images don't come up. Any idea what happened? If u need some more details go ahead, i dunno what else to add.

MX 7.0, AS 2.0, WinXP.

Loading External Image Slideshow
Does anyone have any info on creating a slideshow that loads external images? I only want to load about 10 and then for it to end on a final frame... just not sure how to do it... any help would be greatly appreciated!

Loading An External Image And Using It's _height Value
I'm trying to load images of varying heights that will have text loading underneath the images, dynamically from an XML source. This is working in multiple sources, not just the flash.

The major problem I'm having is that I'm trying to get the _height value from the image that is loaded into the movie in the NEXT part of the code, to set the text beneath it.

No matter what I try I can't seem to get the code to 'wait' for the JPG to load before taking the _width value for the text, so it comes out as '0'.

Forgive the code being a mess, I've been trying so many things, here's the core of the specific problem area:


Code:
var thumbListener:Object = new Object();

thumbListener.onLoadInit = function(thumb_container:MovieClip) {
thumb_height = thumb_container._height;
};

var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(thumbListener);

var currentThumb_mc = createEmptyMovieClip("thumbnail_mc"+portfolioLoopIndex,portfolioLoopIndex);
currentThumb_mc._y = portfolioCounter;
var thumb_container = currentThumb_mc.createEmptyMovieClip("thumb_container",portfolioLoopIndex);
mcLoader.loadClip(""+portfolioNode.childNodes[4].firstChild, thumb_container);

[F8] External Image Loading Woes
Not everything is in the most cleaned up of states because I'm just trying to get it working before I refine it all. If you'll test the movie you'll see in console something like:

DEBUG: loadNewImage: finished loading images/ad7.jpg (43084bytes) in holder: _level0.images.holder1
DEBUG: holder: its loaded and width=573 and height=362 and totalBytes=43084

But some of those images will be of width and height 0, which, of course, means they won't show up at all. The movie clip is supposed to resize correctly when the image is finished loading. It seems like some of them do and some don't. It changes each time I run it. The fla and the images I'm using are attached.

Here's one bit of code:

Code:
function loadNewImage(url:String){
myMC.loadMovie(url);
this.onEnterFrame = function() {
myMC.stop();
myMC._visible = false;
if (myMC.getBytesLoaded()>25 && myMC.getBytesLoaded() == myMC.getBytesTotal()) {
trace("DEBUG: loadNewImage: finished loading " + url + " (" + myMC.getBytesLoaded() + "bytes) in holder: " + this);
status_txt.text = "url = " + myMC._url;
loadedStatus = true;
myMC._visible = true;
//myMC._width = 500;
//myMC._height = 500;
trace("DEBUG: holder: its loaded and width=" + myMC._width + " and height=" + myMC._height + " and totalBytes=" + myMC.getBytesTotal());

this.onEnterFrame = undefined;
}
}
}
A smaller issue is that of the next and previous buttons. There's a function on the third frame of the Advertising scene called checkFades() that is supposed to call fadein and fadeout function in the next_btn_mov and previous_btn_mov symbols when they're at the last or first image in the series. It doesn't and, of course, since this is flash there are no errors giving indication of whats wrong.

Thx in advance.

Loading An Image From External XML File?
Hello! I am trying to load an external image via an external XML file into Flash. I have Flash loading a CSS and XML file ... which works great ... but I want to call an image to load in as well ... how can I do this? The only threads that I have found regarding this are tut's for NON external XML. Thank you so much.

Sincerely,
Brian Griffith

Help In Loading External Image And Sacle It Down
hi all

I need help to know how to load external image and scale it down dynamically like the loader component

thanks

Loading External Image And Scale It Down
i need to know how to scale loaded image without making the photo's width to big or it's height to big like the loader component dynamically not manually out width and height every photo i want id automatically like the loader component or if you know the dragSlideFade Class
or can you explain it for me if you can

that is what i mean click here

Loading External Image From Xml And Resizing
flash cs3 timeline code:


Code:
var band_load:String = "Thrice";
var image_xml:XML;

var xmlReq:URLRequest = new URLRequest("http://ws.audioscrobbler.com/1.0/artist/"+band_load+"/topalbums.xml");
var xmlLoader:URLLoader = new URLLoader();

function xmlLoaded(event:Event):void
{

image_xml = new XML(xmlLoader.data);


//SIMILAR ARTISTS

var imgLoader:Loader;


var slide:Sprite;
slide = new Sprite();
//slide.width = 10;
//slide.height = 10;
slide.x = 10;
slide.y = 10;
addChild(slide);

imgLoader = new Loader();
imgLoader.load(new URLRequest(image_xml.album[0].image.medium));

slide.addChild(imgLoader);

}

xmlLoader.load(xmlReq);
xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
i dont know how to resize the loaded image, if i use


Code:
slide.width = 10;
slide.height = 10;
nothing is displayed . if i remove these 2 lines, everything works fine but my image is not the right size

Problem Loading External Image
Im having some problem loading an image from and external URL.

When I try and load the image from the same directory it works fine.


ActionScript Code:
requestbg=new URLRequest("demoskin1.jpg");
bgloader.load(requestbg);

But when i try to load it from an external URL


ActionScript Code:
requestbg=new URLRequest("http://venturia.dnsalias.com:85/skins/demoskin1.jpg");
bgloader.load(requestbg);

I get the following error :
Code:
Error #2044: Unhandled IOErrorEvent:. text=Error #2124: Loaded file is an unknown type.

Loading An External Image Into A Movieclip.
I may be missing something painfully obvious here but I cannot seem to find it.

Basically I want to pull in an external image, place in in a movieclip on my stage and have it actionable, as in have that movieclip performs actions for example be moveable around the stage by the user. However when I load in an image onto the mc it becomes static, almost part of the background, regardless or what actions are set on the mc.

Can anyone help here please?

Loading External Image Problem
Hello, when I click a thumbnal in a photo gallery it tells the playhead to go to a certain frame, and on that certain frame an external image is loaded using frame actions:
Code:
emptyclip.loadMovie("1.jpg");
It works fine, but when I view other photos and then go back to that same picture (same frame actions) the photo disappears and loads again which looks bad. Since the photo is already loaded, how do I prevent it from disappearing and reloading again? How to make the loadmovie run only once and delete itself while keeping the photo in the emptyclip? Anyone have this problem before?

Loading External Image Into A New Window...
I am working on an online catalog for someone, and he wants a bigger version of each image to pop up in a new window when clicked upon. I have the javascript, but what would be the proper code for the button? Would I have to make a swf out of each graphic and use LoadMovie or can I just use plain graphic files, like .jpg?

Problem With Loading External Gif Image
Hi
I want to load gif image form external url but it didn't work but the same action work with .jpg file. why ?

Note:
I'm using flash cs3 & AS 2.0

code I m using

var mcHolder:MovieClip = this.createEmptyMovieClip("mcHolder", this.getNextHighestDepth());
var mclLoader:MovieClipLoader = new MovieClipLoader();
var oListener:Object = new Object();
mclLoader.addListener(oListener);

oListener.onLoadInit = function(mcContent:MovieClip) {
mcContent._xscale = 35;
mcContent._yscale = 35;
}

mclLoader.loadClip("

Copyright © 2005-08 www.BigResource.com, All rights reserved