ActionScript 2.0 :: Saving A Movie Clip As An Image?
Mar 14, 2011
I am working on a coloring book web game.
Currently the user can draw with a pencil and fill in colors with the mouse. There is a print option where the user can print out what they drew and colored.
What I'm trying to do is save a specific movie clip as a jpg or a png.
I've been using Flash for ages but haven't a clue about backend scripting.I've got a flash app where you can add movieclips to the stage and drag them around etc... ...what I'd like is for the user to dynamically save the _x, _y and _rotation values so they can be viewed by other people.What would be the best way to do this - write to an XML file or to a MySQL database? I've looked at some tutorials but its beyond my capabilities to be honest
I have a drag and drop game where each movie clip is a word that the player has to arrange on screen in a certain order of importance - there is no snapping mechanism and the user can place the words anywhere desired.
Later in the game, I need this list of words to appear in the order that the player previously organized within a different scene.
This is an example code of how I set up the drag and drop game:
//Array to hold all the puzzle movie clip instances. var burgerArr:Array = new Array (burger_mc, burger2_mc, burger3_mc, burger4_mc, burger5_mc, burger6_mc, burger7_mc);
Is it possible to save a movie(whole or particular movie clip) as a image formate(.jpg or some other) by clicking a button which is available in the same movie, at a "Runtime" through "Flash 8 Actionscript 2".
How can I show an image that I have just captured with the webcam?I am able to save that image using PHP but before I save it, I want to show a preview. How can I do this? Here is a snippet of the code that I think can be used to do this:
ActionScript Code: foo = new BitmapData(640,480); foo.draw(myvideoobject, scaleMatrix);
I have a tilelist that is loaded using a xml document. The user clicks on one of the images and it is then displayed in a movie clip. the code to load the tile list and display the image is this:
Actionscript Code: var xmlLoader:URLLoader = new URLLoader(); var xmlData:XML; xmlLoader.addEventListener(Event.COMPLETE, LoadXML); xmlLoader.load(new
I am trying to finish creating a mouse based slider and want to dynamically create movieclip boxes inside one master movieclip. This is so I can slide the master MC left and right. Also, I want to add an image to each box. I'm getting closer but need some serious expert guidance. Right now, I can't figure out how to attach the image to the boxes.
All of the dynamic stuff happens in a for loop, and when each image is loaded, it fires the Event Listener to a function to attach it. But being outside that foor loop, the new function can't reference the objects.[code]...
I'm trying to change an image, but I noticed that the image is in a symbol/movie clip type.. I also found out that the image itself (jpg/gif/png format) is not in the library. So what to do? How to change it? Also, when importing image files to the library, how do I import it automatically to a certain folder in the library?
I'm trying to make a zoom in and out effect, on images in a movieclip, using the mouse wheel. But, there is another mouse event that scrolls through the frames of the movie clip. I need it to stay zoomed in, and out respectively, when you scroll to the next frame.
_root.createEmptyMovieClip("testimage", 1); \ New Movie Clip loadMovie(test.image1name, "testimage"); \ test.image1name = "image-4.jpg", the url of an image testimage._width = 350; \ Properties for the Movie Clip
[Code]....
I'm tired and this is tiring me.
EDIT: When I traced "testimage._width", it returned 0. But when I traced "testimage._x", it returned 50 as it should.
I'm trying to resize an image loaded in a movie clip, so that any image I load will always fit correctly in my movie.The script is pretty simple, it reads an xml file where they should be 6 records. Loads the image in the Thumb attribute in on of the 6 containers eg. _root.screen.Event1
Code:
for (i=0; i < 6; i++){ MyEvent = Event[i].attributes ; _root.screen["Event"+i].Title.text = MyEvent.Title ;
[code]....
It works but not as expected. It looks like only the container is scaled down not the image really.
I'm trying to display an image in a movie clip where the location of the image is derived from an xml document. I'm creating a menu from XML nodes and when the user selects that menu item a separate movie clip is updated with the XML information which corresponds to the menu items nodevalue. In my xml i have an image location defined and I want this to happen... when the user selects the menu item the node value for the image location dynamically loads the image into the movie clip.
I have only been doing flash for less than a week and I mostly do animations but I want to learn AS.
I have saved my pictures in a folder (i.e. /images/) and linked the file name to a mysql database (i.e. test.png) I can make a php file that makes the links to the images
[Code]....
So heres what I want to do,
1.) I am making a logo for my site and I want my pictures to show up in a movie clip (the newest picture first)
2.) If a user clicks on that picture/movie clip it takes them to a specific page
3.) How would I set up controls so a user could switch through the latest six pictures.
seems a little complicated for replacing an image in a movieclip with something else. It seems like a hack actually. Is it really so hard to switch a png (maybe of a different size) in a movieclip with something else? It also appears the livedocs at this time, are down. If it gets any harder I might switch to silverlight if it's not based off hack(ECMA)script
i am trying to center the image once clicked, i have multiple images(4) and want them to open dead center on the stage i would also like to close the opened image when the next one opens and return it to original position!
what i have got so far:-
stop();port1_mc.doubleClickEnabled=true; var centerX:uint = stage.stageWidth / 2;var centerY:uint = stage.stageHeight / 2; port1_mc.addEventListener(MouseEvent.DOUBLE_CLICK, go); function go(evt:MouseEvent):void{ //opens image to the stage gotoAndPlay (2);}
I have my stage. On the left side, I imported an image to the stage and converted it to a movie clip. I then added code so that it can be dragged and dropped. On the right hand side, I created an area for it to be dropped into. This is just a rectangle which has been converted to a movie clip. When the image is dropped, it resizes to the size of the movie clip rectangle. Is there anyway to make it snap into place inside the movie clip?
Anyway, i have this picture/movie clip inside the library which will be displayed partially in the flash and i want to secure the image/movie clip if there is somebody want to extract it and view it. What is the best method here?
I am having trouble loading an external image into a movie clip. I have doubled check my path and but still my code isn't working. I must be missing something fundamental but I can't see it.
ActionScript Code: //create a container to hold the rooms images var roomContainer:MovieClip = new MovieClip();
I am creating an ad for my website that pulls 3 random images from a database and displays them in a flash file. I already have the .php file (see code below) and I am successfully able to load the variables into the actionscript, but I cant get the images to show up. I have three symbols (img0, img1 & img2) and I cant seem to load the image onto the symbols using loadMovie. [code]...
i have the following code which works. Its for two buttons either side of a movie clip (holder_mc) which holds the images. The images load but their top left corner go to the 0,0 position of the movie clip (top left). My images are all different sizes and i want them all to be centred. I have looked at alot of threads and cant figure it out.
Im going through this method for generating a random image into a movie clip [URL] I was just wondering if theres a way to check if say for example image 4 has loaded into the movieClip previously (just before)...and if so....not load that image and randomly pick one of the other images
I am designing an online city guide and on this particular page I have an image of a map. I want the direction/location of the mouse to determine the angle of the tilt of my image.This is a perfect example of what I'm trying to explainf you let the preloader load, you will see that on the main page, the pink background image subtly tilts depending on where the mouse is and how close it is to the image.
I'm not sure if this can be done, but I'll try my luck here I've loaded external jpg image using loadClip method... Now i want to attach the same image to another dynamically created movie clip. I know i can attach images from library but i need it on this way.
It have to be attached as JPG. I know for bitmap data class and I am already using it but don't know how to attach jpg.
at this site on the right hand site... there are 3 menu options...with one white box that follows where your curror goes. i can acomplish this but the movie i make snaps the white bow back to the top.url...
I am trying to find out how to pause or stop an image in a basic flash movie clip, after it has entered from one side and before it exits the other side.I have been trying to work it out myself for three days but no joy. I am practicing for a test with a training agency which gave me a disk to use but nowhere in it does it say how this is done. I am also having a lot of difficulty making stop start buttons work with this movie clip. I am using a trial cs5.5 version of Flash which expires in 7 days so i need to know this soon. I am up to speed on most of the features, its just this one thing that has me stumped. A lot of the tutorials or examples i have found on the net are very long winded and hard to follow exactly.