Actionscript 3.0 :: Export A Region Of SWF Movie To PDF (image) When The User Hits A Button?
Feb 7, 2009I want to export a region of my SWF movie to PDF (image) when the user hits a button. How do I do that?
View 2 RepliesI want to export a region of my SWF movie to PDF (image) when the user hits a button. How do I do that?
View 2 Repliesi am working on a survey form in MX-04 Pro. I have the main .swf file embedded in an HTML page. The document's width is longer than the viewable screen so the person taking the survey has to scroll down to answer the remaing questions and hit the "continue" button to proceed to the next page/frame in the movie. When the user hits the "continue" button the next frame in the movie appears but the HTML page is still scrolled to the bottom. Is there any ActionScript I can inclued in the frame or continue button to make the movie/survey appear at the top of the html page when the user hits the "continue" button?#2
Is it possible to make the items in a List component sort randmoly? or maybe alternate between "ASC" & "DESC" order? Furthermore, there would be an "Other" option included in my list but I would like that to remain at the bottom of the list while the other items in the list were sorted randomly?
what I'm trying to do is allow the user to pick a section of the stage, click, and have the region defined be copied and show up on the other side of the stage. It may be better explained to think of it like a camera game. The player has cross hairs, can move the square (which tracks the mouse) around the stage, and click to capture that square's pixel information, store it to a new movieclip and display it on another area of the stage.
I've found many resources online about capturing BitmapData, including capturing from embedded FLV videos, but I haven't seem to be able to find anyone who has created something like this which captures from a moving region. However, I have seen it done before in a game that is no longer online from PBSkids.org.
Here is what I have so far. Right now, when I click the movieclip loads all white pixel data and I'm not sure why.
[flash=]import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Point;
stop();
[Code].....
I am trying to get a html popup window to open when my movie hits a certain frame instead of a button. Im using the following code but it uses a button instead of a frame to open the popup.
on (release) {
customize the window that gets opened
0 equals NO.[code]........
I need to have a search box, and when the user types in a term and hits submit, I want it to go to a URL and add "srch=<whatever is typed in the box>" to the URL address. In other words, if you type in "Cattle dog" as your search term, I want the URL to read "http:[url]..... This should be so easy. I have a TextInput box called "search_txt" and a submit button called "submit_txt".
View 14 Repliesit seems the only way to export with actionscript animation intact is to export as a Quicktime file, I decided to try something and it worked. I made the frames-per-second go from 30 down to 1. It took a looong time to export at 1fps but once it did, I loaded it into Premiere and adjusted the Speed/Duration, putting the speed at 3000 (30*100) and it looks very smooth. Not the neatest way to do things but it works, so I'm happyI guess the proper terminology for what I am looking for is to export as a PNG sequence with actionscript animation.In Flash CS5 after attempting to export to a Quicktime .mov file and it turning out extremely choppy no matter what (I tried things from here and here) until somewhere I found someone saying they always export as an image sequence.I could export as an image sequence so there would be no choppiness, then just import it into a video editing software.
That was until I noticed that the vcam I am using wasn't working in the finished product. The movie clips wouldn't animate, it would just be stuck on the first frame. Masks were also not working correctly (although this may not be an issue if I just lock the layers before exporting, not sure). So basically, I can't export in Quicktime - which does export with vcam, masks, and motion clips - because it's too slow and choppy, and I can't export as an image sequence (even though it wouldn't be choppy) because it doesn't export with all the things mentioned.So what do I do now? How can I export this with movie clips, vcam, etc. without it being slow and choppy!? Can I get vcam, movie clips, and masks to export in an image sequence?
i have an image, on that image is a box moving with the mouse, i need to pretty much capture a region of the image with a mouse click - kinda like a snapshot.
View 9 Repliesi just wrote a radial preloader. i have a problem though: there seems to be some "residue". it is for a small gallery.. so when i test the loader using the bandwidth simulation, the first time it look perfect, but the second time, i can see part of the preloader from the first frame, and as soon as the preloader reaches the leftover region, that region is cleared.
View 1 RepliesI am creating a little flash movie, nothing major and I want something to happen. When a user rolls over a button, a image fades in somewhere else on the stage, possibly below the button being rolled over. Then when its clicked (the button) the image (possibly) expands and text is showed while the background is faded.
View 5 RepliesI'm new to AS3 and I'm currently trying to code a project that allows the user to dissect an image made of movie clips:
Code:
var rightniptime:Timer = new Timer(100, 6);
function rightnipfall(event:TimerEvent): void {
rightnip_mc.y+=100;[code].....
I have literally duplicated this bit of code for the sixty movieclips that comprise this image. This would be fine, but I need another image (again, comprised of about sixty movieclips) to appear, and have the same functionality as the first, once the pieces of the first image have left the stage.I have been reading articles about classes, creating classes; my teacher gave me vague advice about creating a number that increments as the images fall and then creating a conditional statement that would display the new image once the pieces of the first have reached a particular Y location. But at this point I'm on the verge of tears and can't seem to make it work.
I have a uiloader component that loads in images, there's a back button and a next button. Im trying to hide the back button when the user is viewing image number 1. The problem is when the site loads the back button is visible even though the source is image 1. If you cycle through the images to image 1 then it disappears? why?
heres my code for my imageloader:
next_but.addEventListener(MouseEvent.CLICK, nextimage);
var ImageNumber:Number = 1;
function checkNumber():void {
[code]....
I am designing a xmas advent caledar. I want to create a sticker/peel off effect when the user clicks on an area of the image/movie?On click a window will peel off like a sticker.
View 3 RepliesOne of my buttons, flash will not read it as a button when I publish it and run the swf file. The cursor stays as a arrow meaning its not a button in the swf file. Inside of the fla file it is a button with a hit. There is no movie or tweening or anything like that. I think it's not reading it as a button because Flash is placing the hit behind the actual button. Inside of my button there is only 1 layer. When placing the hit usually it covers the button. But in this case, the hit is going behind the image. I think this is why when its ran, its not reading it as a button.
I even removed the AS3 code from the button to see if it was a coding error. Rather if theres code in there or not the swf should still read it as a button and the cursor should change to a hand by default. Because of this, I tried to create another button in another area on the stage to see if it's just that one area thats having that problem. I created a new button from scratch, placed a hit, no AS3 coding added, and it works. The swf reads it as a button. But with that button, I added a AS3 CODE to go to an external website and now Flash isnt reading the AS3 code for that button. Heres the code:
import flash.net.URLRequest;import flash.display.Loader;import flash.net.navigateToURL;
itunesBTN.addEventListener(MouseEvent.CLICK, gotoITUNES);
function gotoITUNES (event:MouseEvent):void{ var req:URLRequest = new
[code].....
I am trying to build a website, and here is the logic behind my problem. I have 2 button, when user clicked on button 1 i load movie clip from library with: _parent._parent.cont.attachMovie("Page1", "e", 0, {_x:-265, _y:-250}); when user clicked on button 2, i load other movie clip. Problem: i want remove last movie clip after user clicked on button 2 and then load new movie clip but i cant...
View 9 RepliesI have a movie that i want to close when the user clicks a button, i know to use the fscommand(), but i duno what to put inside the brakets:S. i tyred 'close', 'close.screen','scree.close','unloadMovie'...etc but notings working, what im supposed 2 put in there?
View 2 RepliesI am trying to get a movie to update it's color after the user clicks on a button and changes the value of Red Green Blue.
How do I set it so that it keeps checking and changes it's color once the button has been clicked.
this is what I have on my movie.
Code:
onEnterFrame = function() {
my_color = new Color(this.window1);
my_color.setTransform(_root.myColorTransform);}
I am trying to duplicate a movie for a bullet hole when the user clicks a button hole is sapposed to appear but its not working. here is the code I have inside my bullet hole
onClipEvent(load){
i = 0
}
onClipEvent (mouseDown) {[code].......
I've got a problem with a game I am creating, I want a movie clip to play once when my character hits it, it has a stop function at the end of the movie clip, but as long as the character is on top of it, it continues to loop, how do I get it to stop at the last frame?
Here is the script applied to the movie clip:
onClipEvent (enterFrame) {
if (this.hitTest(_root.bubMC)) {
play();
}
}
All I've been able to do was make the last frame extremely long and load an alternate movieclip without the hittest function applied that runs the animation.Essentially, I am asking, "How do I make a piece of actionscript run only once", like:
onClipEvent (enterFrame) {
if (this.hitTest(_root.bubMC)) {
play(ONLY ONCE BUT AFTER THAT DON'T DO IT AGAIN);
}
}
I just want part of my flash movie to open a new window when the button is pushed instead of taking the user away from my site.
View 2 RepliesIm making a game, where a player controls a character moving around the screen using the mouse.the player moves using a tween, using the current x y pos and the click x y pos to move the character around here's the thing, i have objects on the screen (such as rocks, etc) that i do not want the user to be able to walk through. i do not want to use hit test to simply chuck the character off the object in real time because that's messy and it would mean the tween continued and stuff.. instead, i want to add some code to the top of the "movePlayer" function that checks to see if an object (such as some rocks) is going to be hit, and if it does, i want the tween to only go to this point (yellow in the below diagram)
Here's what i mean:the player clicks on the screen ( the blue dot) and instead of walking straight to the blue dot, the code determines the point at which the player will hit the big orange block, and only tween to that point, if there are multiple orange blocks in the way, the tween will stop the closest block.
the conent will not be able to be seen unless the user hits the arrow keys on there key board. So i need to make a group of objects i can make into a movie clip and than inside that movie clip make an animation that plays the squirrel running. i will pause here to ask two things i dont know how to do i want the squirrel to have an animation when standing still where it flicks its tail (like a real squirrel would). and also how would i flip the squirrel so when the left key is pressed it points left and when the right arrow is pressed it faces left? and my main question when it reaches the edge of the stage the extended background that runs off stage moves over to reavel more content. as well as not have the squirrel run off stage? in short i am using the squirrel to view the full pages content.
View 2 RepliesI'm trying to get in the habit of using AS in the first frame on the main timeline as much as possible. but sometimes i hit a snag. like getting a movie clip to change it's alpha when it hits a certain frame in an attached MC.
View 8 RepliesIs there any code that basically says, if root frame = 2 then do this.. I basically need my movie clip to blur when the main scene hits certain frames. The movie clip pans around though with script thats why i cant just add a blurred image to a layer in the main scene.
View 6 Replieslooking to create an image/mc slider that moves form right to left via user clicks of a left and right button.I would assume I would create an array to hold a series of mc's in (my images) and then tell the left and right buttons CLICK events to move linearly through the array (displaying next in line and previous etc.
View 1 RepliesI'd like to export the many pictures I draw in Flash to something resembling the final product (preferably ber-high-res).However, the image export function in Flash isn't what it should've been.Quick summary of my ventures:
Export as .png/.bmp/any non-vector format: There's only 4x antialias, and everything beyond I think 4096 pixels in either dimension is cut for whatever reason. Not to mention there's an 8000 pixel limit.Export as .ai, open in Photoshop: All gradient fills disappear. Transparency is not retained.Export as .ai/.emf/.wmf, open in Illustrator for rasterization: Transparency is not retained.
how do i save a .jpg image while runing a swf. . . what i mean is. . taking a "snapshot" of the whole swf while it is runing by clicking on a button for example. . .and saving it in the swf's folder. . .naming it and if it is posible making several snapshots and saving them all by diffrent names. ..by 1,2,3,etc'...
View 14 RepliesI have an image on the stage which is bigger than the stage itself:
The stage is 700x550
The image is 2100x1650, and it's registration point is at its center, if I remember correctly.The initial location of the image on the stage is 350,75.I want to make sure that the user will be able to drag the image, as long as the edges of the image doesn't show.here's what I did:
mapRect = new Rectangle(0-mapMC.width/2, 0-mapMC.height/2, mapMC.width, mapMC.height);
and later on:
mapMC.startDrag(false,mapRect);
The the top and the left of the image are bounded well, but as far as the bottom and the right side of the image.
I have a small application where user can drag and drop images on the stage.
When they are finished I want the to save and email the result to me.
So I'm looking for the best and easiest way of doing this.
The application is already don some time ago in AS2.But I can think of redoing it in AS3 if it's a better choice.
I did google about it and found a lot of choices off course.
Im looking for the best way to export an image from flash for print. I will be needing to print anywhere from about 12 inches long all the way up to as much as 6 ft long. Ive tried export> image options but the quality is severely compromised.
View 3 RepliesI've got a little problem when I export flash animations as .mov files. Sometimes a residual image on a past frame from any layer sticks and doesn't go away unless something from another frame is redrawn in it's place. I'm using CS5, but the effect I've shown you here also occurs when I export movie files on this computer in Toonboom. I brought my Flash CS5 file to school and exported in CS5 there and I get the same effect. This problem did occur in Toonboom on an older mac of mine but those files exported perfectly in Toonboom at school. Am I forever trapped making .mov files of my animations by doing a video screen capture?
View 14 Replies