Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




BitmapData Method For Taking Snapshots



I have tried to make 'snapshot' of movie clip with bitmapData.draw method. Apparantly it works ok if movie clip content is positioned at top left coordinate and does not go outside top and left sides. If I make movie content centered, just 1/4 of content is drawn. Anybody knows how to solve this?

One solution would be to shift all content to be inside from top left prior making snapshot. But this is not acceptable.

Why Macromedia could not make this method work with arbitrary movie clip content?



Ultrashock Forums > Flash > Flash Professional
Posted on: 2005-12-20


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Taking Snapshots
hey frendz i need an actionscript 2 code through which i can take a snapshot of two dynamically loaded images into a movieclip and save it as a .jpg image.
plz help me out!!!!!!!!!

BitmapData.hitTest Method
Ive been working on a project where I need to get exact pixel based hit-test information from a dynamically imported png file. The code Ive attached works perfectly until the container_mc is moved on the stage, any thoughts or suggestions?

Code:







Attach Code

import flash.display.BitmapData;
import flash.geom.Point;
import flash.geom.ColorTransform;
import flash.geom.Matrix;

// Set default values for the image
var width:Number = 200;
var height:Number = 200;
var round:Number = 0;
var imgSource:String = 'sueNavImage.png';

// Create the containers for all the nessicary stuff
var contentContainer_mc:MovieClip = _root.createEmptyMovieClip('contentContainer_mc', _root.getNextHighestDepth());
var mask_mc:MovieClip = contentContainer_mc.createEmptyMovieClip('mask_mc', contentContainer_mc.getNextHighestDepth());
var content_mc:MovieClip = contentContainer_mc.createEmptyMovieClip('content_mc', contentContainer_mc.getNextHighestDepth());
var bitmap_bd = new BitmapData(width, height, true, 0x00000000);


// Try moving the content container, this breaks it.
contentContainer_mc._x = 0;
/* Note: Bitmap objects do not have coordinates, they dont exist on the stage.
A bitmap object isnt visible until its drawn into a movie clip. They do
have a width and height, but no _x and _y, this makes it a pain in the ass to
hit-test. */



// Add mouse listener
var mouseListener:Object = new Object();
mouseListener.onMouseDown = function() {
// when the mouse is down...
// create new point where the click happened
var currPoint:Point = new Point(_xmouse, _ymouse);
// calculate that point relative to registration point of the content container
contentContainer_mc.globalToLocal(currPoint);

// this is the broken part...
if(bitmap_bd.hitTest(new Point(0, 0), 255, currPoint)) {
trace(">> Collision at x:" + currPoint.x + " and y:" + currPoint.y);
}

}
Mouse.addListener(mouseListener);



// Load image
var content_mcl:MovieClipLoader = new MovieClipLoader();
content_mcl.addListener(this);
content_mcl.loadClip(imgSource, content_mc);
function onLoadInit(mc:MovieClip) {
// One the first frame is loaded do this
drawBox(mask_mc);
content_mc.setMask(mask_mc);
drawBitmap();
}


// a retarded monkey could figgure this one out
function drawBox(mc:MovieClip):Void {
mc.clear();
mc.lineStyle(0, 0x000000, 0);
mc.beginFill(0x666666);
mc.moveTo(0, round);
mc.curveTo(0, 0, round, 0);
mc.lineTo(width - round, 0);
mc.curveTo(width, 0, width, round);
mc.lineTo(width, height - round);
mc.curveTo(width, height, width - round, height);
mc.lineTo(round, height);
mc.curveTo(0, height, 0, height - round);
mc.lineTo(0, round);
mc.endFill();
}


// Draw a bitmap with no transformations
function drawBitmap() {
var colorTrans:ColorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
var matrixTrans:Matrix = new Matrix();
bitmap_bd.draw(content_mc, matrixTrans, colorTrans);
}

AS2 - BitmapData Draw Method
Hi,
I need to take a snapshot of a mc using BitmapData. The problem I'm having is that the mcs content is centered and BitmapData.draw starts at x:0,y:0 - rendering only a quarter of the mc as a snapshot.

I'm using this code to copy pixels:


Code:
o:MovieClip // original mc
c:MovieClip // copy mc

btm = new BitmapData(o._width, o._height, true, 0xFFFFFF);
c.attachBitmap(btm, 0);
btm.draw(o);
Any suggestions on how to start .draw let's say x:-600, y:-500?
Thanks.

[F8] How To Download Images And Use Them With The BitmapData Method?
I'm using the BitmapData method to draw images in movie clips in my FLA. Its a big image and it draws just sprites of it out of the library..

I want to be able to download other images from the web and be able to use the same method to draw them into a MovieClip..


Anyone know how you'd go about doing this?

thanks!!!

Question About The BitmapData Draw() Method
Example code:


var bitmap:BitmapData = new BitmapData(100, 100, true, 0x00ffffff)
bitmap.draw(sprite);

Is there a way to define the starting x,y point when drawing a sprites contents to a BitmapData object. I want to only copy a small section of the sprite, that is not the top left most corner.

Thanks for any help.

~squirt

AS3 - BitmapData Draw Method Problem
Hi!

I have this stupid class that tries to create a screen capture from of a region of the stage that it's below it's position. So to capture that region of the stage I'm passing this


ActionScript Code:
var coordsRect:Rectangle = this.getRect(oriBknd);

as Rectangle parameter to the BitmapData.draw method.

The problem is that when I start to drag the GlassWindow instance the rectangle region seems to work incorrectly and no screen is captured.

I can send you the fla if you want..
It just contains an image as background and this code:

ActionScript Code:
import com.polaco.window.*;
 
var win = new GlassWindow(100, 100);
win.x = 100;
win.y = 100;
this.addChild(win);


the class code:


ActionScript Code:
package com.polaco.window{
   
    /**
   A GlassWindow
   @class GlassWindow
   @package com.polaco.window
   @author Federico "Polaco" Jakimowicz
    */
    import flash.display.*;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.display.Stage;
    import flash.filters.*;
    import flash.geom.Rectangle;
    import flash.geom.Point;
    import flash.geom.Matrix;
       
   
   
    public class GlassWindow extends Sprite
    {
       
        private var backgroundData:BitmapData;
        private var backGround:Bitmap;
        private var backGroundMask:Bitmap;
        private var oriBknd:Stage;
        private var bkndWidth:int;
        private var bkndHeight:int;
        private var blurFilter:BlurFilter;
       
       
        public function GlassWindow(w:int,h:int)
        {
            bkndWidth = w;
            bkndHeight = h;
            blurFilter = new BlurFilter(20, 20, BitmapFilterQuality.LOW);
            cacheAsBitmap = false;
            super();
            addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
            addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
            useHandCursor=true;
           
        }
       
        private function onRemovedFromStage(e:Event):void{
           
            removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
           
        }
       
        private function onAddedToStage(e:Event):void{
           
            oriBknd = stage;
            if(backGround==null){
                var transparent:Boolean = false;
                var fillColor:uint = 0x000000;
                backgroundData = new BitmapData(bkndWidth, bkndHeight, transparent , fillColor);
                backGround = new Bitmap(backgroundData, "auto", false);
            }
            this.addChild(backGround);
            addEventListener(Event.ENTER_FRAME, drawBackGround);
            addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
            addEventListener(MouseEvent.MOUSE_UP, mouseUp);
           
        }
       
       
        private function drawBackGround(e:Event):void{
           
            trace("Height " + height);
           
            var transparent:Boolean = false;
            var fillColor:uint = 0x000000;
           
            this.visible = false;
           
            backgroundData.dispose();
            backgroundData = new BitmapData(width, height, transparent , fillColor);
           
            trace(this.getRect(oriBknd))
           
            var coordsRect:Rectangle = this.getRect(oriBknd);
           
            trace("this x " + this.x);
            trace("this y " + this.y);
            trace("coordsRect.bottomRight "+ coordsRect.bottomRight);
            trace("stage y "+ oriBknd.y);
            backgroundData.draw (oriBknd,new Matrix(),null,BlendMode.NORMAL,coordsRect,true);
            var tRect:Rectangle =  new Rectangle(0, 0, width, height);
            var tPoint:Point =  new Point(0, 0);
            backgroundData.applyFilter(backgroundData,tRect,tPoint,blurFilter);
            if(backGround!=null){
                removeChild(backGround);
            }
            backGround = new Bitmap(backgroundData, "auto", false);
            this.addChild(backGround);
           
            this.visible = true;
        }
       
        private function mouseDown(e:Event):void{
            startDrag();
        }
       
        private function mouseUp(e:Event):void{
            stopDrag();
        }
       
       
       
    }//end class
   
}


thanks a lot,

It's 4:00AM I'll go to sleep.

Issues W/ Using Draw Method For BitmapData Instance
I'm just wondering if there are known issues with using the "draw" method of the BitmapData class...in my case, I'm loading in a SWF and converting it to a bitmap using the "draw" method and for some reason, it's drawing a different SWF than the one it's supposed to. It's like it is getting the SWF's confused and drawing the wrong ones to the wrong places?

has anyone ever had a problem with this? I don't think it's my logic, but it's always possible! My logic is working the way I think it should w/ this exception???

thx for the replies...here's an excerpt of my code:


Code:
//this code takes the loaded SWF (swfArray[i].content) and makes it into a Bitmap, then places the Bitmap into an empty
//movie clip (bitmapContainer) that has name and type values to record SWF name and type(category/class)//////////////////////////////////////////////////////////////////////////////////////////////////////
for(var i:int = 0; i < swfArray.length; i++) {
var swf:DisplayObject = swfArray[i].content;
var bd:BitmapData = new BitmapData(swf.width, swf.height); //scale down here if you want.
bd.draw(swf); //if you're scaling down, the optional second arg is a Matrix.
var swfPic:Bitmap = new Bitmap(bd);

swfPic.x = swfPic.y = 0;
swfPic.name = "swfPic";
var bitmapContainer:BitmapContainer = new BitmapContainer();
bitmapContainer.addChild(swfPic);
bitmapContainer.type = type;
bitmapContainer.swfName = swfNames[i];
bitmapContainer.positionInQueue = i;

bitmapContainerArray.push(bitmapContainer);
}

NOTE: this excerpt is contained in a loop, so it's performed multiple times if that helps clarify any issues!

Draw Method Of BitmapData Class Question
Hi guys

Thanks to guy's tutorial http://www.adobe.com/devnet/flash/ar...ge_api_03.html I have been experimenting with this way of manipulating images with code.

I just am stuck with the draw utilization within a class. The tutorial focusses on non class examples.

I have the following class

Code:
import flash.display.BitmapData;
import flash.geom.Matrix;
class Load extends MovieClip {
private var draw:Function;
private var parent:Object;
private var which:MovieClip;
private var myBitmap:BitmapData;
private var scale:Number;
private var scaleMatrix:Matrix;
private var scaledBitmap:BitmapData;
private var myOtherBitmap:BitmapData;
private var holder_mc:MovieClip;
function Load(parent, target, which) {
_parent = parent;
myBitmap = BitmapData.loadBitmap(which);
_parent.createEmptyMovieClip("target", 0);
_parent.target.attachBitmap(myBitmap, this.getNextHighestDepth());

}
public function fTransform(t) {
//trace(".."+typeof(this.parent.target));
//create a transformation matrix that will scale the bitmap
scaleMatrix = new Matrix();
scaleMatrix.scale(.25, .5);
_parent.scaledBitmap = new BitmapData(_parent.target._width, _parent.target._height, false, 0xFF000000);
///draw the bitmap and scale it using the specified transformation matrix
this.draw(_parent.target.myBitmap, scaleMatrix);
//this.draw(_parent.scaledBitmap, scaleMatrix);
//_parent.attachBitmap(_parent.scaledBitmap, 1);
}
}

I am simply trying to load a bitmap and scale it in half as a first step. I can see the bitmap on the stage at full scale and i know i need to apply the transform matrix to it with draw(); but as its inside the class i am getting confused as to the use.
I am trying to create 2 bitmaps one the original myBitmap then another called scaleBitmap I am thinking I can and should see them both.

Nice tutorial guy, wish that I could see a class example though.

And let me say that so many examples are still actionscript 1 style in the main help files for flash, utilisation in a class is often only a problem of scope but it would be nice to see that all the same.

BitmapData.draw Method Not Supported In Browser
Hi

I have developed a SWF file for live streaming the web cam and take snapshots in the receiving end . I am able to transmit and receive the video stream from web cam. I can also take snapshots from the receiving stream.But the snapshot works only when i run the swf file directly. But when i open the swf file in browser the snapshot is not working and i am not able to take the image from the video receiving.I am very new to flash.Please friends help me to solve this problem.Very urgent.

How To Specify Which Frame Of A Movieclip Gets Drawn With BitmapData.draw Method?
edit - heh, whoops - never mind. I am apparently an idiot. Is there a way to delete messages on this forum?

--
Ken






























Edited: 04/30/2008 at 12:59:06 AM by asdfhabsaf

Using Local Webcam To Take Snapshots
Is there any way of getting Flash to upload a snapshot of a local webcam image to my web server?

I can create a live feed of the local webcam image very simply by creating an Embedded Video called my_video and then using

my_cam=Camera.get();
my_video.attachVideo(my_cam);

But how do I stop the video, grab the last frame, and then post the image to the server? Is this possible without having to use the communications server?

Any thoughts would be much appreciated!

Emailing Snapshots Of SWFs
where to begin...

i am working with Flash 8 and i want to build an SWF for a client that lets the user create their own cocktail. they choose their glass, liquor, mixer etc and then at the end i want them to be able to enter their email, click "submit" and basically have a snapshot of the entire SWF document emailed to them as an attachment or embedded, it doesnt matter. any ideas on how to do this or where to look to get started? seems like some sort of "print screen" option or something would be involved, but i really dont know actionscripting too well--just the basics.

Making Bitmap Snapshots
Hey people, I've been working on this project and I have ONE last bug I absolutely cannot fix, I've tried everything I can think of, it's driving me crazy!!!
So basicaly, in the app, you can up load a photo, and then draw on it. For the drawing all i did was, put a transparent bitmap over the image you upload, and then when you draw, you basicaly draw over the parts of the image you want to keep...
click a button and i basicaly keep the pixels form your image, that correspond to the pixels draw on the draxing layer, just like the photoshop tool.
OK this all works

BUT the problem is that i you rotate the image, it messes up.
So my question is, how can i make a "snapshot" of a bitmap, i mean draw it to another bitmap exaclty the way it looks on screen ?

if anyone can help, i'd really apreciate it.
thx!

Automatic Versioning Or Snapshots Of FLA Files?
I'm somewhat new to Flash 8 Pro, and I'm trying to figure out a good work approach for saving different revisions of my FLA files.

My default routine would be to simply do a "Save As" whenever I make a significant change, and I would eventually end up with file1-1.fla, file1-2.fla, file1-3.fla, and so on.

The problem with this, aside from ending up with many, many, files, is I have to manually do it. And sometimes, I may go a while before saving a new copy of the file, and then I end up breaking something in the process, and I have trouble pinpointing where I went wrong.

So I would love to be able to easily revert to my last save, or to be able to jump back 10 or 20 saves ago. And it would be even better if this would all be done automatically, just by me hitting Ctrl + S (or File -> Save).

I suppose my dream solution would be if Flash automatically, upon me hitting Ctrl + S, would create file1-v1.0.fla, then file-1v1.0.1.fla, then file-1v1.0.2.fla -- that type of thing. What would be even sweeter is if somehow the arbitrary version number (or build number?) that Flash comes up with could be a variable inside of Flash. That way, I can display the version/build number when playing the SWF.

Any ideas would be appreciated! The main goal is to come with an automatic system for taking snapshots, if you will. And icing on the cake would be if it could automatically give the files incrementing names, and also have that same number accessible as a variable.

Thanks. :-)

Luke

BitmapData::draw(BitmapData) Doesn't Seem To Support Alpha Channels
Hi all,

I have a BitmapData object with alpha channels, bm1, and would like to draw it into another BitmapData object, bm2. While I can draw bm1 into bm2, alpha channels do not seem to work. Here is some code to illustrate what I'm trying to do:

// create an all-green but semi-transparent BitmapData object (all alphas are set to 0x80 in the constructor)
var bm1:BitmapData = new BitmapData(100, 100, true, 0x8000FF00);

// create an all-white BitmapData object and display it
var bm2:BitmapData = new BitmapData(100, 100, true);
addChild(new Bitmap(bm2));

// draw bm1 into bm2 in the onTimer() callback function
bm2.draw(bm1);

I would expect bm2 to be light-green, because it's semi-transparent, but it's 100% green, i.e., 0xFF00FF00.

I already tried all blend modes, but blend modes didn't make a difference.

Any ideas?

Btw, what I'm trying to do is to extract an arbitrary collection of pixels (as opposed to a rectangle) from a bitmap (bm1) by copying it into another bitmap (bm2) and using alphas of 0x00 and 0xff to select the pixels to be extracted. Is there a better way to do this? (or any way for that matter? ;-)

Thanks!


-Bernd

[as3] Drawing BitmapData To Erase BitmapData
Hey there. I'm still working on my paint program, and I figured I'd try using the open source, raster-based drawing system from Bytearray.org to speed up drawing in some of my paint tools. The Raster class has some drawing functions that don't bother with anti-aliasing, so in some situations, implementing these methods results in faster code than relying on the Graphics package. I've gotten a nice speed boost from my rainbow paintbrush, which is pretty neat. Go open source!

Unfortunately, I can't get the eraser brush to work, even though its code is essentially the same as the other brushes'. And I've figured out why; the "erase" and "alpha" blend modes, which my vector-based eraser uses to erase the drawing surface, don't seem to work when you draw one BitmapData object onto another. I could put the BitmapData in a Bitmap object and draw that, but that's essentially converting raster data to vector, and then back to raster, which is far slower than any speed improvement I'd get from relying on the Raster class in the first place.

Has anyone here succeeded in using one BitmapData object to erase another, without "wrapping" the eraser BitmapData in a Bitmap object?

Function In A Method Return True To Method's Caller?
I think I probably don't know the correct terminology to ask this question, but here goes:

In this example, can anyone tell me how to have the setComplete event function within the main method return true to the caller of the method, instead of just to the listener?


PHP Code:



    function loadAsset(target:MovieClip, asset:String, assetLoaderInfo:LoaderInfo): Boolean    {    var assetLoader:Loader = new Loader();    var assetURLRequest:URLRequest = new URLRequest(asset);    assetLoader.contentLoaderInfo.addEventListener(Event.OPEN, setLoaderInfo);    assetLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, setComplete);    function setLoaderInfo(event:Event)        {        assetLoaderInfo = event.currentTarget;        }    function setComplete(event:Event)        {        target.addChild(assetLoader);        return true;        }    assetLoader.load(assetURLRequest);    }

Function In A Method Return True To Method's Caller?
I think I probably don't know the correct terminology to ask this question, but here goes:

In this example, can anyone tell me how to have the setComplete event function within the main method return true to the caller of the method, instead of just to the listener within the method?

Many thanks!


PHP Code:



function loadAsset(target:MovieClip, asset:String, assetLoaderInfo:LoaderInfo): Boolean
    {
    var assetLoader:Loader = new Loader();
    var assetURLRequest:URLRequest = new URLRequest(asset);
    assetLoader.contentLoaderInfo.addEventListener(Event.OPEN, setLoaderInfo);
    assetLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, setComplete);
    function setLoaderInfo(event:Event)
        {
        assetLoaderInfo = event.currentTarget;
        }
    function setComplete(event:Event)
        {
        target.addChild(assetLoader);
        return true;
        }
    assetLoader.load(assetURLRequest);

    }

Why Is Taking That Much CPU?
In the project that I'm working on, I have under a mask (about 500x200) a movieclip with 4 pictures that are motion tweened and in the end of the mc some text motion tweened.
In the main scene I have some bouncing balls actionscripted, using some gravity formulas.
Now the problem....
When I play the swf, in the first part (the one with the pictures motion tweened) the bouncing balls are visibly slowed down (as if frame rate dropes), and I notice also that the CPU usage is quite high (85% approx.).
When the timeline arrives in the 2nd part (the one with the motion tweened text) everything is back to normal (CPU usage drops too...).

The size of the swf is 130k...the 4 imported pictures are PNG...Can I do something to fix the sluggish play in the first part?
Thank you!

Why Is Taking That Much CPU?
In the project that I'm working on, I have under a mask (about 500x200) a movieclip with 4 pictures that are motion tweened and in the end of the mc some text motion tweened.
In the main scene I have some bouncing balls actionscripted, using some gravity formulas.
Now the problem....
When I play the swf, in the first part (the one with the pictures motion tweened) the bouncing balls are visibly slowed down (as if frame rate dropes), and I notice also that the CPU usage is quite high (85% approx.).
When the timeline arrives in the 2nd part (the one with the motion tweened text) everything is back to normal (CPU usage drops too...).

The size of the swf is 130k...the 4 imported pictures are PNG...Can I do something to fix the sluggish play in the first part?
Thank you!

3d For The Taking
Hi Gang,

I got pointed to a link by pedalspeed (most helpful chap). It was in the thread entitled "node code".

So anyway.. I took the code there and built a framework for the underlying 3d transforms (which I can't really understand cause Im sorta math stupid .

What I basically have here is a few objects which generate point sets (cirlces, cubes, and a grid) and a corresponding pointSet interpreters.

The point object is kinda special because it represents a point in space. I have a wrapper that assigns a glyph (mc) to each point. I did this because as I was coding a point, it just seemed to me that how the point is drawn is an arbitrary detail. Doing it this way, I could actually draw a 3d mc and attach that as the glyph to represent the point.

In sharing this, I hope others will build 3d (or 2d) point set objects and their interpreters. I was thinking about pie charts, or a globe even .

Lastly, the hardcore oopers may notice several patterns here. An iterator, a visitor and a factory. I think this piece represents a pretty broad range of the stuff I have learned about object oriented programming thus far.

anyway.. enjoy.

http://www.nebulouscore.com/examples/flash_3d_mod6.swf (+.fla)



> <

[AS2 OOP] Calling A Method In A Method
Hi everyone
i'm not quite sure how to phrase my problem, so i'll examplify:

Code:
class A{
function A(){
trace("construct");
}
private function moo(){
trace("moo!");
}
private function cow(){
trace("start mooing");
moo();
}
}
this does what I expect it to: construct, start mooing, moo!

Code:
class A{
function A(){
trace("construct");
}
private function moo(){
trace("moo!");
}
private function cow(){
trace("start mooing");
_root.onEnterFrame = function(){
trace("moo!")
}
}
}
this also does what I expect it to: construct, start mooing, moo!, moo!, moo!, ...

Code:
class A{
function A(){
trace("construct");
}
private function moo(){
trace("moo!");
}
private function cow(){
trace("start mooing");
_root.onEnterFrame = function(){
moo();
}
}
}
yet this doesn't, I'd expect it to: construct, start mooing, moo!, moo!, moo!, ...
yet the moo! moo! moo! doesn't appear, as if moo() never gets called it all.
so what I'm I doing wrong?

I Am Taking A Poll....please Help
Hello to all web developers. I am trying to take a poll about frustrations. Particulary using rich media authoring. There are a couple of questions actually....and they apply to all - beginners thru expert.

1. What frustrates you the most about using flash or rich media tools. Including audio & audio editing, graphics, animations (vector & bitmaps)and actionscripting??

2. What products/libraries/rescources would make your life easier - and save you time and money?? Even if they do not exist yet?? (For example....a library of flash web forms that covered a variety of scripting formats, PHP, CGI, Java- all drag n drop)

3. Would flash developers be interested in media assets like audio loop libraries, interactive flash banner libraries, motion graphic clip libraries, smart clip libraries....etc??

Thanks for your poll feedback...just interested in what others think!!

Sinnaudio

Taking Out An Actionscript
I am trying to find the actionscript in a flash document that I have for a client and I cannot find the script. I am using Flash MX has anything changed? I remember having an a in the frame before.

Please help...

Taking Actionscripting A Little Further ..
I want to take my actionsripting a little further than just gotoAndPlay() and tellTarget kind of actions. Can anyone recomend a good book, not to advanced and not novice-like ..?
Lars

Taking .fla Exporting To .swf
Good morning all.

I am currently working a swish site and i'm using a flash plug in to import my .txt files.

i can get one to work using the original .fla files but when i try to export as a new .swf file all i get are scroll buttons.

here is an attached file. hope someone can help also here is the recommended actions. but i just can't seem to get it working.

Actions for (No Instance name assigned) (Scroll down)
onClipEvent ( enterFrame ) {
if (lPressed) {
_root.allpages.about_us.MySprite.TextBox.scroll += 1;
}
}

Actions for (No Instance name assigned) (Scroll up)
onClipEvent ( enterFrame ) {
if (lPressed) {
_root..allpages.about_us.MySprite.TextBox.scroll -= 1;
}
}

Actions for Frame 1 of Layer Named Layer 1
loadVariablesNum ("about_us.txt", 0); "this is where it is suppose to take my .txt file but no go"

Taking A Look At ActionScript
I have about 20 pages worth action script... is it possible to print it out with the proper colors.... so that i can debug it on paper??? cause if i cut and paste it to notepad... all i get is black and white code...

Thanks,
Carlos

Taking Sound Out A Fla
Hi,

Does anybody know how you can take a sound out of a .fla file?

tnx in adv

Airplane Taking Off?
i am going to be building a web site for a local travel agency. they wanted to have a intro with a airplane taking off from a runway. preferrably a 747 or something like that. i have looked all over here for a intro that would suite something like that and i could then load text to match the web site. does anyone know where i could find a fla file of this?

if not a airplane, then a cruiseship. anything for the travel agency. it just is going to be a intro then will autoredirect to the index2.htm page.

thanks in advanced...

sorry if i posted this in the wrong place, i wasnt sure where to post this.

Taking Away From Score
Ok ive got this game, you shoot things out of the sky to get points, now i want to add things that if you shoot them it takes away points.

I just guessed this but it dosnt work
code:
_root.score - 1;


Thanks for any help you can give

Taking The LAG Out Of The Movie
http://www.mannymedia.com/mulfolio

is the site portfolio im working on...

in the portfolio... the motion is laggy...
the bandwidth profiler says its using 34 KB...

is that whats making it lag.... if so, how do i bring that down?
nothing is animating when the folio comes on in the site...

http://www.mannymedia.com/mulfolio/folio.htm is how fluid the movements is supposed to be...


THANK YOU MILLIONS IN ADVANCE... kind of a tight deadline to...

-manny

Taking A Screenshot
What is the keyboard shortcut for taking a screenshot of a finished Flash Movie?

Taking The Audio From SWF
Hi.
I'm recreating a project from a bunch of SWFs and I don't have the original FLAs. Is there a good way to extract the audio from the SWFs so I can re-build the animation?

[F8] Taking Animation Out
Hello all. Long time listener, 1st time caller here. Here's my issue:

I have designed a website using a template that the client selected from a website. Included in this was a flash header. The site itself contains a database and is also spliced with wordpress/AJAX technology. I'm having some issues with the flash header. My backend guy needs me to give him the .fla file, but needs it to contain NO ANIMATION. i do not have flash experience. is this complicated to do? like i said...i have the original flash file as well as the compiled .swf file. where do i got from here. you can view the header at:

http://www.inspgh.com

please help me flash heads!

Taking Xml Literally
let's say i load in some XML:
<root>
<pos>
<x>stage.stageWidth</x>
</pos>
</root>

And let's say i have a movieclip i would like to position by way of the xml value. This is simple if my value is numeric. But in this case, it's a relative position based on an unknown. Is there a way to import this value from xml, and later in my code , state:

mc.x=xml.pos.x

??

Taking To XML Through ActionScript
Hi there,

I'm currently working on a Flash Menu 'carosuel' and I've got to a point were I can't work out how to get the carousel to slow down and stop spinning once the cursor rolls out from the Flash area. I'm pulling in XML too, which I'm finding a bit tricky. Here's my code:

#include "mc_tween2.as"
import mx.utils.Delegate;
import flash.filters.BlurFilter;
var blur:BlurFilter = new BlurFilter(0, 0, 1);


var numOfItems:Number;
var radiusX:Number = 320;
var radiusY:Number = 50;
var centerX:Number = Stage.width / 2 - 15;
var centerY:Number = Stage.height / 2.4;
var speed:Number = 0.05;
var perspective:Number =15;
var home:MovieClip = this;
var blurX:Number = 30;

var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
tooltip._alpha = 0;

var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function()
{
var nodes = this.firstChild.childNodes;
numOfItems = nodes.length;
for(var i=0;i<numOfItems;i++)
{
var t = home.attachMovie("item","item"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
t.toolText = nodes[i].attributes.tooltip;
t.icon.inner.loadMovie(nodes[i].attributes.image);
t.r.inner.loadMovie(nodes[i].attributes.image);
t.icon.onRollOver = over;
t.icon.onRollOver = blurX;
t.icon.onRollOut = out;
t.icon.onRelease = released;
}
}

function over()
{
trace (home.tooltip.thing._y);
home.tooltip.thing._y = -180;
home.tooltip.thing.tween ("_y",-119,.5,"easeOutQuart");
home.tootip
home.tooltip._alpha = 0;
//home.tooltip._x = home.tooltip._x - 40;
home.tooltip.alphaTo(100, 1.5, "easeOutQuart");
//home.tooltip.tween((home.tooltip._x + 40), 1.5, "easeOutQuart");
home.tooltip.tipText.text = this._parent.toolText;
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
}

function out()
{

delete home.tooltip.onEnterFrame;
home.tooltip.alphaTo(0, 1, "easeOutQuart");
//home.tooltip._alpha = 0;
}

function released()
{
trace(this._parent.toolText);
}

function moveTip()
{
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
}

xml.load("icons.xml");

function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = (this._y - perspective) /(centerY+radiusY-perspective);
this._xscale = this._yscale = s*100;
this._alpha = s*150-5;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale) + 100);
this.blurY = s*150;
trace(s);
this.filters = [blur];


//this._alpha = this._y - 525;
/* blur.blurX = speed * 5;
//blur.blurY = -this._y / 10 + 62.5;
this.filters = [blur];

var s:Number = this._y/(centerY+radiusY);
this._xscale = this._yscale = s*100;
this._alpha = s*150-70;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale+100));
}
*/
}


this.onMouseMove = function()
{
speed = (this._xmouse-centerX)/10000;

blur.blurX = Math.abs(speed * 200);
this.filters = [blur];
}


Any help would be much apreciated!

Thanks

Anyone Mind Taking A Look?
Please Take a look at my attached .FLA so you can see what I'm trying to explain....All Help Is GREATLY appreciated
================================================== ==========================================


Basically I have 6 Layers

RedButton
Blue Button
Green Button
OrangeButton
Text
Actions

Each of the buttons corresponds to a different word which I have nested inside the "Text" movieclip which when pressed SHOULD bring up the word with a little alpha from 0-100
Each word has an instance name to be referred to as well.

Here's my action script for the first button

this.RedButton.on(release){
_parent.Text.Hello.gotoAndPlay(2);
}

When it compiles it gives me an error of "Field name expected after "." operator. Anyone know what this is or how I can fix my code....see any other errors? What's the best way to approach this movie?

Thank you for all your help...you guys are awesome.

Taking A Snapshot
hey guys, im using the webcam function in flash to take photos, does anyoen now how to save these photos into a database, i want the user to be able to take there photo, put there name, and appear in a highscore for a game, any ideas???

this is my code so far

output_vid.attachVideo(Camera.get());

import flash.display.BitmapData
import flash.geom.Matrix

var snapshot:BitmapData=new BitmapData(x=155,y=120);
var snapshot2:BitmapData=new BitmapData(x=155,y=120);

function takeSnapshot(nr)
{
snapshot.draw(output_vid,new Matrix());
}
function takeSnapshot2(nr)
{
snapshot2.draw(output_vid,new Matrix());
}

i have 2 buttons that take the snapshots

cheers

Taking A Number Out
Hi again,

Thank you very much for your help, it worked like magic.

I have come to another dilema,

I am trying to make a televison that when a combination of numbers are pressed, and enter is pushed, it will go to a specific scene depending on what numbers were pushed.


Code:
Button_Enter.onPress = function()
{
_root.gotoAndPlay("Website_" + channel.text, 0);
}
That is the script for the Enter button.

Website_ is the name of the scene + channel.text which is the number

When typing in the numbers to bring up a certain page, if its a single digit, some people might put a 0 infront of the number. Example 08 instead of 8 just like on a TV. Is there a way to set it so that if they punched in 0, it would still bring up 8 so that i wouldnt have to make two scenes just incase they punched in 08 or 8.

Your help would be greatly appreciated.

Taking Cover
okay, im making some kind of shooter game and does anyone know how to make something like that you press space while standing next to some object, you'll take cover?

Swf Taking Up Whole Browser?
I want to have my site with a swf that is taking up the whole browser. So if someone is at a smaller resolution it will shrink perfectly to their browser. same with larger resolutions...

I see that some have javascript detecting browser size?

Flash Taking Over?
This is a simple question but I want enough feedback to make a informed decision in the future. While I think it is important to keep up to speed on multiple languages and techniques with web design, it seems as though a majority of the 'major' website's these days are being taken over by entire flash sites. So I guess my question is, should I concentrate my learning on Flash to keep up to speed with the industry or is this just a 'flashy' (no pun intended) time consuming, pricy solution for large scale sites? Everyone's opinion is of value..

Taking A Snapshot
hey guys, im using the webcam function in flash to take photos, does anyoen now how to save these photos into a database, i want the user to be able to take there photo, put there name, and appear in a highscore for a game, any ideas???

this is my code so far

output_vid.attachVideo(Camera.get());

import flash.display.BitmapData
import flash.geom.Matrix

var snapshot:BitmapData=new BitmapData(x=155,y=120);
var snapshot2:BitmapData=new BitmapData(x=155,y=120);

function takeSnapshot(nr)
{
snapshot.draw(output_vid,new Matrix());
}
function takeSnapshot2(nr)
{
snapshot2.draw(output_vid,new Matrix());
}

i have 2 buttons that take the snapshots

cheers

Taking On An Intro
Hiya guys!

I was thinking, when taking on an intro for ones site, what approach is the easiest?

If I were to make an intro, I'd go with one MC per layer in the main scene, then use a s***load of framelabels and telltargets. So one MC starts out, when it reaches a certain frame#, it triggers another MC... and so forth...

Taking Screenshots?
Hi,
Does anyone know how to take a screen shot? Also can you take a screen shot of anything on the web or just your own?
I'm not sure how the subject works so I don't know the boundries of it all..

Thanks in advance
postatomic

Swf Taking Up Whole Browser?
I want to have my site with a swf that is taking up the whole browser. So if someone is at a smaller resolution it will shrink perfectly to their browser. same with larger resolutions...

I see that some have javascript detecting browser size?

Flash Taking Off
Hi, Will Flash ever take over from PHP, ASP etc? Will sites be taken over completely by flash? What are the disadvantages of using Flash on websites?

Taking Over A Site
I was asked to take over a website and modify it.  I have flash4 but it won't open the swf (must be a newer version).  Would purchasing flash8 allow me to do this? Do I need the source fla?  Is there a more cost effective route?  

Thanks in advance for any assistance.
EJ

This Is Taking Too Long To Load
ive sent published flash animations from my home computer to the school computers so i can put them on my website. I transferred the .html files but they are taking too long to load.

Also when i try too enter them into frontpage, it says that the format isnt supported!

What do I do???

P.S im using flash 4 and the computer at school isnt slow, but yet it isnt loading

Copyright © 2005-08 www.BigResource.com, All rights reserved