Dynamically Loaded JPEG - "href" Linkable?
Is it possible to dynamically load a jpg into an empty MC and make the jpeg linkable to an outside html file?
Thanks in advance!
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 03-19-2004, 05:17 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Dynamically Loaded <a Href>
I am trying to dynamically load the following text file as a html file into Flash MX.
info=
<p>Article 1</p>
<p><a href="http://www.cmaawards.com/2005/news/press_detail.asp?re=472&year=2005">2005 CMA Country Music Awards News</a></p>
It works fine if the link is set to www.yahoo.com or something similar but as soon as you put the address that is in there now the link disappears when the swf is launched. I have a feeling it is because there is an "&" in the http address but how can I avoid that? That is the links address! Very Frustrating!!!!! I tried changing the links "&" to the HTML formatted code but that didn't work! Any suggestions?
Thanks,
dptoot
Scaling A Dynamically Loaded Jpeg
I've had a good look through the forums but can't find any specific help on this topic. I hope I'm not duplicating a question if I missed something.
I have created a slide show for a selection of photographs which dynamically loads a jpg into the swf to save on load time at the start. I have an alpha fade between each image which works fine but I have a scaling issue. I have a caption button which slides in a bit of text for the photo and shrinks the photo to make room. The jpg is loaded into a movieclip using actionscript and then scaled again using actionscript. The scaling results in distortion lines and isn't as smooth as I would hope for. Does anyone know of any workarounds for this?
The link to the site is http://www.ethos-uk.com/matt/
Thanks in advance for any help
Matt
p.s. The site is obviously not finished
How To Copy Dynamically(loadMovie) Loaded Jpeg ?
I have a movie clip called picture_mc.
I load a jpeg in it.
Code:
picture_mc.loadMovie("http://somewhere.com/picture1.jpg");
Once the picture is loaded, I press a button that duplicate picture_mc, but the loaded jpeg is not duplicate.
And if use loadMovie for the duplicate movie with exactly the same path, the image get download again. Not very efficient.
Is there a way to duplicate EVERYTHING inside a movie clip ?
Martin
Retrieving Dynamically Loaded JPEG Dimensions
Hello everyone.
That's the main purpose of my code:
To dynamically load a JPEG into a movieclip called image from a path, using:
Code:
image.loadMovie ("jpeg/one.jpg");
This works just fine. But when it comes to retrieving the jpg dimensions (width, height), I'm trying :
Code:
var w = image._width;
Which returns 0. Does anyone know how to fix this? Thanks in advance.
Centering Dynamically Loaded JPEG Images?
I'm loading multiple JPEG images of different sizes directly into an existing movie clip in Flash 6. I want them to load into the same movie clip, each replacing the one before it, and I need them to all center in the stage.
The problem is that the loaded JPEGs align their top left registration point to the movie clip's center registration point.
When loaded, the different size JPEGs all have their top-left corner aligned to the same point on the stage (the movie clip's original center point), but since they are different sizes, most are not centered.
Is there a way to cause the dynamically loaded JPEGs to align their center to the movie clip's center?
Easy Way To Resize Dynamically Loaded JPEG?
Hi,
I'm loading an external image and resizing it proportionally once it's loaded, but I need to know if there's a more efficient/effective way to do it. Right now I've got:
ActionScript Code:
loadMovie("image1.jpg", mc1);onEnterFrame = function() { percent1 = mc1.getBytesLoaded()/mc.getBytesTotal(); if (percent1 == 1) { ratio = mc1._width/mc1._height; mc1._width = 100*ratio; mc1._height = 100; }}
The image kinda jumps around as it's loading... seems like a pretty tacky way of doing it.
Any ideas?
Dynamically Loaded JPEG For Tiled Background?
Is it possible to dynamically load a JPEG image and use it as a tiled background for a fullscreen flash movie?
Everything I see online is for bitmaps already loaded in the library.
I don't see why it wouldn't be possible.
Thanks!
Preloading 'with A Progressbar' Dynamically Loaded Jpeg's
i want to preload (with a progressbar) a dynamically loaded .jpg
this is what i made (it's a flash mx file), but i'm not really satisfied because the progressbar shows 100% first and then it detects the loaded content. how can i make it so that the progressbar starts from 0% without showing the 100% first.
max.
http://members.tripod.com/gelectroni...er-dynamic.zip
Find Width Of JPEG's Loaded Dynamically?
I'm trying to dynamically place loaded JPEG's next to each other.
So I did something like...
ActionScript Code:
createEmptyMovieClip("image01", 0);
image01.loadMovie("image01.jpg");
trace(image01._width);
The output of trace is 0. However the debug tool lists _width property of image01 value as width of the image01.jpg file.
Looks like I can work around this by drawing a line (or some other shape) of the same width as the image into the movie like...
ActionScript Code:
createEmptyMovieClip("image01", 0);
image01.loadMovie("image01.jpg");
image01.lineTo(40, 0);
trace(image01._width);
The trace output for above is 40.
Which means I need to know the width of the image file ahead of time - not a huge deal as the widths can be loaded from an XML file.
However, idealy it seems like Flash should be able to tell me the width of the image, especially considering the debugger knows. Any ideas?
Thanks.
[F8] Reference Bitmap Object Of Dynamically Loaded Jpeg?
My search skills must be lacking today, so forgive this probably oft asked question, as I've been away from flash development for over a year:
How dow you reference the bitmap object of a jpeg dynamically loaded into a movie clip, from the internet not the library.
I initialize the flash.display.bitmapdata object, load the image into a holder movieclip named "holder", then how do I reference the bitmap object once loaded for use in dissolves, etc?
PHP Code:
this.createEmptyMovieClip('holder',this.getNextHighestDepth());
loadMovie('image.jpeg','holder');
Thanks, sorry my feeble search skills didn't find the answer!
Problem: Dynamically Loaded Jpeg Images "cropped"
Hello all,
I have a little problem when loading JPEG images in movieClip: the images I am loading have a black border around, but the right and bottom ones don't show. As if there was some cropping.
To have a look at the problem please click on this link.
http://www.staceyspiegel.com/version_4/stacey.html
Click on the "artwork" menu and then the "public work"
Finally click on one of the icon to see the preview image and the problem I am talking about.
Thank for your help in advance.
geraldine
JPEG Loading... How Do I Wait Until The Jpeg Has Loaded
Hi everyone!
this is the code that I currently use. I want to be able to wiat until the jpeg is loaded before going trought the loop again.....
any ideas? I have tried to use the getBytesLoaded and getBytesTotal but they always show up as 0. Very annoying.
Code:
var currentX = 0
for (k=0;k<galleryVar.items;k++){
_root.thumbslider.createEmptyMovieClip("thumb" + k,(50 + k));
eval("_root.thumbslider.thumb" + k)._x=currentX;
loadMovie(_root.categoryList+"/thumbnails/"+_root.imageArray[k]+".jpg",eval("_root.thumbslider.thumb" + k));
currentX = currentX + eval("_root.thumbslider.thumb" + k)._width;
trace("Pic" + k + " " + currentX);
}
the "currentX" (2nd line from the bottom) doesn't get a value because the jpeg doesn't get loaded quickly enough. How can I wait for the jpeg to load before going through the loop again.
I don't want to use frames becasue I am creating everything dynamically!
Am i making sense?
Hope someone can help me!
Thanks
A
Href To Function From Loaded Text
I have a text file that I'm loading with loadVariables. I'm using html in the text file and I want to call a function from the text file via the href command.
I have in my text file:
<A HREF="asfunction:Clicked,http://www.google.com">click here</A>
I have also tried:
"<A HREF="asfunction:Clicked,http://www.google.com ">Click Me!</A>";
The function I'm calling is:
function Clicked(linkName){
trace("In here");
trace(linkName)
};
These don't work.
Can anybody help me in getting this working.
Thanks
Dynamic Text Box W/ Loaded <a Href ... Doesn't Work
I have a movie clip that resides off stage until triggered to a certain _x/_y coordinate by way of a rollover movie clip on stage
Inside the movie clip that jumps to the specified location are three dynamic text boxes that pull from a text file. In the text file I have all the &blah= variables set up for each item that I pull.
the two of the 3 boxes that I populate are just basic html links but yet the dynamic boxes don't render them html even with the selection on.
Is this something easy I'm not doing or does this dig way into a vast wonderland of items I don't dare touch.
Thanks for any help you can provide.
Loading Jpeg's Dynamically
Hi
I am having problems getting my images for my portfolio to load into my site, here's the AS I'm using.
on(release){
_level0.DropZone_mc.loadMovie("http://www.visionsofthem.com/portfolio/cba.jpg");
}
I have made sure the images are not progressive, and the DropZone is has an instance name, yet the images do not load
Any sugesstions ??
thanks in advance
Load JPEG Dynamically
Please take a look at
http://www.rayfresh.com/retouche/
I want to create a slider like this and load the jpeg dynamically.
Slider can be create through masking but dont know, how to load these two jpeg images dynamically for slider and 1 dynamic image of zoom. Please tell me how to do it.
Dynamically Display Jpeg
I want to display a jpeg in a Flash movie based on a value in a MIME-format text file.
The text file is called "variables.txt", and contains the following:
inum=image1.jpg;
The following obviously works:
_root.createEmptyMovieClip("imageHolder1",200);
imageHolder1._x=0;
imageHolder1._y=100;
loadmovie("image1.jpg","ImageHolder1");
But how do I replace the hard-coded image name with the value of the variable?
Is it even possible?
Thanks.
Loading A JPEG Dynamically...problems.
Hello,
Let me start off by saying i am a beginner to actionscript, although i have a decent amount of experience in programming.
I am currently using Flash MX6.
I have reviewed all the help files available in flash and read most of the recent topics on this forum, but i am still stuck with a problem. This is probably due to my inexperience with actionscript, so i propose this question to the Forum...
(This should be simple enough for all you Hardcore action scripters!
My aim is to load a list of JPEGS at run time and display them on a viewer(Created by Flash) one by one.
To make matters simple ill cut down to the problem...
When i try to load the variable list with the names of the jpegs from a text file and then ask flash to display them, this does not work.
For example lets just load one piture name variable...
loadVariablesNum("Index.txt", 0);
//This loads a variable loadname=picture1.jpg
Viewer.loadMovie(loadname);
//This should display the jpeg "picture1.jpg" in the object "Viewer"
So basically by assiging the contents of the text file to the variable "loadname" i should then be able to use this variable to call the movie load file.
This does not work...
I have tried several things...
I tried inserting a loadname="picture1.jpg"; in the actionscript before the load, and obviously this did work. I also tried displaying the contents of the variable "loadname" in a dynamic text field, and it displayed it correctly.
This means that the variable is loading from the text file and that the jpeg should be displayed if the variable was being handed correctly.
Doing a trace of the variable 'loadname' in question on the text file, gives me 'Undefined', but still this same variable works with the dynamic text and is displayed???
SO WHY DOES THE .loadMovie NOT RECOGNISE MY VARIABLE loadname EVEN WHEN THE DYNAMIC TEXT FIELD DOES
Thanks for your time, i tried not to be long winded, but you have to explain these things correctly.
Cheers,
Mek
Dynamically Create A JPEG File
create jpeg...is it possible to create a jpeg file from a dynamically created movie clip in flash?
My flash file will query a database for information, then display this information in the form of a graph. I would also like to be able to save that same graph as an image for my users to download.
I know that it is possible in PHP to create the image, but I would much rather use Flash to draw the vectors, etc.
any help is appreciated
Dynamically Loading JPEG Files
I have created a project that loads thumbnail JPEGs into three of four scenes. The thumbnails are MCs that act as buttons which dynamically load text and a larger JPEG image (like a catalog would do). The first scene with thumbnails loads the larger JPEG files correctly, but the subsequent files do not. I tried using the same MC instance name and code for all three scenes.
_root.image.loadMovie("JPEGname.jpg");
What am I missing?
Thanks
Dynamically Loading JPEG Files
I have created a project that loads thumbnail JPEGs into three of four scenes. The thumbnails are MCs that act as buttons which dynamically load text and a larger JPEG image (like a catalog would do). The first scene with thumbnails loads the larger JPEG files correctly, but the subsequent files do not. I tried using the same MC instance name and code for all three scenes.
_root.image.loadMovie("JPEGname.jpg");
What am I missing?
Thanks
Loading Jpeg Photos Dynamically With
I am working on a movie that would load JPG photos dynamically from a directory. The photos are named Photo0, Photo1, etc. The movie has only 1 frame.
I am currently testing this with a button with an instance name of "but" but would like it to load without the button. I would like a pause of about 6 seconds between the pictures.
My problems, the pictures are not starting at "Photo0" and whichever picture are not changing. The following AS code I used on the button is the result of studying other similar situations. The code would need to be placed elsewhere when the button is gone:
pic="Photo"
n=0
but.onPress=function (choosePic){
_root.createEmptyMovieClip("container",1);
for(count=1; count<5; count++){
container.loadMovie(pic+n+".jpg");
container._x=container._y=50;
n++;
}
}
setInterval(choossPic,1000);
Thanks
Dynamically Loading A Jpeg In To A Movie Clip And Then....
First of all I am having problems loading a external jpeg dynamically in to a movie clip without killing the movie clip. Is it even possible to load a dynamic image to a movie clip and maintain the control over the movie clip to animate and do all the things you can do to a movie clip. Thanks in advanced for any replies.
Loading External JPEG And SWF To Library Dynamically
Hi!
Is there a way to dynamically load external picture to library? The problem is, every time I load a picture with loadMovie(), I have to wait till Flash loads it (size is 100 KB - slow on 56k connection). I need some way to load it only once, put it into library, and have it available for reuse later.
It's really painful, since I have image gallery with more than 40 pictures, every time I open the gallery, it loads every single of 40 pictures again.
So I need some way to cache this pictures inside Flash...
Thanks!
How To Get Scrollpane To Load Jpeg Files Dynamically
Hi... I'm working on a project, and trying to get the Flash CS3 ScrollPane to work.
It is a real nightmare!
Ok trying to load some jpegs into a scrollpane dynamically.
I opened a new Flash file, and got it working with the following script:
Code:
this['scrollpane'].contentPath = "empty_mc";
this['scrollpane'].content.attachMovie("content", "inst_content", 1);
this['scrollpane'].content['inst_content'].loadMovie("sax.jpg");
So, I went into my project... and added the following into the movieclip which contains the ScrollPane:
Code:
this['window_inst'].contentPath = "empty_mc";
this['window_inst'].content.attachMovie("content", "inst_content", 1);
Ok... so that works... I can see "empty_mc" in the ScrollPane and it scrolls.
So, now I go into my external actionscript... and put the following code in when the page loads:
Code:
mcReview['window_inst'].content["inst_content"].loadMovie("sax.jpg");
It doesn't work.
So I tried tracing.
trace(mcReview['window_inst']); works
trace(mcReview['window_inst'].content); undefined
It is driving me CRAZY!
Someone puh-lease help me!
Dynamically Generated Flash To Jpeg Conversion?
I have a client that wants to take the dynamically generated content from a flash application and export it to an image. It's an application that allows the user to assemble something using objects drawn by flash (sort of like a floor plan). The client then wants to be able to export these "plans" to an image like a jpeg.
anybody have a clue how I can do this?
dynamically generated flash screen -> image
js
Loading Pictures Dynamically To A Dynamically Loaded Clip
Here's the issue. I'm creating a video player and EVERYTHING is working swimmingly except for one thing. On my list of available videos (which is XML driven) everything reads in correctly and the movie clips are added correctly, but I can't get the thumbnails to add to the stage. Someone help!! Here's the code I'm using:
EDIT: Oh yeah, the thumbs are located in a separate directory and the location is indicated in the xml file. the "vidList" variable is my XML list.
PHP Code:
function loadPics():void //this is the first function called...{ for(var i:uint = 0; i < vidList.length(); i++) { var picLoader:Loader = new Loader(); picLoader.addEventListener(Event.COMPLETE, onPicLoaded); picLoader.load(new URLRequest(vidList[i].thumb)); trace(vidList[i].thumb); picLoader.width = 72; picLoader.height = 54; picLoader.x = 0; picLoader.y = 0; picLoader.name = vidList[i].title; } populateList();}function onPicLoaded(e:Event):void //this should be called after each pic is loaded, but the trace statements have yet to appear.{ trace("________________________"); trace(e.currentTarget.name); trace("________________________");}function populateList():void //everything in here works fine{ for(var i:uint = 0; i < vidList.length();i++) { var lItem:ListItem = new ListItem(); lItem.title.text = vidList[i].title; lItem.caption.text = vidList[i].caption; lItem.x = 5; lItem.y = 7+(79*i) lItem.filters = [dsf, bf]; lItem.name = vidList[i].title; list.addChild(lItem); lItem.addEventListener(MouseEvent.CLICK, clickVideo); }}
Can anyone give me any kind of suggestion on how to do this?
Basically, after all the foundation stuff for the video player is done, it calls the loadPics function. That is supposed to load each pic and then upon the pic being loaded, it was going to call the onPicLoaded function and I was going to (somehow) pass them to some type of array. Then, in my populateList function I would just use "i" to put the correct pic with the correct video.
Please help! I can give you more if you need it. I just don't know what else to post.
Dynamically Loading Images Into Dynamically Loaded MovieClips
I'm read through many of the posts and found several on this topic, none, however, that addressed all that I need addressed. I've tried several of the suggestions but so far nothing seems to work.
What I want to do is alter the width of images loaded dynamically into a dynamically loaded set of movieclips. all of the widths of the images are different, but i want them set to the same width. The width seems to stay at zero, however, and I cannot seem to change it.
Here is my code:
for (var i:Number = 0; i < 8; i++){
var mc = attachMovie("rect_mc", "r" + i, this.getNextHighestDepth());
mc._x = 90 + (i * (mc._width+5));
mc._y = 375;
mc.img_txt.text = "image" + (i+1);
mc.img_mc.loadMovie("myPic" + (i+1) + ".jpg");
mc.img_mc._xscale = mc.img_mc._yscale = (50/mc.img_mc._width) * 100;
};
The last line is the one that does not function properly.
I'd appreciate any help anyone can provide. thanks.
Loading External Graphic (jpeg) Using Text File Dynamically
Hello all experts , i need your help ~!
Can anyone please help me by teaching me how to load an external jpeg file which can be change dynamically from a text file?
it would be best if you could provide some tutorial or posting some examples.
I have being stuck for 2 days and have tried out many ways but still cant work. Below is my code which i have tried out! Thanks for helping me . : )
myVars = new LoadVars();
myVars.load("text.txt");
myVars.onLoad = function(success)
{
if (success)
{
loadMovieNum("myVars.image", 1);
}
}
Dynamically Load Data Into Dynamically Loaded Swf?
hi,
i have 2 swfs, 1.swf and 2.swf.
2.swf will be loaded into 1.swf using loadMovie(). but there is some data that is dynamically loaded into 2.swf when it's played.
these data get loaded successfuly when i play 2.swf individually. but when i play 1.swf and load 2.swf into 1.swf, the data supposed to be loaded into 2.swf are not loaded.
can somebody give me some leads?
thanks
Event On Loaded Jpeg
Is it possible to know when a jpeg has fully loaded into a movieclip?
If so How?
////////////////////////////////////////
Is this the method?
onClipEvent(data) {
goToAndPlay(2);
}
Checking To See If Jpeg Is Loaded
hi,
i am trying to use the search to see if there are any realted questions but i am having a bit of a lag
how can i check to see wheter a jpeg file is loaded or not so i can create a preloader
Kendal
Check If JPEG Loaded?
Loading a JPEG (the url of which is the var "iphoto")
loadMovie(iphoto,"_root.galleryPhoto");
_root.photoPhoto.gotoAndPlay("displayed");
I must wait for the image to load before I go to the next frame. How do I do this?
Checking Whether A Jpeg Is Loaded In MX
Never done this before; I'm loading a jpeg as an MC into MX using this:
backpic.loadMovie("pic4.jpg");
I don't want the _root movie to do anything until the jpeg is fully loaded. How do I ask if it's fully loaded? Do I have to do anything special because it's not a .swf?
Any help would be great.
Thanks.
Can I GetProperty From Loaded Jpeg? Huh
is there a way to retrieve a property from a loaded jpeg...mainly its hieght and width and position ....
and then change that property
i know i can use the MC it loads into but that does not tell me the properties of the loaded image.
some insight would be muchly appreciated
Loaded Jpeg Won't Go Away + X,y Problem
Hi
I have externally loaded jpegs using AS in an external AS form on a sever.
Everything seems to work great. The images are zoomable and everything. Check it out. http://www.members.shaw.ca/creatifdesign/
There is ONE problem and it's BIG.
When you click on any other menu links the previously loaded jpegs don't go away.
The menu links already have AS telling the play head to go to the appropriate frame labels like this.
on (release) {
gotoAndPlay("contact");
}
So how, where and what AS do I add to "clear" any previously loaded jpegs?
Check If Jpeg Has Loaded
I searched the boards, googled it but I don't come accross any good solution.
Is there some standard script wich cheks if the jpeg is fully loaded then executes another movie to play.
This is how I preload the jpeg :
onClipEvent (enterFrame) {
total = _root.beeld.pictures1.getBytesTotal();
loaded = _root.beeld.pictures1.getBytesLoaded();
this._xscale = (loaded/total)*100;
_root.percent = Math.round((loaded/total)*100);
}
Then I check if it has loaded completely and want another movie start playing.
Well this part isn't working :
if (_root.percent == "100") {
_root.beeld.gotoAndPlay(2);
}
What's wrong here?
Determining If A Jpeg Has Loaded?
I have the following load code:
Code:
_root.loaderMC.loadMovie("new.jpeg");
and what I'd like to do is to have the timeline hold there until the rather large jpeg has finished loading. What's the easiest method to accomplish this?
Thanks in advance!
Specifying Location Of Loaded Jpeg
Hi there,
I'm using the LoadMovieNum command to load a jpeg file from a website. I have it loaded correctly but I'm not sure how to specify the location of it in my movie. If I use this command to load another swf file, I just put this.x = number and this.y=number in that swf file and it will go to that location. Obviously I can't use this method for a jpeg file. Thanks,
Centering Loaded JPEG In MC
Hi guys. I've looked all over the forums for an answer to this. Basically I want to know how you can load a JPEG in a MC and keep it centered?
For example: I'm working on a photography site. Some pix are vertical and some horizontal. Each shows up in different positions according to their top left corner.
How can you work around this and have them be centered in a movie or area? I will gladly PayPal anyone $40 for a solution!! (Yes I am that desperate for a solution!)
Thanks for any help!
- Will
Resizing Loaded Jpeg
I don't get why this doesn't work.
Code:
_root.createEmptyMovieClip("container",10);
container.loadMovie("picture.jpg");
container._x = container._y = 0 ;
container._height = container._width = 50;
I cannot see anything when I test the movie, however if I take out
container._height = container._width = 50;
I can see the picture, but it is not resized.
Centering Loaded JPEG In MC
Hi guys. I've looked all over the forums for an answer to this. Basically I want to know how you can load a JPEG in a MC and keep it centered?
For example: I'm working on a photography site. Some pix are vertical and some horizontal. Each shows up in different positions according to their top left corner.
How can you work around this and have them be centered in a movie or area? I will gladly PayPal anyone $40 for a solution!! (Yes I am that desperate for a solution!)
Thanks for any help!
- Will
|