ActionScript 2.0 :: Loading Jpegs Into Movieclips?
Jul 26, 2005
I have filenames of Jpegs stored in a MYSQL database. The filenames are returned with other information by PHP to Flash as variables.
I have some dynamic text boxes that have the variables set so that the textual information is displayed but I would also like a movieclip that behaves in the same way but with the pictures.
How do I create some form of movieclip that reads the variable pic1 that is returned from PHP.
View 1 Replies
Similar Posts:
Oct 20, 2004
I have a gallery that reads an ms access database using asp and then loops through an array of records and duplicates an empty movieclip for each record. jpeg is then loaded into the movieclip and then a variable for the _x position is incremented and then the next one is loaded etc.I then use the same method to add the necessary labels for the images by duplicating a movieclip and adding a text fieldThis is all fine and produces a gallery of images but the problem comes when I try and position the labels according to the height of the image. I have tried every method I can think of to check the image attributes which are only available when it is fully loaded, but I keep getting a value of 0.
Code:
stop();
// Set variable holding image folder path
[code].....
View 1 Replies
May 31, 2004
I wanted to know the method to do a dynamic loading of jpegs with click of a button with crossfade between the two jpegs
View 2 Replies
Mar 31, 2010
How to load a series of images locally from a folder and create a movie clip for each one dynamically?
View 2 Replies
Apr 22, 2004
I've used loadMovie() often in the short time I've been using Flash. But never to load a JPEG dynamically. For a site interface, I have little thumbnails, which open to new browser windows. This is partly annoying though, as each one opens in it's own window, so the user would have to close a whole bunch of 'em after clicking all those thumbnails. To try to fix this, I read that JPEGs can be loaded at runtime onto the stage. I've already seen the photo gallery tut, but I only require a pop-up window with one image and no left/right buttons, etc. I've tried following the tutorial for the first few steps, making a shape the size I want the images to be, converting it to an MC, and naming the MC instance on the stage. Then, I created a new layer on frame 1 with
Code:
loadMovie("CS_00_1.jpg", _root.picture);
, but when testing it, I see nothing. I've tried a few different things. Before, the fla was in a separate folder, so I had to include "Screens/" in the name. Just in case that was the problem (I didn't get any errors in the Output), I moved it into the directory with the images. I tried absolute and relative addressing. I opened up the image in PS and resized it to the size of the symbol on the stage and made sure it wasn't Progressive (I read in a thread that Flash doesn't load Progressive JPEGs), but still nothing. I even tried loading a file that didn't exist to make sure it was looking in the right place the other times (as it didn't give me any error).
View 6 Replies
May 2, 2005
on Flash MX 2004 having problems with loading external jpegs and stuff. I got a tutorial from here and loading from a web address on it is okay,
but I can't get my one to load from my hard drive because there is always an error with the path. I know it'll ultimately be on line anyway but I want to know what I'm doing wrong.[code] What's the correct format for putting in a file path?
View 3 Replies
Mar 15, 2007
II'm trying to create a title page where two movie clips fade in. One is a dynamic text movie clip, the second is an image that is loaded.[code]I've traced the heck out of this, so all I know is that image_mc seems to only generate a single onEnterFrame event and then stops.It seems that if I comment out the .loadMovie line, the placeholder movie clip fades in properly, so obviously there is something about onEnterFrame events and loadMovie that I don't know.
View 2 Replies
Apr 22, 2004
I've used loadMovie() often in the short time I've been using Flash. But never to load a JPEG dynamically. For a site interface, I have little thumbnails, which open to new browser windows. This is partly annoying though, as each one opens in it's own window, so the user would have to close a whole bunch of 'em after clicking all those thumbnails. To try to fix this, I read that JPEGs can be loaded at runtime onto the stage. I've already seen the photo gallery tut, but I only require a pop-up window with one image and no left/right buttons, etc. I've tried following the tutorial for the first few steps, making a shape the size I want the images to be, converting it to an MC, and naming the MC instance on the stage.
Then, I created a new layer on frame 1 with Code:
loadMovie("CS_00_1.jpg", _root.picture);
But when testing it, I see nothing.
I've tried a few different things. Before, the fla was in a separate folder, so I had to include "Screens/" in the name. Just in case that was the problem (I didn't get any errors in the Output), I moved it into the directory with the images. I tried absolute and relative addressing. I opened up the image in PS and resized it to the size of the symbol on the stage and made sure it wasn't Progressive (I read in a thread that Flash doesn't load Progressive JPEGs), but still nothing. I even tried loading a file that didn't exist to make sure it was looking in the right place the other times (as it didn't give me any error).
View 6 Replies
Dec 7, 2011
We have photos that are loading too slowly and I need to speed them up. I am using AS2. What's even more perplexing is that at certain times after refreshing the web page, some photos load and some do not. It seems to be random, at various times, the photos that did load do not. I cannot put my finger on why this is happening..
First, I tried using loadMovie(). Then, I tried the var loader:
MovieClipLoader = new MovieClipLoader(); with loadClip()
For each JPEG. You are welcome to look at the site and see if there is anything that I can do to improve the speed of the loading. [URL]
View 0 Replies
Apr 27, 2007
Does anyone have a loading solution that allows for loading swf's, jpegs and is fully customizable? My duct tape solution had been to have loaders in every swf that i was planning to load in- but this feels silly. I've tried a couple of components from the adobe exchange but they lacked a bit of elegance. Whether it's a class or example file- I just want to be able to smoothly load content into the parent- where the loader also resides.
View 2 Replies
Oct 31, 2009
I'm getting a bald patch on my head from frustration with the following problem. I have a parent AS3 swf which loads in a AS2 swf like so;
stop();
var ldr:Loader = new Loader();
ldr.load(new URLRequest( "as2child.swf"));
addChild(ldr);
contained in the AS2 file is the following script which loads in jpegs when the user clicks the next button, etc.
[Code]...
however when you view the AS2 swf via the AS3 swf it does not seem to load in the jpgs when requested.
I need to retain the AS2 file so cannot rewrite in AS3 as the image loading thing is only a small part of the AS2 file.
View 1 Replies
Dec 13, 2004
I've found the loader component handy in loading JPEGs and scaling them to the specified size. However, I've found it a little annoying that when the image is loaded, sometimes you can see the image in it's original size for a fraction of a second before it's resized to fit the loader. Is there any way to avoid this -- such as the loader only being visible after the image is resized?
View 1 Replies
Jul 19, 2009
I've read that when loading swf's it's a good idea to load them into a MovieClip. Is that true, why and would a Sprite do as well. Also how is it done?I thought this would do.
var currentPage:MovieClip = new MovieClip(); var loadRequest:URLRequest = new URLRequest("home.swf"); var swfLoader:Loader = new Loader(); swfLoader.load(loadRequest); currentPage.addChild(swfLoader);
[code].....
View 7 Replies
Nov 9, 2009
i used this code with linkage to load a movieclip from library using flash action script 3
btn.addEventListener(MouseEvent.MOUSE_UP,goLayersS ite);
function goLayersSite(Event)
{
var myMovieClip:MovieClip = new Tree();
empty.addChild(myMovieClip);
}
i want to know how am i able to load a flash movie clip from my current library into my stage with using a button via flash action script 2.
since im using other codes in action script 2 i can not cancel them and i really need to load a movie clip in my AS2 FLA.
View 1 Replies
Feb 5, 2009
I'll do my best to keep this question as short as possible:
I've made 5 'fruit' movieclips and they're in my library.
And using so.addVariable("getNumber", "003"); in my HTML code, I'd like those particular fruit movieclips to play one after the other (and then loop).
I've had a look around for something similar, without luck, so I'm trying to make it from scratch. I got as far as getting it to load the first number and then the first type and url, but I'm stuck on getting to go onto the next type, also being able to define (with addVariable) which number's nodes gets played.
Here's an example of my XML to show the structure.
Code:
<?xml version="1.0" encoding="utf-8"?>
<list>
<number="001" >
[Code].....
View 1 Replies
Mar 17, 2009
I'm making a game where I have a lot of movie clips that I need to load so I was wondering wheather ActionScript 3.0 allowed us to load external movieclips? Can we import an external display object (movieclip) into a display object container? Or do I have to load a .swf which contains the movieclip onto the stage? What happens if I need to pull in multiple .swf files can the movieclips overlap or will one .swf file block the user from viewing the .swf in a lower depth? Can I import the movieclip from the external .swf file from its library and add it to the main stage rather then adding the whole .swf to the main stage?
View 11 Replies
Aug 20, 2009
Basically I have this movieclip on stage that is suppose to load another movieclip from an swf. in that swf are 31 copies of the movieclip since theres no duplicateMovieclip function in as3. I am able to load and add child to the movieclips easy with this,
PHP Code:
function duplicateMovieclips():void{
for (var i=0; i<movieclipsToLoad; i++){
movieclipsDuplicated++;
entrys_mc.addChild(mcV[i]);
Below (which I excluded) are other various bits of code to edit the movieclip and what not. I can also remove it just fine with this bit of code here
PHP Code:
function removeF():void{
var repeat:int = 0;
for (var i=0; i<timesToRemove;i++){
entrys_mc.removeChild(mcV[i]);
repeat++;
movieclipsToLoad--;
if(i == timesToRemove-1){
loadSelected(); //THE PROBLEM
}}}
What this swf is trying to do is record the year and the month the user clicks on and then return every day's data from the xml if a day is filled out. when removeF(); executes, i get the error:
Code:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
Pointing at entrys_mc.removeChild(mcV[i]);...but when its NOT there, loadSelected(); that is, it works just fine. I even put a trace statement in it. The whole if condition works fine to.
LoadSelected is the one that retrieves the text needed to load in the movieclip. whatever year and month the user selects, it loads the information of it and puts it in a string. then it displays in the dynamic text field inside the movieclip. Also, when SWF loaded it loads all 31 movieclips using this.
Code:
for (var i = 0; i < 31; i++){
var groupMC:MovieClip=MovieClip(clip.getChildByName("group" + i));
mcV.push(groupMC);
trace("repeat # = " + i);
}
View 15 Replies
Feb 11, 2010
Loading in Movieclips instead of images
View 6 Replies
Aug 8, 2010
I start off my game with an empty movieclip located in the middle of the stage. I then load a movieclip using the loadMovie method. At some point I would like to unload the movieclip and then reload another one, sort of a different scene if you will. The new movieclip has a number of other nested movieclips that I will use as buttons and I have coded a function that is called that creates these buttons. Here's what it would look like:[code]The roomSetUp function contains info on how the room should look and the button codes. The problem is that the setup function runs before the new movieclip is loaded. Seems that there is no way to have Flash 'Yield' until the movieclip is loaded and then go to the last function. Any suggestions other than MovieClipLoader?
View 2 Replies
Sep 22, 2010
I have several Movie Clips in the Library which I need to be able to load and bring up on the screen randomly.The code below shows how I can load one of these, but to get a proper control ideally I would like to load them all in to an array or numbered variables so that they can be called from a simple piece of code and actioned one at a time.
My movieclips can all be called something simple like mc1, mc2, mc3, mc4 etc to make things easier.These need to be referenced in to an array mcContainer[.....] or as mcContainer1, mcContainer2........ so that they can be called easily.I just need to know the simplest way to do this and how i reference them, I have tried several ways like ["mc"+i] etc and nothing seems to work.
Code:
var mc:mcLogo=new mcLogo();
addChild(mc);
View 4 Replies
Feb 25, 2010
I have several buttons that on mouse over will load a library movie clip. I want that movieclip to load on top of everything then once it's played allow me to either replay that movieclip by hovering over the button again or play a different movieclip by hovering over another button etc etc. with the ability to repeat this.
My code below currently loads my movieclip on top in hte corerct place however wont allow me to hover over another button and only plays once: var my_packages_mc:MovieClip = new packages_mc();var my_treatments_mc:MovieClip = new treatments_mc();
[Code]...
View 1 Replies
Feb 5, 2009
I've made 5 'fruit' movieclips and they're in my library.And using so.addVariable("getNumber", "003"); in my HTML code, I'd like those particular fruit movieclips to play one after the other (and then loop).I've had a look around for something similar, without luck, so I'm trying to make it from scratch. I got as far as getting it to load the first number and then the first type and url, but I'm stuck on getting to go onto the next type, also being able to define (with addVariable) which number's nodes gets played.[Code]....
View 4 Replies
Sep 15, 2010
I'm loading an external SWF file, which become a MovieClip, using Loader(). That part is working fine. I then need to scale the MovieClip to match the stage, so that when I set the width and height of the movie doing the loading in SWFobject, the MovieClip will scale too.
For example, the SWF being loaded may be 320x240, but we decide later that we want it to be 640x480 on the page. We can just change the width and height in the javascript call to SWFobject, and it should scale everything. To top it off, I'll need an AS2 version too because we might need to load AS2 SWFs.
[Code]...
View 3 Replies
Dec 4, 2010
i am trying to load movieclips from the library using an array. I have manage to load a single movieclip using
var myArray:Array=[];
myArray[1]=imagex1;
var mc:MovieClip = new myArray[1];
addChild(mc);
but now I've tried using a loop by doing
var myArray:Array=[];
for(var i:uint = 0; i < 8; i++){
myArray[i]="imagex"+i;
var mc:MovieClip = new myArray[i];
addChild(mc);
}
and i get the error:
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at usethis4_fla::MainTimeline/frame1()
View 4 Replies
May 5, 2009
I am working with a site that's similar to : [URL]. When you click on Wedding Site and then go to the gallery, you will see the pics loading full screen and the navigation bar on top of the pics. What I have done is I have made each one of this pics a separate .swf file so
they load individually once they are called using the " loadMovie("pic1.swf") code line. On layer 10 (being at the very top) I have my menu so it will always display on top
of anything else. Now on layer 3, frame x I have a movieclip called : fotos_mc,
inside this fotos_mc on layer 1, frame 1 I call the swf using the code above:
"loadMovie(pic1,swf");
However when the picture loads, it covers the full screen on top of my navigation menu, on top of my logo etc. Which I dont understand why if the layer where I have placed my fotos_mc is under layer 10 which contains my menu and my logo.
View 4 Replies
May 23, 2009
I have created a content navigation system using xml. On the left there are a list of items and when you click on them their descriptions load on the right. I've gotten most everything working, however the list of items (which you click on) is messing up my formatting scheme creating a run-on page. Since the items are loaded using a for var i++ method, they each been created in separate textfields. I was thinking there must be a way to load them all into a movieclip and then create a scrollbar for the movieclip itself so that the user doesn't have to scroll the entire page to view the items.
View 1 Replies
Jun 1, 2006
Ok this probably has to be the stupidest question ever asked here on kirupa but I�m going to ask it anyways. You see I have 4 containers (mc�s). and according to the user it loads a different swf into it so what I wished to know is how to put a loader for each .The following steps explain it better-
[Code]....
View 2 Replies
Sep 27, 2007
I'm working with four movie clips- I have each movie clip load an external image and then fade in. These images have to remain on the screen once they are faded in - not replace each other.So I have dragged 4 movie clips into their position on the stage, and gave them a name: m1, m2, m3, m4. Each movie clip is on their own layer in the timeline because they will display on the screen at different times. On each layer I have placed this corresponding code:
Code:
m1.loadMovie("_load/img1.jpg");
m1._alpha=0;
[code]....
View 1 Replies
Nov 6, 2009
For this flash application I'm building, it would be nice to have people upload their custom graphics and animations so my application can load them in run-time. Is it possible to load a GIF file as a MovieClip that contains all frames in that GIF file? I want this to be as dynamic as possible, like the user tells my application the URL to a XML file that has all information about the graphics he wants to use, so that my application can download those graphics.
View 2 Replies
Jan 30, 2010
I've got a movieClip in my library and it's linkage in my library. How do I code it? It will load 11 of "movieClip" in one row and 11 in second row and they will load one after another one.
View 2 Replies