Dynamically Generate Image?
I'm on a fantastic journey to find this answer...any help would be appreciated.
I have a Flash movie that creates dynamic graphs based on user inputs. Once produced, I need something that can "capture" that frame and export it to an image so that the user can save it or import it into another application (i.e. powerpoint).
I need something server-side that is transparent to the user. It should be as easy as clicking a button in the Flash movie or on the parent web page that copys an image of the .swf to the clipboard or reloads the page replacing the .swf with a .gif/.jpg of that current frame.
Publishing a .gif from the .fla won't work. The gragh is produced dynamically.
I've found published code that allows you to draw and record user mouse movements in a Flash movie and sends those to an .aspx page to dynamically build a .jpg pixel by pixel, but this only creates crude ms paint type of images. There isn't anyway in actionscript (that I know how) to read each pixel on the Flash stage.
Can Generator or something like Turbine do this from a .swt?
Thanks for any suggestions.
FlashKit > Flash Help > Flash General Help
Posted on: 02-05-2003, 12:23 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Dynamically Generate Image?
I'm on a fantastic voyage to find this answer...any help would be appreciated.
I have a Flash movie that creates dynamic graphs based on user inputs. Once produced, I need something that can "capture" that frame and export it to an image so that the user can save it or import it into another application (i.e. powerpoint).
I need something server-side that is transparent to the user. It should be as easy as clicking a button in the Flash movie or on the parent web page that copys an image of the .swf to the clipboard or reloads the page replacing the .swf with a .gif/.jpg of that current frame.
Publishing a .gif from the .fla won't work. The gragh is produced dynamically.
I've found published code that allows you to draw and record user mouse movements in a Flash movie and sends those to an .aspx page to dynamically build a .jpg pixel by pixel, but this only creates crude ms paint type of images. There isn't anyway in actionscript (that I know how) to read each pixel on the Flash stage.
Can Generator or something like Turbine do this from a .swt?
Thanks for any suggestions.
Dynamically Generate Image Rows?
Hi, I am trying to write a script that dynamically lays out images in rows of 3. I've written the following script to test out my idea, but it isn't working. in this script, the height is being determined too. I've attached the .fla too, and would obviously appreciate any help. Cheers, and thanks.
Code:
var xPos:Number = 40;
var yPos:Number = 40;
for(var i:Number = 0; i < 7; i++) {
var item:MovieClip = holder.attachMovie("item", "item_" + i, {_x:xPos, _y:yPos});
for(var n:Number = 0; n < 3; n++) {
var item:MovieClip = holder["item_"+n].attachMovie("item", "itemN_" + n, {_x:xPos, _y:yPos});
trace("i = "+i);
trace("n = "+n);
}
}
Dynamically Generate Image Rows?
Hi, I am trying to write a script that dynamically lays out images in rows of 3. I've written the following script to test out my idea, but it isn't working. in this script, the height is being determined too. I've attached the .fla too, and would obviously appreciate any help. Cheers, and thanks.
Code:
var xPos:Number = 40;
var yPos:Number = 40;
for(var i:Number = 0; i < 7; i++) {
var item:MovieClip = holder.attachMovie("item", "item_" + i, {_x:xPos, _y:yPos});
for(var n:Number = 0; n < 3; n++) {
var item:MovieClip = holder["item_"+n].attachMovie("item", "itemN_" + n, {_x:xPos, _y:yPos});
trace("i = "+i);
trace("n = "+n);
}
}
Generate Swf Dynamically....? Help
Hi,
Let's say I have a swf-file and 4 jpegs. The 4 jpegs are loaded into the swf with a loadmovie-command.
Each day the 4 jpeg change. So everyday different images will be displayed in the flash.
So far so good, but..... This doesn't work if somebody has a flash5 player installed.
Is there some possibility to dynamically generate the swf-file with the 4 jpeg in the movie so I don't have to load them externally?
I thought this could be done with Generator, but it doesn't really excist anymore, does it?
Is there another way to solve this problem??
Thanks in advance!
Generate Numbers Dynamically
hi there,
i am very new to flash scripting. i want text box in which the numbers start from 500 and increase in a good pace.once it reaches a huge no.(like 50000)the generation stops and the number turns red.
how can i do this.
Generate Row Of Images Dynamically
Hi, could anyone suggest any good tutorials/point me to some source code to do this...
I have a row of thumbnails which make up a strip along the bottom of a page. They scroll horizontally depending on where mouse is hovering (you know the sort of thing).
Anyhow, I need to be able to upload new images into a directory, and then add their file-names into a database. From this, the images need to automatically appear in the flash movie.
My action scripting is not too good, so a fairly gentle explanation would be great.
Many thanks for your time.
Dynamically Generate Textboxes
Hello,
I'm trying to generate TextFields dynamically and still being able to access them by name. I give the TextField a name when I create it, but I can't access it by that name. Here's what I have so far:
Attach Code
var _arrBtnLbls:Array = new Array;
_arrBtnLbls.push("main");
_arrBtnLbls.push("about");
_arrBtnLbls.push("web");
_arrBtnLbls.push("print");
_arrBtnLbls.push("contact");
for(var i:int = 0; i <= _arrBtnLbls.length - 1; i++){
generateTxtBox(_arrBtnLbls[i]);
}
function generateTxtBox(n:String){
var txtBox:TextField = new TextField;
txtBox.autoSize = TextFieldAutoSize.CENTER;
txtBox.name = n.replace(" ", "_");
addChild(txtBox);
}
Generate Thumbnails Dynamically?
Hello dudes.
I have a question about generating a sort of imagegallery from a folder of pictures using Flash and a XML-document.
I have managed to get the the picturelisting working, but i would like to be able to click the images too, wich should open a url that's specified in the XML-document. (the one in the <url>-tag for the specific image).
I'm not good to explain and my enlish sucks (as my flash-skills), so i'll just post the source and the .fla for you to look at (the xml and directories are included in the zipped file as well).
And if there is a simpler way to do this whitout having to put out 6 static container-movieclips and generate them dynamically, i would love to know how
thanks.
MaggoT
Here is the actionscript:
// Variables
var whichBio = "adams";
var whichXMLIndex = 0;
// Buttons
btn_adams.onRelease = function() {
whichBio = "adams";
whichXMLIndex = 0;
processXMLData();
}
btn_gloria.onRelease = function() {
whichBio = "gloria";
whichXMLIndex = 1;
processXMLData();
}
btn_city.onRelease = function() {
whichBio = "city";
whichXMLIndex = 2;
processXMLData();
}
// Read data from XML-document
var xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad=processXMLData;
xmlData.load("biobilder/content.xml");
stop();
// Process the data and spit out the images
function processXMLData(success)
{
var bio = xmlData.childNodes[whichXMLIndex].childNodes;
for( var x=0; x<bio.length; x++ )
{
var currentImage = _root["img"+(x+1)];
var currentHref = bio[x].childNodes[0].childNodes[0].nodeValue;
var currentInfo = bio[x].childNodes[1].childNodes[0].nodeValue;
var currentUrl = bio[x].childNodes[2].childNodes[0].nodeValue;
loadMovie("biobilder/" + whichBio + "/" + currentHref, currentImage);
}
}
How To Dynamically Generate Buttons In AS3?
I just need to be steered in the right direction. In AS3-CS3, we can't apply code to objects anymore, right?
My old method for creating buttons off an original was to create an instance in the library and set it for export. Then I would duplicate it onto the stage at runtime, dynamically setting each button's action and text at that time.
Now in AS3, What do I do? Create a class that can be applied to buttons or something?
Dunno the best way to do it now. I'm thinking of creating a listener that listens to all my buttons I create at runtime, and does an action based upon the instance of the button pressed.
Generate Swf Files Dynamically
Hi Folks
I need to generate swf dyanamically. is it possile?
Like online a flash file is running in which i am customizing some faces. after every customization can save a face as a independent .swf file.
IF YES (gr8 news) then how can we do that.
guys please help me.....
Dynamically Generate Form Fields?
Hi guys,
Can anyone please tell me how Id go about dynamically generating a number of input form boxes on the fly. I want the user to enter a number, say he/she enters '5' then 5 input form boxes on generated on the screen. I then want each of these generated forms to have variable names assigned to each field e.g. var1, var2, var3, var4, var5 etc.
Cheers....John
Dynamically Generate MC Name With Array Indices
Trying to generate mc thumbnails on a page. I have one mc and want to duplicate it like a gallery.
I would think this would work, but it's not...
for(var i = 0;i<thumbs.length();i++){
myMc[i].x = 25*i;
myMc[i].y = 30*i;
addChild(myMc[i]);
}
TypeError: Error #2007: Parameter child must be non-null.
Can someone help... Thanks
Dynamically Generate Progressive FLV Thumbnails?
I have been going through the Macromedia VideoSource project... http://www.macromedia.com/devnet/mx/...eo_player.html
The main thing that intrigues me about the project is that it can create FLV thumbnails on the fly using the VideoThumb.as file included in the project download. Unfortunately, the project was made to be used on Flash Communication Server, and I am using Progressive FLVs on my site. I have been trying to figure out how to convert the VideoThumb.as file to work with progressive FLV instead of streamed FLV.
I must say that I'm quite surprised no one has done this yet, as I think it would be a valuable contribution to the Flash FLV community.
Anyways, as far as the code in the VideoThumb.as file, the main part I don't understand is this snippet...ok, so it's a pretty big snippet
ActionScript Code:
// str is the suggested string to render from the tree (based on the node) // node is the entire XMLNode for the row // sel is the selected state (not usually used) function setValue(str : String, item, sel) { _visible = item != undefined; if ( !_visible ) return; label.setValue( item.attributes.name ); // Thumbnail is picked up as the first frame of the playlist var url = item.attributes.url; var stream = item.attributes.thumb; var start = item.attributes.thumbpos; // If explicit thumb is not specified use the // start frame of the first stream if ( stream == undefined ) { stream = item.childNodes[0].attributes.name; start = item.childNodes[0].attributes.start; } // Give up if we still don't have valid thumb info if ( stream == undefined ) return; // Render the thumbnail only if necessary if ( streamurl == url + "/" + stream ) return; streamurl = url + "/" + stream;//trace( streamurl ); nc = new NetConnection();//nc.onStatus = function( info ) { trace( info.code ); } nc.connect( url ); ns = new NetStream(nc); ns.onStatus = function(info) { if ( info.code == "NetStream.Play.Stop" ) { nc = null; ns = null; } } thumb.video.attachVideo(ns); ns.connect(); ns.play( stream, start, 0 ); }
I understand that most of the function is just grabbing the variables from the XML. And it seems to me that most of the code above would work for Progressive FLV, but I get lost at NetStream, ns.connect, and ns.play... I'm not sure how to convert them to Progressive.
I have attached the VideoThumb.as file and the entire project can be downloaded from http://www.macromedia.com/devnet/mx/...eo_player.html
If you don't want to take the time to figure the whole thing out, do you at least know if the Netstream command could be converted to run with Progressive FLV, i.e.
ActionScript Code:
ns = new NetStream(null);
or something along those lines? Thanks!
Dynamically Generate Progressive FLV Thumbnails?
I have been going through the Macromedia VideoSource project... http://www.macromedia.com/devnet/mx/...eo_player.html
The main thing that intrigues me about the project is that it can create FLV thumbnails on the fly using the VideoThumb.as file included in the project download. Unfortunately, the project was made to be used on Flash Communication Server, and I am using Progressive FLVs on my site. I have been trying to figure out how to convert the VideoThumb.as file to work with progressive FLV instead of streamed FLV.
I must say that I'm quite surprised no one has done this yet, as I think it would be a valuable contribution to the Flash FLV community.
Anyways, as far as the code in the VideoThumb.as file, the main part I don't understand is this snippet...ok, so it's a pretty big snippet
ActionScript Code:
// str is the suggested string to render from the tree (based on the node) // node is the entire XMLNode for the row // sel is the selected state (not usually used) function setValue(str : String, item, sel) { _visible = item != undefined; if ( !_visible ) return; label.setValue( item.attributes.name ); // Thumbnail is picked up as the first frame of the playlist var url = item.attributes.url; var stream = item.attributes.thumb; var start = item.attributes.thumbpos; // If explicit thumb is not specified use the // start frame of the first stream if ( stream == undefined ) { stream = item.childNodes[0].attributes.name; start = item.childNodes[0].attributes.start; } // Give up if we still don't have valid thumb info if ( stream == undefined ) return; // Render the thumbnail only if necessary if ( streamurl == url + "/" + stream ) return; streamurl = url + "/" + stream;//trace( streamurl ); nc = new NetConnection();//nc.onStatus = function( info ) { trace( info.code ); } nc.connect( url ); ns = new NetStream(nc); ns.onStatus = function(info) { if ( info.code == "NetStream.Play.Stop" ) { nc = null; ns = null; } } thumb.video.attachVideo(ns); ns.connect(); ns.play( stream, start, 0 ); }
I understand that most of the function is just grabbing the variables from the XML. And it seems to me that most of the code above would work for Progressive FLV, but I get lost at NetStream, ns.connect, and ns.play... I'm not sure how to convert them to Progressive.
I have attached the VideoThumb.as file and the entire project can be downloaded from http://www.macromedia.com/devnet/mx/...eo_player.html
If you don't want to take the time to figure the whole thing out, do you at least know if the Netstream command could be converted to run with Progressive FLV, i.e.
ActionScript Code:
ns = new NetStream(null);
or something along those lines? Thanks!
Generate Path To Frame Dynamically
hi folks,
i am trying to load a movie into level 10 of another one (which works just fine). the container clip contains a movieclip that works as a timer so that the movie in level 10 should jump to another frame every 5 seconds.
these frames have names such as bewegung1, bewegung2, ...
i tried to make the timer-script generate the path to the frame dynamically as follows:
onClipEvent (load) {
timer = getTimer()+5000;
bewegungsnummer = 1;
logomove = "bewegung"+bewegungsnummer;
}
onClipEvent (enterFrame) {
verweildauer = getTimer();
if (verweildauer>timer) {
_level10.logo.gotoAndStop(logomove);
timer += 5000;
bewegungsnummer += 1;
}
}
i am just not able to make flash accept the path to the frame.
please, what am i doing wrong?
you can get the fla's on http://www.8ung.at/fjperchtoldsdorf/tek-tips/fjhp.zip
regards
Firegambler
Dynamically Generate Buttons (for Page Use)
Right,
The idea is to be able to dynamically add buttons to any page, by requesting a .swf file with params, for example:
somedomain.com/thefile.swf?text=Submit&link=(...)
Which would return a .swf that changes in width so all the text fits and a onrelease to go to the link.
I've tried a lot to get this working, and searched a lot. But I'm still a newbie to AS and flash.
Any help or an example would be greatly appreciated.
Thanks in advance.
Controlling Variables In A Dynamically Generate Movie?
hi there!
the situation:
i got a movie, called "double", that is dynamically generated by duplicateMovieClip about 2 to 20 times. this happens on _level0. the duplicated movie contains a variable called "side".
the problem:
the different names of the movies. how could i pass a worth to the variables in the duplicated movies?
thanks for helping!
HOw To Generate Movie Size/property Dynamically?
Hello
I know that there is a way to generate Text Fields dynamically using createTextField() command, but I'm not sure if there is a way to generate a movie size dynamically.
for example I can generate a Dynamic text witht the size 300x50 but if my movie size is 550x400 , that will look bad. it would be nice if I can generate the movie size as big as the text field.
any idea is appriciated
Boros
Dynamically Generate Dynnamic Text Boxes
is there a way to creat dynamic text boxes as variables in a for loop?
this doesn't work but might give you and idea of what I am talkinga bout
for (var z = 0; z < _root.NUM_ROWS ; z++)
{
create dyntxtbox var item[z];
create dyntextbox var item[z]p;
create dyntextbox var item[z]d;
}
then it keep creating those three for the number that is passed in the _root.NUM_ROWS variable ... hope that makes sesnes.
Dynamically Generate Text From Form Fields?
Hi,
I'm looking to learn how to dynamically generate text from what is being typed into a form field.
IE: I want the user to be able to type out a sentance into a form field, and see it appearing in a movie clip elsewhere on the site.
Are there any good tutorials for this sort of thing??
Dynamically Generate Table From Text Boxes
Hiya, I'm looking at making a table from dynamically generated text boxes that will adapt their size so the information that is passed to them will fit. the table needs to be 5 columns wide and 10 rows deep.
I've tried doing it by generating each row seperately:
ActionScript Code:
//x Positions for columns
var x1:Number = 0;
//0
var x2:Number = 90;
//1
var x3:Number = 280;
//2
var x4:Number = 530;
//3
var x5:Number = 800;
function createRow(rowNumber:Number) {
for (i=0; i<5; i++) {
rows = i+1;
var xPos = ["x"+(i+1)]
var yPos = totalRowsHeight()
this.createTextField(["my_txt"+(i+1)], 1, xPos, yPos, ["x"+(i+2)]-["x"+(i+1)]);
this["my_txt"+(i+1)].multiline = true;
this["my_txt"+(i+1)].wordWrap = true;
this["my_txt"+(i+1)].text = "I am text box "+(i+1);
}
}
var rows:Number = 3;
function totalRowsHeight():Number {
var totalHeight:Number = 0;
for (i=0; i<rows; i++) {
//trace("i");
totalHeight += this["my_txt"+(i+1)].height;
//trace("mytxt1"+this["my_txt"+1].height)
}
//trace("TOTAL HEIGHT");
return totalHeight;
}
and haven't finished yet. i was wondering if anyone has come across the solution to my problem before.
Thanks for any help,
Schm
UPDATE-
I've just realised that I need to specify the height of the text box before it can be created, Is there any way that I can create a text box without specifying the height as this will vary depending on the content. The only way i can think is to use a fixed width font. Any ideas?
Cheers!
Schm
I Need To Dynamically Generate And Print A Report That Varies In It's Number Of Pages
I know some of these things can be done, but I am having trouble putting them all together and getting them to work.
I need to create a program that works as follows:
On the opening page you identify yourself and you are assigned an ID number. The next page allows you to choose any number of 17 catagories. You are then asked questions for each catagory you have chosen. The answers to the questions (some of which can be very long) are formatted and able to be printed to a laser printer. A text (or other type of file) is created and and stored on the server. Two weeks later you can type in your ID number and the program updates to show all of your previous answers and allows you to chose more categories and answer more questions, print all the updated answers, and save a new TEXT file etc.
Some of the issues that I am not clear on is saving the TEXT file to the server to be referenced later and being able to print out a number of pages that varies from one user to another, i.e. one person's set of answers may fit onto 3 pages and another's may need 5 pages.
Any help and direction will be greatly appreciated.
Thanks
Generate An Image For Email
Hi,
I'm trying to figure out a way to generate an image or swf movie from what the user creates on the screen.
Example: The user drages a couple movieclips and a dynamic text box to the desrired location on the screen. What I need to do is when a button is clicked, I need the current arrangement of movieclips that the user created sent to an email address as an image/swf file. I know PHP is involved in this, but I've having major difficulties producing this. Any help would be greatly appreciated, cause this is a very important project. Thanks for your help.
Generate The Image By Flash
i have made one flash where i edit the flash at runtime now i need to generate the image from that
can any one help me out i got this code in net but i am unable to use it can you help me out
/*
import flash.display.BitmapData
var b = new BitmapData(Stage.width,Stage.height)
b.draw(_root)
*/
Question About Generate Image Binary Data With Swf File
I want to generate image binary data with swf file.
For example, sprite1 which is Sprite's instance has lots of displaying
object child, we can use addChild(sprite1) to show them on the screen.
I want to generate image binary data from sprite1, the image looks
like the spirte1 displaying in the flash player on the screen. So I
can send the image binary data to server, and save it.
Can any one give me some suggestion, thanks a lot.
PNGEncode is not the way, because PNGEncode read the image information
with getPixel32 method of BitmapData class, but Sprite has no this
method. Please see the bleow code.
var ld:Loader = new Loader();
var url:String = "
How Dynamically Change The Image In Dynamically Created Row Of Images?
Hi everybody,
I am wondering if someone can help me to find out on how to replace the images in row of dynamically loaded images. I need on Press of an icon from the row of images replace the image of this icon to new one. Below is the code of creating the images row based on array and XMl data. I create an array based on data taking from XML.
Code:
var numOfImages:Number;
var thumbHeight:Number = 8;
var thumbSpace:Number = 100;
var thumbTotalDistance:Number = thumbHeight+thumbSpace;
var xCounter:Number = 5;
var thumbsCollectionHeight:Number;
var currentImage:Number = 0;
var moveOutDist:Number = 10;
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
var IM_Img:Array = new Array();
var IM_Title:Array = new Array();
//==================================================================================================================
//=============================== THUMBS IMAGE LOADER ==========================================================
//==================================================================================================================
var thumbImgLoader2:MovieClipLoader = new MovieClipLoader();
var thumbImgListener2:Object = new Object();
thumbImgListener2.onLoadProgress = function(target:MovieClip):Void {
};
thumbImgLoader2.addListener(thumbImgListener2);
thumbImgListener2.onLoadComplete = function(target_mc:MovieClip):Void {
};
//==================================================================================================================
//=============================== XML ==================================================================================================
//==================================================================================================================
var totalXML:XML = new XML();
totalXML.ignoreWhite = true;
totalXML.onLoad = function(success) {
var TNnode = this.firstChild.childNodes[1].childNodes;
numOfImages = TNnode.length;
//---------------- ATTACHING THUMBS -----------------
//===========================================================================================================
for (i=0; i<numOfImages; i++) {
var mc:MovieClip = imCollection_mc.thumbs_mc.attachMovie("mcThumb_IM", "thumb_" + i, i);
mc._y = 0;
mc._x = xCounter;
xCounter = xCounter+thumbTotalDistance;
thumbImgLoader2.loadClip(TNnode[i].attributes.thumb,mc.loader_mc);
IM_Title.push(TNnode[i].attributes.title);
imCollection_mc.thumbs_mc["thumb_" + i].mc_title.title_txt.text = IM_Title[currentImage];
mc.id = i;
trace (mc.id);
mc.onPress = mc_im_onPress;
mc.xx = mc._x;
mc.yy = mc._y;
}
};
//-------------------------------------------------------------------------
totalXML.load("images.xml");
Here is onPress event where I was thinking to add this functionality:
Code:
function mc_im_onPress() {
mcToSelect = this;
if(this.id==8){
//here I need to tell to replace the image from mc8 to new image from array to image#34 from xml
}
}
Any advice is highly appreciated. Thanks.
Dynamically Loading Image Problem (Image Covers Up The Animation)
I am trying to create a movie that uses a dynamically loading jpeg. I have some vertical lines that move across the movie and should go over the jpeg image. The problem I am having is the image covers the effects. I have tried to add "loadMovieNum("images/main_image.jpg", 0);" on Layer 2 and then on Layer 1 I have my animated lines that should go across the jpeg image. The line animation is on the bottom layer, but the image still covers the effects. Am I doing something wrong?
I have attached the .fla file for an example.
Dynamically Load An Image-Either The Image Resizes Or The Movieclip It's Loading To?
I will make a frame movie instance 400 X 400px called frame_mv.
I will use the script:
loadMovie("pic1.jpg", frame_mv);
If the pics being loaded were of different sizes. eg pic1.jpg was 1600 X 800
1- How would I make the pic resize to 400 X 400 or 400 X 200 so that it fits the frame_mv.
2- How would I make the frame_mv change size according to the pic dimensions being loaded?
Basic Image View Not Dynamically Loading Image URL
What I have done Is added only a List Component to the stage and named it "lb". Then I'm Dynamically loading the data and label attributes from an external XML file. Now, I am Listening for the change event on 'lb" in order to create a new url request from the data property of the selected 'lb' item. Unfortunately, I am recieving this error message.
1067: Implicit coercion of a value of type flash.net:URLLoader to an unrelated type flash.display:DisplayObject.
Code:
var loader:URLLoader = new URLLoader();
var xml:XML;
var imgLoader:URLLoader;
loader.load(new URLRequest("http://www.xxxxxxx.com/Pictures.xml"));
loader.addEventListener(Event.COMPLETE, onLoaded);
lb.addEventListener(Event.CHANGE, itemChange);
// Loads XML data into List Component LB
function onLoaded(e:Event):void{
xml= new XML(e.target.data);
var il:XMLList = xml.Album[0].image;
for(var i:uint=0; i<il.length(); i++){
lb.addItem({data:il.attribute("url")[i],
label:il.attribute("title")[i]});
}
}
//Passes String used for URL
function loadImage(url:String):void{
imgLoader = new URLLoader();
imgLoader.load(new URLRequest(url));
imgLoader.addEventListener(Event.COMPLETE, imageLoaded);
}
//Creates Sprite from image url passed through loadImage
function imageLoaded(e:Event):void{
var image:Sprite = new Sprite();
image.width = 200;
image.height = 400;
image.x = 200;
image.y = 10;
image.addChild(imgLoader);
}
//OnChange .selected item passes URL String to LoadImage
function itemChange(e:Event):void{
loadImage(lb.selectedItem.data);
}
I'll admit I'm still a little new at this but I was thinking that URLRequest only need a String value wich I should be getting from "lb.selectingItem.data.toString()... atleast thats what it has been tracing. Any help is welcomed and thanks in advance.
XML Gallery - Generate XML Path For Image Gallery
I learned from great tutorial of kirupa .
I tried to create own image gallery, now I stay in front of problem.
How can I generate path for my images and thumbnails for XML file.
E.g. I have 110 images paths and 110 thumbnails path.
Manually takes it lot of time , how can I make this code for XML file?
<pic>
<image>images/img/ref/img/img_001.jpg</image>
<thumbnail>images/img/ref/thm/img_001.jpg</thumbnail>
</pic>
next node, next node,
...
last node:
<pic>
<image>images/img/ref/img/img_110.jpg</image>
<thumbnail>images/img/ref/thm/img_110.jpg</thumbnail>
</pic>
Inserting Image Dynamically Using .....
Do anyone know how can i insert image files to existing .swf dynamically?, aside from using Macromedia Generator because its to expensive.Tried to use PHP but luck was not on my side. Can PHP do it like Generator does?
Any help is appreciated very much Thank you.
Dynamically Image Loading
Hi, is there a way where i can put a url inside flash and on run time the swf goes to that url and loads into it self the image (jpg or gif) ?
Thanks in advance,
Maya.
Moving A Image Dynamically?
hey,
ok, say i want a box to move over a button when the button is pressed telling the user they are on a certain part of the page. well i think i could figure out the variables and stuff, but i dont know how to move an image dynamically. if i told a image with an instance name of "slider" to move to x=30 when pressed or something, but have it do it gradually so that it dosent just all of a sudden appear there. like give it a certain number of frames in which to do it in. is this possible. well..... i know its possible, ive seen others do it, but i dont know how. could somone please provide me with some code for this?? im pretty AS literate, or so i think, but i cant figure this one out. thanks for all your help. lata.
Jake
How To Dynamically Update An Image?
Is there any way I can dynamically update an image within swf flash movie?? I mean, I have some images imported into my .fla file and I need to be able to change the image that is being loaded without having to change my swf file...Set a function that changes the image accoring to the day of the month or week...like a calendar....
TKs
Rescale Image Dynamically
I have an image on the timeline that is draggable. I want to be able to resiza the image/container while the mc is running. Is this possible only by entering vaiables into text boxes or is it possible to do this using the mouse?
Please help.
Dynamically Resizing Image
I need to dynamically resize an image via actionscript and am alittle new to actionscript so could use alittle guidance.
here's what I have:
// url value flashquerystring.cfm?imgHeight=300&imgWidth=300
// actionscript for image resize
imgFormat = new ImageFormat();
imgFormat.height = _root.imgHeight;
imgFormat.width = _root.imgWidth;
imgbox.setImageFormat(imgFormat);
// I may be way off as to how I set my imgBox variable. I made my image a movie clip and set that as the instance. I've attached the fla if that's easiest
thanks in advance
Loading Image And TXT Dynamically
I need to load some TXT and a few Image's in a Flash document.
It has to run both on cd-rom and on the internet.
It would need to be easy to update because i ve got loads of content to load.
I was thinking about xml, txt ..
Dunno really ...
Tito
Image In Dynamically Textfield?
Hi, have a dynamically textfield with the scroling option. Until now there is only text, but how to insert any image in it?
Dynamically Diplaying Image
hello,
I have a flash page that is being driven by an access db, I am successfully getting all the text to display in dynamic text boxes... I need to load an image as well... how do i do this, can i load a swf or jpg file into a dynamic text box.... i dont think so, but what can i do... this is my code for displaying the text, as well as the name of the image...
Code:
// depth
depth = -1;
// hide the origional clips
Name._visible = 0;
Age._visible = 0;
Image._visible = 0;
// split up the array by looking for the commas
Name_array = output.split(",");
Age_array = eoutput.split(",");
Image_array = eoutput2.split(",");
// get the length of the array
Name_length = Name_array.length;
Age_length = Age_array.length;
Image_length = Image_array.length;
// set the start y position (x position depends on where you put it on the screen)
yposition = 235;
// looping everything
for (i=0; i<Name_length; i++) {
// Name
duplicateMovieClip(Name, "Name" add i, depth);
setProperty("Name" add i, _y, yposition);
Name.Name = Name_array[1];
set("Name" add i add ".info", Name_array[i]);
depth--;
// Age
duplicateMovieClip(Age, "Age" add i, depth);
setProperty("Age" add i, _y, yposition);
Age.Age = Age_array[1];
set("Age" add i add ".info", Age_array[i]);
depth--;
// Image
duplicateMovieClip(Image, "Image" add i, depth);
setProperty("Image" add i, _y, yposition);
Image.Image = Image_array[1];
set("Image" add i add ".info", Image_array[i]);
depth--;
// Set the y position plus 30
yposition = yposition+100;
}
How To Load Image Dynamically
Hi!
I want to load image dynamically(externaly), while loading i want to show loading progress bar to percentage of loading....
and also i want to know that when the image will be downloaded, will that image go to user's cache or not... I mean if user come back again and same swf calls, will now swf load images from zero point....???
Thanks,
Erphan B Rajput.
Dynamically Centre Image In MC
I am dynamically loading images into a movie clip (MC), but as they load the images load from the MCs registration point which is fine if you want the image to load in the top left side of the MC.
What I would like to be able to dynamically change the registration point of the image to the centre when it is loaded. I would expect you would have to change the registration point of the MC (as the image takes on the properties of the MC).
Basically I would like the images to load from the left, right, top middle, botton middle etc... so that per project I can dynamically change the above.
Here is an example of what I am trying to achieve. I have everything else down pat except the images positioning....
http://www.evb.com
In the above case the images are loaded and their centre point becomes the centre of the image and the frame then expands or contracts depending on the image width and height.
Even if I could be able to make the centre point in the middle would do me...
Can anyone help??????
Dynamically Load Image Into Mc
i would like to dynamically load an image into my movieclip at runtime.
how do i pass in a parameter to the movieclip to tell it what image to load?
how do i then show the image within the movieclip?
thanks!
Loading Image Dynamically
I am loading image dynamically in an emptyMovieClip. I have a text box named "percent" which shows the percent loaded. Everything is working fine but there appears few numbers after dot (.) I don't want any dot(.) so I even tried int() and math.round but it's not working.
Here is the code that I am using
========================
this.createEmptyMovieClip("holderMC",1);
holderMC._x = 122;
holderMC._y = 100;
holderMC.loadMovie("http://www.xponseinc.com/mockups/1.jpg");
this.onEnterFrame = function() {
_root.percent = (holderMC.getBytesLoaded()/holderMC.getBytesTotal())*100;
if (_root.percent == 100) {
a = "Done";
delete this.onEnterFrame;
}
};
=============================
I tried changing the code to:
_root.percent = math.round (holderMC.getBytesLoaded()/holderMC.getBytesTotal())*100;
But it's not working.
How can I solve this problem?
Please help me
Dynamically Insert Image Into Swf
I want it so that when someone uploads an image, it will dynamically be inserted into my SWF.
is this possible? if so how?
I found this "JavatoFlash" tutorial, but i don't think it is exactly what i need & am having trouble making it work for my needs...
thanks in advance!
Dynamically Load Image
I would like to dynamically import a JPEG from a remote url, apparently I should use either of the following actionscript methods:
loadMovieNum("http://www.website.com/image.jpg", 0);
loadMovie("http://www.website.com/image.jpg", target);
However, the JPEG is from a webcam feed and is therefore regularly updated. How would I be able request a new loading of the image at certain time intervals? Would PHP be required? Please help
|