Crossfade Dynamic Jpeg
try to search this hi and lo in google and even this forum, can't seem to find the right solution..I wanted to know the method to do a dynamic loading of jpegs with click of a button with crossfade between the two jpegs. Anyone know any links or tutorial, let me know to do this. Thanks alot!
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 05-31-2004, 06:14 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Crossfade Dynamic Jpeg
try to search this hi and lo in google and even this forum, can't seem to find
the right solution..I wanted to know the method to do a dynamic loading of jpegs with click
of a button with crossfade between the two jpegs. Anyone know any links or tutorial, let
me know to do this. Thanks alot!
Loading Dynamic Images With Crossfade
Hi all,
What I am trying to do is loading a picture on the first frame. when going to the next frame I need to load another picture on top of the old one with crossfading and so on. I also need to have a preloader on each picture before they crossfade. example: http://www.arne-maynard.com. Can anyone point me in the right direction of how this is done?
Dynamic Jpeg
Hello,
Help! I am stuck, I have written script to dynamically load Jpegs into an empty movieclip on the main stage. These are loaded in by clicking on buttons, the relavent Jpeg scrolls down when it's loaded, and when another jpeg is requested by clicking on another button the first scrolls up BEFORE the next one loads.
The problem I have is that the first does not scroll back before the next loads, I have attached the FLA that is notated, all will become clear if you run it.
Thanks.
CrossFade ?
Hello everybody...is there someone who can help me with my scripting problem ?
On stage I've an empty mc named "Holder" and 7 buttons. At frame 1 of the maintimeline there's a loadingMovie action that loads the external Movie_1.swf into the "Holder". When the viewer pushes one of the buttons on the mainstage, the present swf in the "Holder" has to fade out and a new external swf to fade in.
I assume that the "easiest" way to do this is with an actionscript in the first frame of the maintimeline. Is there anyone who can help me with this ?
Thanks
Aligning A Dynamic JPEG
(I tried posting this on a Macromedia forum but no replies. Maybe you guys can help me here....)
------------------->>
The fact that dynamic jpegs automatically align to the top-left of an MC is really starting to freaking me out here. What if they need to be centered within the MC for the sake of the layout design? To clarify, the project I'm working on involves a lot of differently proportioned photos. My MC is 400x400, centered on the main stage. Photos to be loaded into this MC are generally either 400x300 _or_ 300x400 (basically just never exceeding 400 pixels in either direction at any time). However, I need these images, whatever their sizes, to automatically realign to the center _within_ the MC, relative to its top-left registration point. This is obviously a job for Actionscript....
I'm just getting confused as to where to begin on this matter, as I'm a novice/intermediate with actionscript at this point. We've all seen some wild stuff out there so I know there's gotta be some clean, basic ways to do stuff like resizing and/or realigning dynamic jpegs within the parent MC. I just can't figure it out yet...
Use getProperty then do a crazy calculation to reposition the jpeg? (Can you even use getProperty on a JPEG now that you're doing loadMovie?)... Create some whacky function that bumps the whole MC over or down based on the JPEG size?.... Or use a text file as a database with the dimensions listed in it and do you calc off that (which IMO seems like too much extra work for something like this)?
Ideas anyone?... HELP!
Thanks in advance!!
Dynamic Jpeg Thumbnail
please
i want to create a dynamic photos thumbnails, where i can slide the gallery, all the samples i have found have the jpeg included into the movie but i want to load jpeg from directory to the thumbnail
i have found a prototype for gallery but it's so complicated for what i want.
please if you have som script or example of a sliding dynamic jpeg thumbnail. please let me in
i will be so gratefull
thank you
Width Of Dynamic Jpeg
I am trying to get the width of a jpeg dynamicly loaded into a movie clip. MY code so far is:
Code:
loadMovie("Thumbs/thumb1.jpg","thumb1");
trace(thumb1._width)
The trace always returns 0 even though the thumbnail is 100x100
Dynamic Jpeg Load
Hello,
I have an image viewer that I got working pretty good, but for the lowband users, I'd like them to have a preloader for each image. No matter what I do in the MC, I can't get the loader to identify the specific image(s). It keeps preloading the MC only. I have
"mypic = 1"
as an initial variable, then eventually a
loadMovie(url,"+mypic+".jpg "MC")
where my images are image1.jpg, image2.jpg, etc. How do I tell the preloader to .getbytes for the images only? I've even tried targeting "+mypic+", but I get a syntax error. Just a little help please. I keep reading that Flash MX is still buggy in this area. Has anyone got it to work as advertized? Any advise would ease my head, thanks.
Dynamic Export Jpeg
How do I create a button in FlashMX to export a jpeg picture of a swf file.
I think this could be done in Generator. How about Flash MX?
Thanks,
Jax
Dynamic Jpeg In MX Smothers Everything In SWF
Problem: The imported image always displays overtop of everything else in the movie forcing things in other higher layers in FLA beneath it. Hidden from view.
Here is the sample code I am using to create a holder MC and them load the image into it. Works fine.
However I want to float some text or buttons overtop the imported image in a higher layer. (eventually i want the image to be random but the text to remain the same. Idea is seen at http://www.vcu.edu in regular HTML example)
_root.createEmptyMovieClip("container",1);
container.loadMovie("photo.jpg");
container._x = 2 ;
container._y = 2 ;
This is an elementary lesson I'm sure, but crucial if I am to move forward.
Resizing Dynamic JPEG?
I am using loadMovie() to grab current weather images from our company's sister weather service (Meteorlogix). The images are usually 400x300 and I want to resize them down to 350x280. However, I am not having much luck getting the desired JPEG to resize.
Here's my code:
code:
onClipEvent(load) {
wximage = _root.wxmap.image;
wxURL = 'http://000.000.000.000/weatherimages/' + wximage;
loadMovieNum(wxURL,_root.wxmap,"GET");
_root.wxmap._width=300;
_root.wxmap._height=280;
}
The code grabs the correct JPEP, the file name of which I pass in the _root.wxmap.image variable.
The image is then correctly positioned at 0,20. But try as I might -- and I've tried a number of alternative strategies, I can't get the image to resize.
Any thought?
Dynamic Resizing Of Mc With Jpeg
OK, I'm trying to load a jpeg into a mc, with the jpeg resizing to fit within a 640 x 480 rectangle.My script gets the x and y dimensions of theImage and multiplies by a calculated percentage to make it fit. For some reason, I have to call my function twice to make it work:
Code:
placeholder_mc._height = (imageHeight * reductionPercentage);
placeholder_mc._width = (imageWidth * reductionPercentage);
loadMovie(theImage, "placeholder_mc");
First time through, the jpeg loads at its original size, instead of the calculated size of the mc. Doesn't a loaded image/clip automatically resize to fit what it's being loaded to? Why do I have to call this function twice?
Dynamic Jpeg Quality
I have been reading dozens maybe hudreds of posts on the dynamic jpeg issue but haven't found an answer to my question. I have a site I am working on from a template and I can't get an answer to why the images that are dynamically loaded appear to be jagged instead of smooth.
I'm sorry to ask a questioin on subject with so many posts already but I'm sure it will be a few days of researching for me (a Newb) until I happen to stumble across an answer. So if anyone who knows happens across this post your help would be greatly appreciated. Thanks. R
If you go to the gallery at this link you will see what I mean: My site
Dynamic .jpeg Loading: IE Mac
Hey-
I've been working on a site that has a banner with rotating ads that are dynamically loaded in as .jpgs. It works fine almost everywhere, including IE Mac when I run it locally. But when I upload it and run it in IE Mac, the first image loads and flashes, but then just disappears altogether.
Here's the site: http://www.uniformsolutions.net/proto
The numbers being printed from left to right are:
image._x image._y image._alpha
These numbers seem to indicate that the images are all loading and fading in properly, but they just aren't showing up! Any ideas? Please help! Thanks.
Dynamic JPEG PRELOADER
Hi People,
I have a problem. I'm loading jpeg's dynamically into movie clips and I would like to preload them.
What code can I add to an onClipEvent(enterFrame){
to preload the jpeg which will dynamically load into the MC?
Can anyone help please?
Dynamic Jpeg Detection
If you had 6 jpegs in a folder can flash detect that their are 6 jpegs and return a value in the form of a variable??
any other related answers to this problem would be kewl.
thanks
Dynamic Flash Swf To Jpeg
I've created Flash page which allows users to create business cards and see a real time proof before ordering. I would like to create an image of the swf to store in my database for use in the shopping cart and for some other purposes. I need to create an image for every card that is created in realtime. Is there a way to do this?
Thank you,
Chris
Example Of Loading A Dynamic Jpeg With AS?
Okay. I'm frustrated...I know it's so simple, but I cannot get it to work.
basically, I want to find some example to disect.
All I want to do is, load a JPEG into a movieclip. I want to create the movieclip myself, and I want to load a jpeg dynamically into it when the flash movie starts.
I don't want to have a button to launch it, and I don't want to automatically create the movieclip container with flash.
If anyone can direct me to a tutorial that comes complete with the image, so I can see exactly how it works -- I would virtually love that person.
I don't know why this is so difficult for me, I want to go on from there to load that dynamic movieclip into a scrollpane, but I just want to get a movieclip to load the jpeg dynamically so I can learn.
thanks so much!!!
Dynamic JPEG Preloader
I'm using Flash MX (not 2004)
I'm trying to create a preloader that I can place on thumbnails and an image display as they load their respective JPEG images. The problem is that I do not know how to get the load progress since getBytesLoaded() and getBytesTotal() do not seem to be working.
I looked into using listeners but all I can find is information about pairing listeners with the movieClipLoader class that I do not have access to.
Can someone enlighten me about how to get the load progress using Flash MX? I can easily create the rest of the preloader from there.
If its important, I have an empty movie clip called IMGHolder and use IMGHolder.loadMovie(MyIMGPath) to load the JPEG. So I've tried IMGHolder.getBytesLoaded() and it either returns 0 (initially) or the full 1901666 (end) bytes.
Further, if you think, rather if you KNOW, that .getBytesLoaded() should be working please let me know so I can try and figure out where its going wrong. Thank you.
Dynamic Jpeg Thumbnail
please
i want to create a dynamic photos thumbnails, where i can slide the gallery, all the samples i have found have the jpeg included into the movie but i want to load jpeg from directory to the thumbnail
i have found a prototype for gallery like MAMMA but it's so complicated for what i want.
please if you have som script or example of a sliding dynamic jpeg thumbnail. please let me in
i will be so gratefull
thank you
Dynamic Jpeg Loader
How do edit the code in the photo gallery so that I can search for next jpg 1.jpg, 2.jpg etc and then when it hits the last one it will start to the first one
I have it set to
pic = "1"
pic + ".jpg"
this way I can change the number of pics in the folder without changing the code?
JPEG Dynamic Loading Help
Hey All,
I searched through the forums and I couldn't find anything that could help me.
I used the code in the tutorial on loading jpeg images, the one with bush holding the presidency for dumbies book.
----
_root.createEmptyMovieClip("container",1);
container.loadMovie("photo.jpg");
container._x = container._y = 0 ;
_root.onMouseDown = function () {
startDrag ("container",false) ;
}
_root.onMouseUp = function () {
stopDrag () ;
}
----
Anyway, that's the only picture I can get to show? I replaced "photo.jpg" with "test.jpg" and a couple others, and none of them would show up, only "photo.jpg"
I can't figure out what's going on? I have photoshop, am I not saving the images in the right format? Please help! I'm desperate.
Thanks, Anthony.
Dynamic Jpeg Gallery
help help help help help!!! please!!!!
go to www.stephanielehman.com
click on the star on the left that says scribbles when you roll over it. there are 3 thumbnails there. the right two work, because the jpegs are just embedded in the .fla - the leftmost thumbnail (yellow bg with happyface) doesn't work because i'm trying to learn how to do the dynamic jpeg thing. that's where you come in, because i've looked EVERYWHERE and i can't figure this thing out.
sitepoint has this tutorial:
http://www.sitepoint.com/article/1115/
which is pretty much what i'm trying to figure out how to do, but the code on there isn't working for some reason and i DO NOT want to use flash's pushbutton component, i want to use my own thumbnails as buttons.
so my question to you is how do i do this? don't i need an invisible movieclip on the stage somewhere to hold the jpegs and how do i set that up? what would the code be to call up the jpegs?
please keep your answer super simple and jargon-free, i'm not a real programmer, just trying to learn a little actionscripting here and there. and please don't respond in german. that does not help me at all. i've seriously gotten that on a couple of posts on other bbs and it's just annoying because it's not an answer at all.
thank you soooooo much. i'm seriously about to pull all my teeth out with a pliers over this.
steph
Dynamic JPEG Background
Hello all
I'm looking for some backup to create dynamic loaded jpeg backgrounds..
I want to create something similar to:
http://www.revolvercreative.com ...this is xml based
or
http://www.blackpulp.com
or
http://www.hi-res.net
They all have a large picture background and a .swf on top of it...
Can someone provide with me a useful actionscript/xml combi .fla and .xml file
that illustrates the setup/approach to build this?....or explain it to me otherwise...
Thnx in advance
Best,
Arn
http://www.electronicnature.com
SetVolume() Crossfade
Greetings!
I've been having problems with the Sound object.
More specifically, I would like to crossfade two sounds. The first sound I loaded and linked as a sound object and is looping for the bulk of the movie. When the user enters the last part of the main timeline, an embedded movie should fade out the first loop while fading in the final music clip. Here is the code I put in the embedded movie:
---------
Frame 1:
vol = 100;
_level0.endmusic.start( 0, 0 );
Frame 2:
if (vol > 0) {
_level0.mainmusic.setVolume( vol );
_level0.endmusic.setVolume( 100 - vol );
vol = vol - 1;
} else {
stop ();
}
Frame 3:
gotoAndPlay (2);
---------
I have already attached the sounds in the main timeline and linked the symbols in the library for exporting.
mainmusic = new Sound();
mainmusic.attachSound( "mainloop");
endmusic = new Sound();
endmusic.attachSound( "end");
Now the problem I'm having is that the setvolume command in frame 2 sets both sound files to the fadein command. If I reverse the order of the setvolume lines, both sounds will fade out.
I was under the impression that you could control individual sound elements with the setvolume() method. This seems to apply it to all sounds globally.
Any help would be appreciated. Thanks.
Crossfade For AttachMovie
You could say this the II part of previous post.
I was trying to fade in a movie i was attaching from the library.
this is the code is get at the end:
Code:
bo.onRelease = function() {
_root.attachMovie("noticias","novedad",2, {_x:194,_y:108});
import mx.transitions.Tween;
import mx.transitions.easing.*;
new Tween(novedad,"_alpha",Strong.easeOut,0,100,1,true);
};
my button name is bo an the MC in my library is noticias and is placed on stage with the instance name novedad...
now this works great, but what if I need to make a crossfade between the removed MC and the newloaded MC.
I get a lot of codes for loading JPG's, or when the MC clips are already placed on stage, but none of them works when th MC is attached like this.
any ideas?
Slideshow Crossfade
Hi guys, my friend bought a script for a slideshow an XML/MySQL slideshow for her photography website and I told her I would help her get it set up and installed but now I'm stuck.
The way it works now is the first photo will fade to black (or bg color) and then the next photo fades in. I would like to make the transition smoother so that one photo fades into the next but i've tried a billion variations on this script over the last 6 hours and I'm getting no where fast.
This is the script as I have it working currently:
Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
}
// end of for
isload = false;
picture._alpha = 0;
fadeOut = false;
loadMainImage();
} else {
content = "file not loaded!";
}
// end if
}
// End of the function
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
var flashURL = "xml.asp";
if (_level0.xmlURL != undefined) {
flashURL = _level0.xmlURL;
}
// end if
xmlData.load(flashURL);
function loadMainImage() {
var temp = _root.createEmptyMovieClip("temp", 9999);
temp.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
//trace(isload + " " + p + " -> " + loaded + " " + filesize);
if (loaded == filesize) {
isload = true;
}
else {
//loadLabel.text = "Loading..";
isload=false;
}
fade();
};
if (!fadeOut) {
picture.loadMovie(image[p], 1);
/*if(isload) {
loadLabel.text = "";
isload= false;
}*/
slideshow();
}
}
function fade() {
if (fadeOut) {
if (this.picture._alpha>30) {
picture._alpha = picture._alpha-10;
} else {
fadeOut = false;
delete temp.onEnterFrame;
loadMainImage();
}
} else if (this.picture._alpha<100) {
picture._alpha = picture._alpha+10;
} else {
fadeOut = true;
delete temp.onEnterFrame;
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
// End of the function
function slideshow() {
function pause_slideshow() {
fadeOut = true;
clearInterval(myInterval);
if (p == total-1) {
p = 0;
loadMainImage();
} else {
p++;
loadMainImage();
}
}
myInterval = setInterval(pause_slideshow, delay);
}
p = 0;
The movie contains an empty MovieClip on the stage with an instance name of picture. If i'm understanding this code correctly all the images are being loaded into that same container clip so in order to have them crossfade I would need to have a second container movie clip...i've tried setting this up and getting it to work but the code really is above my head.
I'm willing to pay $20 via paypal to anyone who can help me get this working.
How To Make A CrossFade From Flv To Flv
I'm working on a database with videofiles i want to play. But to make a nice overlap i want to use a nice crossfade.
This is what i have till now.
PHP Code:
var nextup = "motor.flv";
_root.my_video._alpha = 0;
var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
my_video.attachVideo(stream_ns);
stream_ns.play(nextup);
//
stream_ns.onMetaData = function(obj) {
duration = obj.duration;
};
var time_interval:Number = setInterval(checkTime, 1, stream_ns);
function checkTime(my_ns:NetStream) {
if (_root.my_video._alpha<100) {
_root.my_video._alpha += 1;
}
if (my_ns.time>duration-2 and _root.my_video._alpha>0) {
_root.my_video._alpha -= 1;
}
}
This flv file fade's in and out, but i have know idea what to do next.
I hope someone can help me with this problem.
thnx
Crossfade Slideshow
Hi Kirupians,
Maybe someone is able to help me out?
I am trying to use this for a banner:
http://actionscript-toolbox.com/samplemx_slideshow.php
... when using the slideshow in a container, unloading it and then
reloading it ... the pictures "accumilate" (if thats the right word for it)
and things get really messy.
It seems if you wait for the second image to fade in, then unload/reload
this does not happen?? Does anybody know why???
I have tried clearInterval but nothing!!!
Its driving me insane ... Please help ...
Thank you.
Crossfade Slideshow
Hi Kirupians,
Maybe someone is able to help me out?
I am trying to use this for a banner:
http://actionscript-toolbox.com/samplemx_slideshow.php
... when using the slideshow in a container, unloading it and then
reloading it ... the pictures "accumilate" (if thats the right word for it)
and things get really messy.
It seems if you wait for the second image to fade in, then unload/reload
this does not happen?? Does anybody know why???
I have tried clearInterval but nothing!!!
Its driving me insane ... Please help ...
Thank you.
Crossfade Problem
Hi--
Working on a basic slideshow where I know there only 7 images to load, but I want to code it so the slideshow will rotate through as many images as are available.
Anyway, I've got images loading and fading in, but they're not crossfading. When a new image is loaded, the existing image disappears and the new one fades in over the empty stage.
Can anyone see what I'm doing wrong?
My code:
Code:
package {
import flash.utils.Timer;
import flash.events.TimerEvent;
import flash.display.Sprite;
import flash.display.Loader;
import flash.events.*;
import flash.net.URLRequest;
import flash.display.MovieClip;
import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.events.*;
public class home extends Sprite {
public var largeContent:Sprite = new Sprite;
public var largeContent2:Sprite = new Sprite;
public var loader:Loader = new Loader();
var fader:Timer = new Timer(5000, 7);
public function imageLoaded(event:Event):void {
if (fader.currentCount%2) {
largeContent.addChild(loader);
var myTweenAlpha1:Tween = new Tween(largeContent, "alpha", Strong.easeOut, 0, 1, 1, true);
var myTweenAlpha2:Tween = new Tween(largeContent2, "alpha", Strong.easeOut, 1, 0, 1, true);
} else {
largeContent2.addChild(loader);
var myTweenAlpha3:Tween = new Tween(largeContent2, "alpha", Strong.easeOut, 0, 1, 1, true);
var myTweenAlpha4:Tween = new Tween(largeContent, "alpha", Strong.easeOut, 1, 0, 1, true);
}
}
public function home() {
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
addChild(largeContent);
addChild(largeContent2);
fader.addEventListener("timer", fadeHandler);
fader.start();
var request:URLRequest = new URLRequest("flash/home7.jpg");
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
loader.load(request);
}
private function ioErrorHandler(event:IOErrorEvent):void {
fader.reset();
fader.start();
}
public function fadeHandler(event:TimerEvent):void {
var request:URLRequest = new URLRequest("flash/home"+fader.currentCount+".jpg");
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
loader.load(request);
}
}
}
Thanks!
:grimey
Dynamic JPEG Loading Question In MX
Hi,
I would like to create a photo gallery with a "Thumbnail menu". This menu should dynamically load all thumbnails from the server, but once it has finished doing this the images have to "stay there" (cached).
I tried this, but each time I click the "Thumbnail menu button" the MC re-loads all images, although it has been doing this before.
I hope you understand what I mean.
Thanks for any advice on this.
Kind regards,
Joepy
Preloader And Dynamic Jpeg Loading
I have a movie clip into which I am loading a jpeg file based on information in a database.
Traditionally I would have done this by loading in an external .swf with a pre-loader inbuilt.
Is there anyway to detect the size of the jpeg so I can build a bar or percent loaded pre-loader??
Thanks.
Memory And Dynamic Jpeg Loading
Hello,
I have bee trying to understand the XML and jpeg slide show example on the macromedia site: http://www.macromedia.com/support/fl...slideshow_xml/
From what I undertand, the example loads a jpeg and updates the 'slide' by replacing the older jpeg...
Does this mean that when you go back in the slide show you would have to reload the jpeg. So for example, if I had a large jpeg image to load, it would be unloaded and have to be reloaded everytime I switch between images? Or does the jpeg stay loaded in the computers cache and so is loaded directly without a delay??
Any ideas?
Thanks
Centering Dynamic .jpeg Files
I am calling jpeg files into an empty movie clip. The jpeg files are not all the same dimension. I would like them to be centered in a specific area. Is there anyway to do this like it would be done in an html table?
Thank you
josh
Dynamic Jpeg Background Preloading
I'm doing this in an effort to make viewing a product catalogue better to view on dial-up, basically the next image should load in the background while the current one is being loaded.
I was thinking of making an object for each clip, although I'm getting a little lost on this, its late and I need to get to bed, so I thought I'd throw it up on here and see if anyone has any ideas!
Basically, right now the previous/next buttons aren't dissapearing when they should be and the previous image doesn't appear to be cached (needs to be tested in a browser to see this)
Any ideas?
Loading Dynamic JPEG : Screwed Me
Hello,
Its my 1st thread so please bare with me.
I am webdeveloper & currently working on totally dynamic PHP + Flash + MYSql driven website.
I hangup at loading dynamic Images. What I have done is :
//Loading images from MYSql
this.ref["img1_mc"+i].loadMovie(this["img1"+i])
//OnClick : Detail Button
//##### Sets the size of the images you want to load.
setProperty("imgX1", _height, 100);
setProperty("imgX1", _width, 100);
setProperty("imgX1", _x, 620);
setProperty("imgX1", _y, 87);
setProperty("imgX1", _rotation, 0);
imgX=this.ref["imgX1"].loadMovie(this["img10"])
What I am trying to do is :
1) to load data & images (thumbnail) on the main stage.
2) On click of DETAIL button : text & particular images (big) is loaded on rightside panel.
What happens :
1) data & images ( thumbnail created thru _height * _width) gets loaded on main frame.
2) On click of DETAIL button (rather double click) image is loaded & on third click it gets the size opted by _width & _height.
Please guide me through.
Thanks & do bare with encyclopedia type message.
SweetStranger
Dynamic Loaded JPEG > BitmapData?
EDIT: Simplifying post
code:
var bglinkageId:String = "bg";
var tile:BitmapData = BitmapData.loadBitmap(bglinkageId);
The above code sucks an image already in the library into BitmapData.
As I want to dynamically load the jpeg instead of having to update the library I have loaded a JPG into a new MC named "tile_mc".
My question is how do I get the already loaded (and hidden) MC into 'tile' (BitmapData).
Any help at all appreciated, I have searched.
Thanks
Dynamic JPeg Creation - How Is This Guy Doing It So Quickly?
Hi everyone,
I've built a little online Flash application where I want to save a portion of the SWF file to the server as a jpeg when the user clicks a button.
I approached it by using BitmapData to record the RBG values of every pixel in my movie (600 x 400 = 240000 pixels). This means I end up with an array of 400 pretty big strings (one for each row) to send to my ASP page that creates the image (the ASP page works fine by the way).
Basically, I'm completely stuck now because it takes so long to send the data that the application is unusable and the bandwidth on my server will be through the roof.
I found an example of a different application that uses the same principle. The creation of the jpeg from his Flash interface seems absolutely instant, and the e-mail arrives very quickly:
http://demo.tufat.com/flashcard/stateless/
He surely can't be sending all the data, pixel by pixel, as I am doing, as it only take a second or two for his application to process this stage, so my question is: am I missing something? Is there some really simple way of creating a jpeg from an swf file using actionscript that I don't know about, or is there a way of compressing the data so much that it is much quicker, or is there a 3rd party plugin which allows jpegs to be dynamically created and sent to an ASP/PHP page?
I am completely stuck on this so any help would be really appreciated.
Thanks in advance,
Jim
Cache Dynamic Jpeg List
I have a Flash Action script 2.0 application that dynamically loads a list of jpegs from HTML. There are anywhere from 20 to 30 photos that it loads. It takes approx 5 seconds via a 256 connection to download and load into the application. Is there anyway to speed this process up via some sort of caching?
many thanks
Dynamic Jpeg Background Preloading
I'm doing this in an effort to make viewing a product catalogue better to view on dial-up, basically the next image should load in the background while the current one is being loaded.
I was thinking of making an object for each clip, although I'm getting a little lost on this, its late and I need to get to bed, so I thought I'd throw it up on here and see if anyone has any ideas!
Basically, right now the previous/next buttons aren't dissapearing when they should be and the previous image doesn't appear to be cached (needs to be tested in a browser to see this)
Any ideas?
Dynamic Jpeg Sliding Menu
hi guys.. i'm trying to do a sliding menu here..
have a problem with my loaded jpeg properties(dimension)
is there a way to detect the dimension of the loaded jpeg?
cause an empty movieclip has no _width &_height(0) ..
here's the code:
this.createEmptyMovieClip("container", 1);
for (i=1; i<=2; i++) {
pic = "assets/photography/pic"+i+".jpg";
container.createEmptyMovieClip("holder"+i, i);
container["holder"+i].loadMovie(pic);
//here's the problem
if (i>1) {
container["holder"+i]._x = container["holder"+(i-1)]._x+container["holder"+(i-1)]._width;
}
}
thank's..
Masking A Jpeg W/ Dynamic Text?
I'm loading a jpeg w/ loadMovie and creating a text field with createTextField and pulling text dynamically. I'd like to mask the jpeg with the text in the text field so that the jpeg can be seen inside of the text (no matter what it randomly pulls). Is this possible?
Also this site http://www.ourvice.com/ is awesome, anyone know how they achieved the background text (The 'merging' together effect?)...
Dynamic Jpeg Background Preloading
I'm doing this in an effort to make viewing a product catalogue better to view on dial-up, basically the next image should load in the background while the current one is being loaded.
I was thinking of making an object for each clip, although I'm getting a little lost on this, its late and I need to get to bed, so I thought I'd throw it up on here and see if anyone has any ideas!
Basically, right now the previous/next buttons aren't dissapearing when they should be and the previous image doesn't appear to be cached (needs to be tested in a browser to see this)
Any ideas?
Dynamic Jpeg Loading Issue - HELP:O
I believe this is a target or level issue.....but
I am trying to load jpegs into a gallery. The first jpeg will load, but the buttons to load new images do not work on the integrated site and if I use my keyboard arrow keys, I can see the first image begin to fade but then it stops and won't load the next image. The swf works fine by itself but encounters these problems once integrated.
You can view the photo gallery at www.svengali-fx.com click on the third image on the screen (called Matte Paintings) and you will be taken to the swf page titled matte.swf. You can also see that the page works without the rest of the swf by trying it out as www.svengali-fx.com/matte.swf
Here is the code I am using and I have to think it is a target prob...but I am stumped.
Thanks for any help!
code:
------------------------------------------------------------------------
this.pathToPics = "animation/";
this.pArray = ["walley.jpg", "scorp.jpg","dances.jpg","mystery.jpg"];
this.fadeSpeed = 20;
this.pIndex = 0;
loadMovie(this.pathToPics+this.pArray[0], _root.createEmptyMovieClip(photo, 1));
MovieClip.prototype.changePhoto = function(d) {
this.pIndex = (this.pIndex+d)%this.pArray.length;
if (this.pIndex<0) {
this.pIndex += this.pArray.length;
}
this.onEnterFrame = fadeOut;
};
MovieClip.prototype.fadeOut = function() {
if (this.photo._alpha>this.fadeSpeed) {
this.photo._alpha -= this.fadeSpeed;
} else {
this.loadPhoto();
}
};
MovieClip.prototype.loadPhoto = function() {
var p = _root.photo;
p._alpha = 0;
p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);
this.onEnterFrame = loadMeter;
};
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l = this.photo.getBytesLoaded();
t = this.photo.getBytesTotal();
if (t>0 && t == l) {
this.onEnterFrame = fadeIn;
} else {
trace(l/t);
}
};
MovieClip.prototype.fadeIn = function() {
if (this.photo._alpha<100-this.fadeSpeed) {
this.photo._alpha += this.fadeSpeed;
} else {
this.photo._alpha = 100;
this.onEnterFrame = null;
}
};
this.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
this.changePhoto(-1);
} else if (Key.getCode() == Key.RIGHT) {
this.changePhoto(1);
}
};
Key.addListener(this);
Dynamic .jpeg Preloader Problem
Last edited by Webcat : 2003-07-18 at 15:10.
Greetings.
I am having a problem with a preloader for a dynamically loaded menu of product thumbnails.
I need to find a way to ensure that all of the product images have been loaded before the menu is revealed. It does this by counting loaded thumbnails untill it matches the total number of products to be loaded in the menu, triggering the fadein action.
I have been using getBytesTotal and getBytesLoaded to measure the loaded movie however my script does not seem to be measuring the actual size of the .jpg's that I am loading into the dynamic movie clip.
I have posted my code below.
Any help would be appreciated.
product = _root.catnav.nav.attachMovie("product_thumb", "product_thumb"+i, i);
loadMovie("images/Thumbnails100/"+product+"_t.jpg", "product.image");
product.onEnterFrame = function() {
if (_root.catnav.loaded=="false") {
if (product.image.getBytesLoaded()>=product.image.getBytesTotal() ) {
_root.thumbnails+=1;
}
}
};
Dynamic Jpeg Layer Order
Hi,
Just before I explain my issue I'd like to point out that I'm a designer who occasionally dabbles with Flash so I know the basic principles etc but I'm by no means an actionscripter!
I'm basically trying to use flash to dynamically load in jpegs as part of an animation sequence which will include some overlaying text and other animation elements along with it.
I've basically set-up a test fla to load in a dynamic jpeg and overlay some text etc. I've set up two layers in the root - the base one has nothing on it but a keyframe containing the following code:
_root.createEmptyMovieClip("container01",1);
container01.loadMovie("photo_01.jpg");
The second layer (above) has some text written on it as a test.
The problem I have is that the jpeg despite the layer order always appears above everthing else no matter what! Really annoying!! How do I get it to load into the layer it's on and behave normally according to it's layer order on the stage?? I don't want to get into using any PHP or anything, I need to solve this issue using only flash if possible?
Random Image Crossfade?
Is it possible to make a crossfade like this:
http://www.anfyteam.com/anj/cfade/anfade.html
in flash-as?
especially I'm interested in randomize the crossfading. the images should not crossfade in an order (image 1, image 2, image 3...).
-> image 2, image 1, image 3, image 1, etc. random!
many thanks in advance!
|