ActionScript 2.0 :: Loading External Jpgs And Resize?
Apr 8, 2004I want to know how can I load external jpgs into a "frame" and depending on the size of the jpg resize this "frame" as you can see here:
View 9 RepliesI want to know how can I load external jpgs into a "frame" and depending on the size of the jpg resize this "frame" as you can see here:
View 9 RepliesI have designed a homepage that has 4 boxes on the right hand side that are of different size. I would like to have a movie loader that loads .jpgs randomly from a specified folder into each box. At the same time I don't want any repeats in any of the 4 boxes. Also is it possible to resize the images according to the box size without having to resize them outside of flash? I can have all the images in the external folder the same size, but then if I can just shrink them with whichever image falls into the box the random script assigns.
View 2 Replieshow can you load external Jpgs into a swf instead of loading them and compiling the swf. so that they appear in the cache.
View 1 RepliesI have an app that "loadmovies" a slideshow.swf in a sub-folder. THis sub-folder also contains an xml file and numbered jpgs.But when I run the main app, and click on the button to load the sub SWF files, the images do not appear. I assume it is a directory issue.
But if I run the slideshow.swf directly from it's folder, the images appear fine.I am using the xml_photogallery from this site for the main actionscript, is there something I can change here to point to the jpgs path?
I am having trouble with classes and loading external files, specifically .jpgs.I have a simple class, that looks like this,
Code:
dynamic class test extends MovieClip {
var nn;
function test() {[code]....
I have it attached to the stage, it traces nn repetitively until i load the jpg, when i load the jpg into it, it loses all of it class properties it seems...it stops the onEnterFrame and the nn is no longer there.
I have an app that "loadmovies" a slideshow.swf in a sub-folder. THis sub-folder also contains an xml file and numbered jpgs.But when I run the main app, and click on the button to load the sub SWF files, the images do not appear. I assume it is a directory issue.
But if I run the slideshow.swf directly from it's folder, the images appear fine.I am using the xml_photogallery from this site for the main actionscript, is there something I can change here to point to the jpgs path? (If I add the "subfolder/" in the xml it doesn't seem to help)
I have 100 mc's loading external thumbnail jpgs via loadMovie(). I need a preloader of some sort to show the status of the thumbnails. The problem is that each of the mc's are loading JPG individually and I am not sure of how to combine their loading statuses into a preloader. The other option I had planned to use was to make one thumbnail larger in file size than the others so that it would load last and therefore I could use some onload function for this particular thumbnail, but I do not know what would be best to use in this case.
View 1 RepliesEssentially, I've got a MC container that's created dynamically based off an XML file (basically for every <title></title> I've got, it makes a new "card"). Now within the context of each <title></title> grouping I've got <imgs></imgs> in which I specify the path to images that are related.All of that works perfectly, save for the external jpg files actually appearing on the stage. The MC I add them to does, but the external image doesn't.My problem is- I can't add the external images until they're completely loaded (or so it appears). The thumbnail BG I use is blank. So I know for a fact that the thumbnail BG isn't occluding the loaded thumbnails.
View 2 RepliesIm having problems displaying my loaded swf, with my resize code. If I comment out my resize code, the swf DOES get put on stage.
Heres my code...
import flash.display.*;
import flash.events.*;
stage.align = "TL";
[Code].....
[Code]...
now the instance of image1+2 are 2 deep in the movie, not sure if that matters? but when i preview in flash perfect, when i publish perfect, but once up online nothing? anyone knwowhy
how can you load external Jpgs into a swf instead of loading them and compiling the swf. so that they appear in the cache. Whats the function to do this, or is there a tut?
View 1 RepliesI'm justing starting to learn some actionscript. I can't figure out why my jpgs are flickering when I go from one scene to another. Do they have to reload each time? Here is a link: http:[url].....I have each animation as a separate scene, and you'll see that the buttons flicker when the new scene loads.
View 4 RepliesI've designed a site that dynamically calls in jpgs into a swf. I've done it before on other sites and haven't had a problem. However on this site (www.jefftse.com), sometimes the jpgs load and sometimes they do not on IE on a mac. Which is bizzare. Why would it not work occasionally?
View 2 Replieswell i have 3 mcs (mc1,mc2,mc3), each loads .jpg files in it randomly. The question is how to make each of them not repeat previously loaded one.Example of code that im using
Code:
filename = ["image"+random(7)+".jpg"];
path = "img/";
[code]......
I'm building an app that allows the user to load JPGs, edit them, and then save them back to their computer.So I have run into some sort of bug. Whenever I load a JPG from another site then the bitmap exporter will just trace a blank image. So it has come down to this: the moment I a jpg, my traced bitmap is broken. It will work at every point before that. I am using loadClip to load the jpgs (flash 8 pro/as2.0).
View 2 Repliesi just need a preloader for my dynamically loading jpgs.
fyi, i don't need buttons or anything for this...it's a very simple slideshow where the images come in every 100 frames...that's it.
does anyone know what code i should put it so that my images will preload at the beginning so the slideshow doesn't stutter?
I would like to have a flash movie load a picture as the background image of a symbol or otherwise be viewable. The picture would be referenced via a URL on another site.Example. putting in a URL ending in '.jpg' would make another object show the pic from that URL.
View 8 Repliesloding jpegs dynamically. My question is can you alter the script, and with the click of the same button load next jpg, then next etc?
View 4 RepliesI'm loading a txt file that I use to load jpg's (no PHP):
PHP Code:
<a href="asfunction:_global.loadMovie,flag_1.jpg">flag 1
</font></a>
It works like a charm, but now I want the "container" to fade in the jpg's.
Code:
_global.loadMovie = function(url) {
container.loadMovie(url);
fadein();
};
function fadein() {
[Code] .....
The container fades in, but not 100% _alpha(about 40% I guess)!
I'm trying to go through a for loop, create a movieclip for each database entry, add the image by url stored. The problem is the code I have only does the last image. I know it's because something is not incrementing and they all have the same name. Do I need to increment the name of my loader?[code]...
View 11 RepliesSo what I want to do is load up external JPGs into an Array of MovieClips, and then go to the main onEnterFrame function. [code]...
View 4 RepliesI wondering if with flash would be able to load in an external jpg file and then export the pixel data into a php application to rebuild the image?My concern is when an application loads an external resource it is just that, external and not local and therefore when I come to grab the pixel data will it grab the external resource in this case the image I've placed inside a movie clip?
View 3 RepliesI am building a portfolio disk with the awesome photo gallery AS from here. This will be run from a cd and I want to preload the images in the arrays to keep everything smoooooth. I am building on current machine. When I tested a disc image on an older machine the transitions were slooooow. I figure preloading would defeat this. Is there AS to accomplish this or is it something simple like hiding the images somewhere on the timeline and using a normal preloader?
View 3 RepliesI have 100 mc's loading external thumbnail jpgs via loadMovie(). I need a preloader of some sort to show the status of the thumbnails. The problem is that each of the mc's are loading JPG individually and I am not sure of how to combine their loading statuses into a preloader. The other option I had planned to use was to make one thumbnail larger in file size than the others so that it would load last and therefore I could use some onload function for this particular thumbnail, but I do not know what would be best to use in this case.
View 1 RepliesI'm having a hell of a time optimizing my loading sequence for a gallery site I'm working on. This is the way it works:
1. I load and parse an XML containing the URLs to the thumbs and large versions of the photos. - This step is fast and works the way I want.
2. I load the thumbnails in sequence jumping back and forth between two functions - one initiating loading of a thumb, and the other the event handler for that particular thumb which iterates a value, and then calls the initiating function again. I suspect this is where the major slow down happens.
3. When the iterating value has reached the same number as the number of URLs to load, the class dispatches a complete event, and all is well - except so much time has passed that no one will ever have waited to see the content ...
[Code]...
All I need is a simple example, of loading jpgs into flash as3 and a function for applying a transition effect on them. Something like:
Code:
import com.greensock.*;
TweenLite.to(image[1], 2, {alpha:1});
Is it possible to have external jpg files that can be imported if and when you want them? For example, say you have a spot set aside in your flash to display a 100x80px poster image, and you want the ability to call up a different image each time, can you have jpgs files in a directory, each set to 100x80px size, ready to be called up? I can do it with the images set up as little flash files, but I wanted to know if you do it with raw jpgs.
View 2 RepliesI'm trying to create a slideshow that loads pics (jpg) from an external folder ("pics/") into dynamically created MCs.What I want is for the script to detect how many pics are in the folder (for future changes), create as many instances of the MC, and load the pics into each one. The MCs will need to take the W and H of the pics, and line up next to each other. This last part is not as important, I'm just wondering how to determine the number of pics in the folder. Do I need XML or will AS 1.0 or 2.0 do this?
View 1 RepliesI'm trying to create a slideshow that loads pics (jpg) from an external folder ("pics/") into dynamically created MCs.What I want is for the script to detect how many pics are in the folder (for future changes), create as many instances of the MC, and load the pics into each one. The MCs will need to take the W and H of the pics, and line up next to each other.This last part is not as important, I'm just wondering how to determine the number of pics in the folder. Do I need XML or will AS 1.0 or 2.0 do this?
View 1 RepliesI'm loading multiple instances of the same jpg dynamically to my swf. It works just fine locally, but when I upload it, it only executes the first loading code it encounters in the timeline. I was doing things fairly complexly with 'for' loops and dynamic name generation and stuff, but I've stripped it down to the basics in an effort to get this to work.
Here's some code:
loadMovie('1.jpg', mc1.empty_mc);
loadMovie('1.jpg', mc2.empty_mc);
mcLoader.loadClip('1.jpg', mc3.empty_mc);
mcLoader.loadClip('1.jpg', mc4.empty_mc);
mcLoader.loadClip('1.jpg', mc5.empty_mc);
as you can see, I'm using two different methods of loading the jpgs, just in an effort to pin down exactly what is going on. Locally, they all load fine. When I upload to the server, only the first instance of the loading code is run (so mc1 will get its jpg, but the rest won't). I've tried to swap the order, place the loading code in different areas, try to load different jpgs into each empty mc, but nothing works except that first instance flash gets to in the timeline.
The swf and jpgs are all in the same folder, both locally and on the server. The server the swf is hosted on is Windows 2003 box if that matters. I tried uploading it to a different windows box and got the same problem.