Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

anybody know how flash might be abl 4

Status
Not open for further replies.

jesushkhrist

Programmer
Apr 14, 2001
1
US
anybody know how flash might be able to capture a screenshot of a scene, then submit it to an email so i could create a page of images or another flash page, creating an archived gallery? for instance, if i create a drawing board for users to draw, then they want to save it or submit it to a gallery of other people's images...
 
Noop, you can't...unless you perhaps were a programer, and embedded flash into an excecutable and then did it via the excecutable.
Regards,
AnthLOLny
----------------------------------------
The Learning process is just a way to get rid of all the stupids in your head.

Now where's that cute little kitten? :-X
 
Alt>Print Scrn..............


then just paste it into your favorite image program... or in this case they would just probably use Microsoft Paint..or whatever macs default image program is..save it as a bitmap and attach to e-mail..when you receive the e-mail you will have to use photoshop or something to crop out the parts that you want then just add it to your gallery..


e.gif


carlsatterwhite@endangeredgraphics.com
 
Well, as far as I understand...FLASH can't do it...

Yes, of course you can ALT + PRNT SCREEN, but who doesn't know that...;)

Anywho, with flash, you cannot save an image and post it to a gallery of sorts...i'm sorry...if they had a print to file thing or something you could set in flash, that would be a lifesaver, because you COULD do that probably...

Also, yes, they do need to add a lot more to flash...but think about it...flash isn't much, except a program which calls api calls to draw an object, play a sound, and has it's own front end application...not much to it really...although I could never make it...lol
Regards,
AnthLOLny
----------------------------------------
The Learning process is just a way to get rid of all the stupids in your head.

Now where's that cute little kitten? :-X
 
Well, is there a way to set up a script which can "press" alt+PrtScr for you? Does this work on a mac? If so, you might be able to pull it off.

There could be some new project here....

Blended
 
blended you might be right..a new project..and by the way did you ever get that x/y mc thing working? if so how did you get it?
e.gif


carlsatterwhite@endangeredgraphics.com
 
No, not yet, but it's still on the burner. I'm working with smart clips at the moment, but I have come across some information on how to do the previous.

Blended
 
Flash can't do it by itself...perhaps if it were embedded in a program, but FLASH can't do it...

Regards,
AnthLOLny
----------------------------------------
The Learning process is just a way to get rid of all the stupids in your head.

Now where's that cute little kitten? :-X
 
My ideas on this.


It seems Jesus wants to create a drawing page which could then be "saved" and emailed to someone. Therefore, grabbing the whole screen is not neccessary.

I suppose it would be possible to make scripts which could remember the mouse movents and clicks and then recreate them later on (by writing to an asp file, perhaps). So, instead of saving the actual image, you could save the "memory" of how it was created. There could be RAM limitations to this, I suppose. If you could pull this off, it would make for a remarkably small database size. I will not be trying this one, but I'm positive this could be done.

To insist that Flash CAN'T do something is to impose just one more limitation to what you can create. Sure flash can't do some things, and maybe not even this, but suggestions for work-arounds can lead to innovation. Your optimism is appreciated.

Blended

 
and blended i have seen that script somewhere..where you press record then draw on the screen..then flash records it and draws it back for you..so i'm guessing your assumptions on sending it to another script that takes the recorded data and re-creates it in another way is probably dead on..


will see if i can find where i seen that..
e.gif


carlsatterwhite@endangeredgraphics.com
 
has got some examples which record and replay mouse movements combined with line drawing. Mind you, everything on that site is deeply scary and I wouldn't fancy trying to replicate any of it in a hurry :)

If you were trying to capture a full "painting" or just "etch-a-sketch" style lines I'm sure the data could be stored in a multi-dimensional array or be written out to an XML file where every mouse click or drag generates a colour value, x start and end coord and y start and end coord.

something like:

on(press){
startx=_root._xmouse;
starty=_root._ymouse;
}
on(release){
endx=_root._xmouse;
endy=_root.ymouse;
}


would be all that was needed to catch the line points for an etch-a-sketch routine and I guess something like:

onClipEvent(mousemove){
startx=_root._xmouse;
starty=_root._ymouse;
}


could be used to catch the right coords for a drag and paint type variant. If an array along the lines of startx[count] was set up instead of just the straight variables above, the variable count could be incremented on every mouse move or click thus storing a fresh coord in the array each time a change was made.

Just a thought.
 
Here's a really rough (lunch hour boredom) mouse tracking/replaying script. Add a movieclip containing a filled circle (or whatever) to you stage and give it the instance name "brush". Add the following code to frames 1 to 4. The movie traces the mouse movements for 100 iterations of a loop, stores the x and y coord of each move and then prints them all back up to the screen in the last frame. Like I say, rough (very rough) and would be better done using clipEvents but it was the first solution I came up with.

frame 1
//initialise variables and arrays, attach brush to mouse
xpos = new Array(100);
ypos = new Array(100);
j = 0;
startDrag ("_root.brush", true);

frame 2
//track the mouse for 100 frames
if (j<100){
_root.xpos[j]=int(_root._xmouse);
_root.ypos[j]=int(_root._ymouse);
j++;
} else gotoAndStop(4);

frame 3
gotoAndPlay(2);

frame 4
stopDrag();
//copy the original clip's position on to the stage for each frame that was stored
for (j=0;j<100;j++){
duplicateMovieClip(_root.brush,[&quot;replay&quot;+j],j);
setProperty([&quot;replay&quot;+j],_x,xpos[j]);
setProperty([&quot;replay&quot;+j],_y,ypos[j]);
}
stop();
 
here, here

wow! ;-)
Back from the depths, straight back into the quagmire. Great to be back.

Anyway, agreeing with wangbar (hi), every time you duplicate your 'tool' mc, you just have to append 4 variables with the _x,_y,_xscale,_yscale of the duplication respectively to create 4 arrays. Doing this, they can be written to a text file and/or appended to a database.

You 'could' then use another flash movie to reload these variables to recreate the image from the text-file/record.

One issue which may be a problem is embedding in an e-mail. If you embed an HTML page stright into an e-mail such that the user doesn't have to access the server containing the 'uploaded' version, then the movie will not be able to load any external variables. This is a security issue built into flash to stop people stealing variable content from other web servers. However, if your e-mail contains some sort of automatic redirection to your server, you will have no problems with loading variables. I don't know which method you use, I just thought I'd point out the same-server issue with the loadvariables command which I'm pretty sure is the only method you could use to achieve you're goal. (phew! ;-) )

Obviously that doesn't help much so I'll be uploading the DRAW.FLA with completed tutorial (haven't looked at it for months), hopefully with an example of what I have just explained above if I get the time. I'll keep you posted.

dave

ps: if you check out the new pinkzeppelin.com PLEASE don't e-mail me saying the buttons are confusing or little things don't work or are missing, the small stuff is being sorted at the end. Cheers! :)
dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^​
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top