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




I Imported A Raw Fireworks Png File And Now Flash Is Auto Converting Every Thing I Draw Into A "Drawing Object"



I imported a raw fireworks png file and now Flash is auto converting every thing I draw into a "Drawing Object" How do I get rid of it? Please help!



Adobe > Flash General Discussion
Posted on: 06/18/2007 05:13:59 PM


View Complete Forum Thread with Replies

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

Converting A Shape Into A CS3 Drawing Object
Hello!

I've noticed that when I draw, say a square, in CS3, it becomes a "Drawing object" (like a symbol that doesn't appear in the library), instead of a pure shape like in Flash 8.

But let's say I break a drawing object down into a shape, how do I convert this shape back into a drawing object?

I like drawing objects, they're cool for simple shapes that I don't want in my library, and that I don't want to get distorted like pure shapes (despite being placed at integer positions) particularly in large documents.

Anybody know?

Thanks,
Kyrre

Converting A Shape Into A CS3 Drawing Object
Hello!

I've noticed that when I draw, say a square, in CS3, it becomes a "Drawing object" (like a symbol that doesn't appear in the library), instead of a pure shape like in Flash 8.

But let's say I break a drawing object down into a shape, how do I convert this shape back into a drawing object?

I like drawing objects, they're cool for simple shapes that I don't want in my library, and that I don't want to get distorted like pure shapes (despite being placed at integer positions) particularly in large documents.

Anybody know?

Thanks,
Kyrre

[Q] Fireworks Button Imported Into The Flash
Howdy...

Here is a PNG file that my designer made in Fireworks...
http://www.flashvacuum.com/~cyanblue/tmp/Button.png

I open that file in the Fireworks MX 2004, and do the Copy and I go back to Flash MX and paste it... I get the button in Bitmap not in Vector... I want the button in vector, so I go to Modify - Combine Paths - Join in Fireworks, and do the copy and paste in Flash... I get the vector version, but I don't see the shade anymore... The yellow face of the button is in one color...

How do I copy the vector version of the Fireworks button in Flash as a vector format without losing any details???

Thank you...

Flash 8 Auto "drawing Object"
hey its been a long while since i did anything in flash, just got 8, and a new feature which i figure must be useful to soemone is the automatic conversion of stuff i pen or circle or box to "drawing objects"

how do i turn this stupid feature off ? I mean, does anyone else find this nauseating ?

lol. sorry, update :

its a button you have in the drawing settings. goober strikes again !!

Blurred Object From Fireworks -> Flash?
Hey everybody.

Here's what I want to do. I want to have a little glowing colored circle pulse with a blur applied to it in Fireworks. I created the little ball and tried to copy and paste it into Flash, but Flash refuses to bring the object in as anything other than a bitmap square. If I do Copy as Vectors out of Fireworks, then it brings in the ball object, but the blur effect is gone.

How can I get a blurred object into Flash maintaining its transparent edges? It needs to be able to have the blurred edges as transparent because the background on which it will be pulsing will not be a solid color.

Thanks in advance .. hope someone can help.

Drawing An Outline Of An Object In Flash And Then Animating The Drawing?
I wish to draw an outline of an object in flash? bit by bit a piece of the outline is drawn until the outline is completed, once this has finished then object then appears and the outline disppears (this part I can manage).

I do not know where to begin? So may need a lot of direction on this one.

A Free Flash Paint/drawing Thing?
where can i get a reasonably good but simple drawing/paint thing made in flash?

i'm looking for a foundation - something i can mess with and add to but would prefer to start off with something - especially as this sort of thing must have been covered numerous times

what i want is a piece of flash work that allows the user to draw with very basic tools - you know, a basic basic paint thing.

i wish to be able to modify and play with the workings of it. any ideas where i can get something like that from?

thanks

Maintain Fireworks Layers When Converting To Photoshop
How do you maintain all the editability of your fireworks layers when converting from png to Photoshop? Is there a way?

I have rarely used fireworks so this is something totally new for me.

I am trying to convert a png from Fireworks 8 to Photoshop CS2 and have tried getting everything to go over but it doesn't.

I have attached a couple of files to show what I'm trying to do.

Basically I want to convert the "Welcome" header so I can maintain the text type and effects in case I need to create new headers in the future.

I have the ability to edit in Fireworks, but I work for a global company and not all my coworkers have Fireworks, but they do have Photoshop.

Letting User Draw And Save Drawing In A Flash Movie
Hi all,

I am looking to add a "signature" flash movie to some forms I am producing online, the visitors would fill in the form then sign with the mouse/graphics tablet and their signature would be saved on the server.

Is this possible with Flash (5) ? Can flash take what the user draws and convert it to a bitmap or even an SVG and send this to a server side script for saving ?

Many thanks

Rikki

Converting A PDF To A Flash FLA File Without Converting To An Image First?
Basically, I'm building a digital catalogue that runs off a CD and uses a Flash 'page turning component' to display the pages. Certain pages will have links that use Flash's Fscommand call to open Word and Excel documents.

Has anyone got any bright ideas of how to Convert a PDF to a Flash FLA file without converting to an image first?

I know I can open a PDF in Photoshop, save as a PNG or JPG and then import this into Flash, however the quality isn't brilliant. If you use a hi-res image, then you get a hi-res file size...

Currently, the best way I have found, is to open the PDF in Illustrator, then export it as a SWF. Illustrator converts all text to shapes and you end up with a small SWF, yet great quality when displayed in larger sizes. As I'm currently using a page turning flash component that loads SWF files, I need the quality to be good for the 'Zoom' function.

I've found an Illustrator script that will do the hard work via a 'batch' process, so I can take a 100 page PDF and convert the whole lot to 100 SWF files while I drink tea and 'look busy' and read a magazine, but the problem I have is that I need to add a layer of buttons to several of the SWF files to add a little functionality....

I do have a SWF to FLA decompiler which does a good job, however because Illustrator turns everything into shapes, the decompiler does the same and you end up with thousands of files in the library.... Plus there are a lot of error messages when the file is first loaded...

Many layers are masked, (for some reason without a fill), so if you publish the decompiled file straight away, you just get a blank file. Once you go through and fill the masks needed, it shows when you publish, but this really is a lot of work and I've had a few pages that show when you open the SWF file, but don't show when the SWF is called into the page turning file.... Hmmm....

So in short, I'd like to take a PDF and convert it to a FLA file, add a layer of buttons and publish as a SWF file....

Anyone got any 'Pearls of Wisdom'?

Clere
Clere Print

Having Troubles Applying Texture Fill To Imported Image (Fireworks 8)
I have an image that I'm trying to apply a texture fill to, but no matter what I do, the texture fill does not apply.

The image was a jpg that I have cropped and saved as a png file in Fireworks 8.

There is another layer in this same file that I'm creating, that I can apply the fill to and it's not a problem.

Is there something special I need to do? While I have image selected, I go to the paint bucket tool, then select my color, fill style solid, edge anti-alias, and texture grid 1 100%.

Fireworks 4: Disable Text Auto-update In Button?
I was designing several button symbols and was getting fed up with the pop-up message asking me when I edited a text in Up state whether I want this new change to be applied to the rest of the states.
So I ticked a checkbox saying something like "dont ask me again".

Now I miss it. How do I get it back?

Thanks guys.

Heeeelp How Do You Do The Line Draw Thing?
I am trying to achieve the effect of Flash "drawing" a given shape or path. Seems like it would be pretty easy, but I have looked ALL OVER, and the only tutorial I've found is
http://actionscript-toolbox.com/shapeDefinedMC.php - But this is incredibly complicated... I have seen this done a lot on other sites. Does anyone get this and can clue me in on an easier way than the above tutorial?

Heeeelp How Do You Do The Line Draw Thing?
I am trying to achieve the effect of Flash "drawing" a given shape or path. Seems like it would be pretty easy, but I have looked ALL OVER, and the only tutorial I've found is
http://actionscript-toolbox.com/shapeDefinedMC.php - But this is incredibly complicated... I have seen this done a lot on other sites. Does anyone get this and can clue me in on an easier way than the above tutorial?

Auto Draw A Rectangle
hi, i don't know if i'm posting at the right topic but i would like to know if anyone can tell me how to auto draw a rectangle around an image? for example, the image loads and is static then a rectangle is drawn around the image starting from the top left corner and goes around the rectangle back to the start of the image.

Auto Draw A Rectangle [FMX]
hi, i don't know if i'm posting at the right topic but i would like to know if anyone can tell me how to auto draw a rectangle around an image? for example, the image loads and is static then a rectangle is drawn around the image starting from the top left corner and goes around the rectangle back to the start of the image.

thanks!
kathy

Auto Open CD Draw With Actionscript
Hi

Can I assign a script to a button in Flash so it automatically opens the CD draw?

Many thanks

Toby

Auto Scrolling Bar Thing?
ive seen it a few places and would like one on a site im currently designing. It is a scrollbar that scrolls when a mouse is rolled over either side of the object. So when you mouse over the left side it scrolls to the left and when you mouse over the right side it scrolls to the right. I expect theres a tutorial on this but am not sure wher to look. Please help me.
Thanks

How To Draw In A Particular Mc Using Drawing API
how can i draw only in a particular mc using drawing API...

Converting Type Of Imported Variable
Hi

I've imported some variables into my .swf by using some Javascript to pull the variables out of the url with document.location.search.

This works well. The problem is that the variables are recognised as being of string type "text". How do I convert them to the numeric string type, so that I can use them in equations?

Cheers

k!d

Using Drawing API To Draw On Screen And Then Having Flash Redraw In "real Time"
Hi,

I am about to attempt to create a Flash movie that would eventually become a screensaver in Screentime. What this is going to consist of is a customized control panel (as per the Screentime API specs) in which the user can draw on screen with the built in drawing methods and the actual screensaver in which the user's drawing is recreated, line by line, in simulated "real time" in a scaled up full screen version.

What I'm asking here is basically what the best approach would be for me to accomplish this. I don't necessarily need a step by step tutorial, as I have a pretty good grasp of Actionscript at this point. The drawing interface part is simple, what I really am trying to figure out is the best approach to capturing each vector point in sequence and assigning it a time stamp as well, so that it can be "played back" in at least an approximation of how the user drew it.

So far what I am thinking is that I should store each point in the drawing as a new object in an array, with all the various properties of the vertor point including it's time stamp as properties of that object. What I can't really figure out so far is what is the best way to script the intervals in which my recording script captures this vectors and pushes them into the array.

Any advice at all would be much appreciated.

Thanks,
Brian

Flash Object Auto Sizing
Is it at all possible for the flash object within a web page to auto size to the same size as the flash file, not shrinking or enlarging the object...any help would be greatly appreciated, thanks in advance..

Can I Change My Sound/music File After I Imported Into My Flash File?
Hi,
I want to know can i change my sound/music file after i imported into my flash file (or put it on the work stage)? I mean can i change the length or make the volume louder or softer, like those kind of basic changing.... ?
can somebody help me plz !!!!!! Thank you !!!!!

by Ryan...

Drawing Board - Draw Thickness
On my drawing board, as I said before in a previous post, the code that I have in the first frame of my movie is:

stop();
createEmptyMovieClip("Line",1);

Line.lineStyle(1,0x000000,100);

onMouseDown = function (){
Line.moveTo(_xmouse, _ymouse);

onMouseMove = function (){
Line.lineTo(_xmouse, _ymouse);}
}

onMouseUp=function(){
onMouseMove=null;
}

I added color buttons to change the color of the lines...
(RED)
on (release) {
Line.lineStyle(1,0xFF0000,100);
}
(change hexadecimal code for all the colors)

Now I made 4 buttons to adjust the thickness. First one - thickness 1, second - 3, 5, and 10. This is the code I put on it the first one:

on (release) {
Line.lineStyle(1);
}

I know that this isnt complete, and the thickness works, but it always changes the color to black, because nothing else is set. Is there a way to set it to change thickness according to what color you have chosen? What is the code.

Thx

Drawing Board Stop Draw
This code is from a drawing board, the problem is:

1- When you click outside the drawing area, a dot is drawn (thus you cant click anything except inside drawing area because it will result in undesired dots)

2- When you drag outside the drawing area the dot is drawn (bad), the pencil doesn't draw (good), but if you drag until reaching the drawing area draws (undesired, because it should only draw when you started to drag from inside the drawing area)

Can someone tell me how to tweak the code or simple add a "deselect" tool option please?

That's a link to the fla file ziped, and that's the code of the drawing board:

http://www.soccerschool.com.ar/f/drawingBroadmx.zip


Code:
_root.P = 0;
_root.level = 1000;
_root.tmpx = -1;
_root.tmpy = -1;
_root.count = 0;
_root.isMouseDown = false;
_root.frontColor = 0x000000;

// don't draw if dragged from outside

mm.drawing=false;
mm.onPress=function(){this.drawing=true;}
mm.onRelease=mm.onRollOut=function(){this.drawing=false;}

// note that rolling out of the mm clip will also stop the drawing

//default brush size

_root.pt = 5;
_root.tool = "pen";
md = new Object();
mm = new Object();
mu = new Object();
actionList = new Array();
Number.prototype.HEXtoRGB = function() {
return {rb:this >> 16, gb:(this >> 8) & 0xff, bb:this & 0xff};
};
Color.prototype.blendRGB = function(c1, c2, t) {
if (arguments.length == 2) {
t = c2;
c2 = this.getRGB();
}
if (t<-1) {
t = -1;
} else if (t>1) {
t = 1;
}
if (t<0) {
t = 1+t;
}
c1 = c1.HEXtoRGB();
c2 = c2.HEXtoRGB();
var ct = (c1.rb+(c2.rb-c1.rb)*t) << 16 | (c1.gb+(c2.gb-c1.gb)*t) << 8 | (c1.bb+(c2.bb-c1.bb)*t);
this.setRGB(ct);
return ct;
};
md.onMouseDown = function() {
if (_root.paintMode) {
a = new Object();
a.start = _root.P;
actionList.push(a);
_root.isMouseDown = true;
if (_root.tool == "del") {
for (i=0; i<_root.P; i++) {
if (eval("P"+i).hitTest(_root.cursor)) {
eval("P"+i).removeMovieClip();
break;
}
}
}
if (_root.tool == "sqr") {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P)._x = _root._xmouse;
eval("P"+_root.P)._y = _root._ymouse;
}
if (_root.tool == "ova") {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P)._x = _root._xmouse;
eval("P"+_root.P)._y = _root._ymouse;
}
if (_root.tool == "pen") {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P)._x = _root._xmouse;
eval("P"+_root.P)._y = _root._ymouse;
eval("P"+_root.P).beginFill(_root.frontColor, 100);
eval("P"+_root.P).drawCircle((_root.pt/2), 0, 0);
this.endFill();
_root.P++;
_root.tmpx = _root._xmouse;
_root.tmpy = _root._ymouse;
}
if (_root.tool == "mak") {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P)._x = _root._xmouse;
eval("P"+_root.P)._y = _root._ymouse;
eval("P"+_root.P).duplicateMovieClip(eval("P"+_root.P)._name+"shadow", _root.P+_root.level-500);
sn = eval("P"+_root.P)._name;
eval("P"+_root.P).onUnload = function() {
eval(this._name+"shadow").removeMovieClip();
};
eval(sn+"shadow").beginFill(_root.frontColor, 10);
eval(sn+"shadow").drawCircle((pt), 0, 0);
eval(sn+"shadow").endFill();
eval("P"+_root.P).beginFill(_root.frontColor*10, 5);
eval("P"+_root.P).drawCircle((_root.pt/2), 0, 0);
this.endFill();
_root.P++;
_root.tmpx = _root._xmouse;
_root.tmpy = _root._ymouse;
}
}
};
md.onMouseUp = function() {
if (_root.isMouseDown == true) {
_root.isMouseDown = false;
if (_root.tool == "sqr") {
_root.P++;
}
if (_root.tool == "ova") {
_root.P++;
}
actionList[actionList.length-1].end = _root.P;
}
_root.tmpx = -1;
_root.tmpy = -1;
_root.level += 1000;
_root.count = 0;
};
mm.onMouseMove = function() {
// setear area en donde debe dibujar
if (_xmouse < 705 && _xmouse > 70 && _ymouse < 595 && _ymouse > 115) {
_root.paintMode = !(Panel.hitTest(_root._xmouse, _root._ymouse, true));
if (_root.paintMode) {
//Mouse.hide();
_root.cursor._visible = 1;
if (_root.tool == "del") {
for (i=0; i<_root.P && _root.isMouseDown; i++) {
if (eval("P"+i).hitTest(_root.cursor)) {
eval("P"+i).removeMovieClip();
}
}
}
if (_root.tool == "sqr") {
if(this.drawing){
sqr = eval("P"+(_root.P));
sqr.clear();
point = new Object();
point.x = _root._xmouse;
point.y = _root._ymouse;
sqr.globalToLocal(point);
toX = point.x;
toY = point.y;
sqr.beginFill(_root.frontColor, 100);
sqr.moveTo(0, 0);
sqr.lineTo(toX, 0);
sqr.lineTo(toX, toY);
sqr.lineTo(0, toY);
sqr.endFill();
}
}
if (_root.tool == "ova") {
if(this.drawing){
ova = eval("P"+(_root.P));
ova.clear();
point = new Object();
point.x = _root._xmouse;
point.y = _root._ymouse;
ova.globalToLocal(point);
toX = point.x;
toY = point.y;
v_far = Math.abs(0-toY);
h_far = Math.abs(0-toX);
far = Math.sqrt((v_far*v_far)+(h_far*h_far));
ova.beginFill(_root.frontColor, 100);
ova.drawCircle(far, 0, 0);
ova.endFill();
}
}
if (_root.tool == "pen") {
_root.count++;
if (_root.count%500 == 0) {
_root.level += 1000;
}
if (_root.isMouseDown && _root.count%4 == 0) {
if (_root.tmpx != -1 && _root.tmpy != -1) {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P).drawLine(_root._xmouse, _root._ymouse, _root.tmpx, _root.tmpy, _root.pt);
_root.P++;
}
_root.tmpx = _root._xmouse;
_root.tmpy = _root._ymouse;
}
}
if (_root.tool == "mak") {
_root.count++;
if (_root.count%500 == 0) {
_root.level += 1000;
}
if (_root.isMouseDown && _root.count%2 == 0) {
if (_root.tmpx != -1 && _root.tmpy != -1) {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P).drawNeonLine(_root._xmouse, _root._ymouse, _root.tmpx, _root.tmpy, _root.pt);
_root.P++;
}
_root.tmpx = _root._xmouse;
_root.tmpy = _root._ymouse;
}
}
} else {
Mouse.show();
_root.cursor._visible = 0;
}
}
};
Mouse.addListener(md);
Mouse.addListener(mm);
Mouse.addListener(mu);
//
MovieClip.prototype.drawCircle = function(r, x, y) {
this.moveTo(x+r, y);
a = Math.tan(22.5*Math.PI/180);
for (var angle = 45; angle<=360; angle += 45) {
// endpoint:
var endx = r*Math.cos(angle*Math.PI/180);
var endy = r*Math.sin(angle*Math.PI/180);
// control:
// (angle-90 is used to give the correct sign)
var cx = endx+r*a*Math.cos((angle-90)*Math.PI/180);
var cy = endy+r*a*Math.sin((angle-90)*Math.PI/180);
this.curveTo(cx+x, cy+y, endx+x, endy+y);
}
};
MovieClip.prototype.drawLine = function(fromX, fromY, toX, toY, pt) {
this._x = fromX;
this._y = fromY;
point = new Object();
point.x = toX;
point.y = toY;
this.globalToLocal(point);
// trace(point.x + " " + point.y);
toX = point.x;
toY = point.y;
// way cal
v_far = Math.abs(0-toY);
h_far = Math.abs(0-toX);
far = Math.sqrt((v_far*v_far)+(h_far*h_far));
adj = (toX-0);
Q = Math.acos(adj/far)/(Math.PI/180);
if (0>toY) {
rot = 90-Q;
} else {
rot = 90+Q;
}
if (rot>90) {
way = 360-Math.abs(rot-90);
} else {
way = Math.abs(rot-90);
}
for (i=0; i<far; i += 2) {
nx = int((i)*Math.cos((way)*(Math.PI/180)));
ny = -(int((i)*Math.sin((way)*(Math.PI/180))));
this.beginFill(_root.frontColor, 100);
this.drawCircle((pt/2), nx, ny);
this.endFill();
}
};
MovieClip.prototype.drawNeonLine = function(fromX, fromY, toX, toY, pt) {
this._x = fromX;
this._y = fromY;
point = new Object();
point.x = toX;
point.y = toY;
this.globalToLocal(point);
// trace(point.x + " " + point.y);
toX = point.x;
toY = point.y;
// way cal
v_far = Math.abs(0-toY);
h_far = Math.abs(0-toX);
far = Math.sqrt((v_far*v_far)+(h_far*h_far));
adj = (toX-0);
Q = Math.acos(adj/far)/(Math.PI/180);
if (0>toY) {
rot = 90-Q;
} else {
rot = 90+Q;
}
if (rot>90) {
way = 360-Math.abs(rot-90);
} else {
way = Math.abs(rot-90);
}
this.duplicateMovieClip(this._name+"shadow", _root.P+_root.level-500);
this.onUnload = function() {
eval(this._name+"shadow").removeMovieClip();
};
for (i=0; i<far; i += 2) {
nx = int((i)*Math.cos((way)*(Math.PI/180)));
ny = -(int((i)*Math.sin((way)*(Math.PI/180))));
eval(this._name+"shadow").beginFill(_root.frontColor, 10);
eval(this._name+"shadow").drawCircle((pt), nx, ny);
eval(+this._name+"shadow").endFill();
}
for (i=0; i<far; i += 2) {
nx = int((i)*Math.cos((way)*(Math.PI/180)));
ny = -(int((i)*Math.sin((way)*(Math.PI/180))));
c = new Color(this);
c.setRGB(_root.frontColor);
c.blendRGB(0xffffff, .2);
this.beginFill(c.getRGB(), 100);
this.drawCircle((pt/2), nx, ny);
this.endFill();
}
};
function cursorReflesh() {
this.createEmptyMovieClip("cursor", 100001);
c = new Color(this.cursor);
c.setRGB(_root.frontColor);
if (_root.frontColor>(0xffffff/2)) {
c.blendRGB(0x000000, -0.3);
} else {
c.blendRGB(0xffffff, -0.5);
}
this.cursor.lineStyle(1, 0xffffff, 100);
this.cursor.drawCircle(pt/2, 0, 0);
this.cursor.startDrag(true);
}
function undo() {
if (actionList.length>0) {
a = actionList.pop();
if (a.start == undefined) {
C = new Color(this.Background);
C.setRGB(a);
C2 = new Color(this.Panel.bubg);
C2.setRGB(a);
} else {
for (i=a.start; i<=a.end; i++) {
eval("P"+i).removeMovieClip();
}
_root.P = a.start;
}
}
}
cursorReflesh();
I hope you can help and thank you so much!

Drawing Board Stop Draw
This code is from a drawing board, the problem is:

1- When you click outside the drawing area, a dot is drawn (thus you cant click anything except inside drawing area because it will result in undesired dots)

2- When you drag outside the drawing area the dot is drawn (bad), the pencil doesn't draw (good), but if you drag until reaching the drawing area draws (undesired, because it should only draw when you started to drag from inside the drawing area)

Can someone tell me how to tweak the code or simple add a "deselect" tool option please?

That's a link to the fla file ziped, and that's the code of the drawing board:

http://www.soccerschool.com.ar/f/drawingBroadmx.zip


Code:
_root.P = 0;
_root.level = 1000;
_root.tmpx = -1;
_root.tmpy = -1;
_root.count = 0;
_root.isMouseDown = false;
_root.frontColor = 0x000000;

// don't draw if dragged from outside

mm.drawing=false;
mm.onPress=function(){this.drawing=true;}
mm.onRelease=mm.onRollOut=function(){this.drawing=false;}

// note that rolling out of the mm clip will also stop the drawing

//default brush size

_root.pt = 5;
_root.tool = "pen";
md = new Object();
mm = new Object();
mu = new Object();
actionList = new Array();
Number.prototype.HEXtoRGB = function() {
return {rb:this >> 16, gb:(this >> 8) & 0xff, bb:this & 0xff};
};
Color.prototype.blendRGB = function(c1, c2, t) {
if (arguments.length == 2) {
t = c2;
c2 = this.getRGB();
}
if (t<-1) {
t = -1;
} else if (t>1) {
t = 1;
}
if (t<0) {
t = 1+t;
}
c1 = c1.HEXtoRGB();
c2 = c2.HEXtoRGB();
var ct = (c1.rb+(c2.rb-c1.rb)*t) << 16 | (c1.gb+(c2.gb-c1.gb)*t) << 8 | (c1.bb+(c2.bb-c1.bb)*t);
this.setRGB(ct);
return ct;
};
md.onMouseDown = function() {
if (_root.paintMode) {
a = new Object();
a.start = _root.P;
actionList.push(a);
_root.isMouseDown = true;
if (_root.tool == "del") {
for (i=0; i<_root.P; i++) {
if (eval("P"+i).hitTest(_root.cursor)) {
eval("P"+i).removeMovieClip();
break;
}
}
}
if (_root.tool == "sqr") {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P)._x = _root._xmouse;
eval("P"+_root.P)._y = _root._ymouse;
}
if (_root.tool == "ova") {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P)._x = _root._xmouse;
eval("P"+_root.P)._y = _root._ymouse;
}
if (_root.tool == "pen") {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P)._x = _root._xmouse;
eval("P"+_root.P)._y = _root._ymouse;
eval("P"+_root.P).beginFill(_root.frontColor, 100);
eval("P"+_root.P).drawCircle((_root.pt/2), 0, 0);
this.endFill();
_root.P++;
_root.tmpx = _root._xmouse;
_root.tmpy = _root._ymouse;
}
if (_root.tool == "mak") {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P)._x = _root._xmouse;
eval("P"+_root.P)._y = _root._ymouse;
eval("P"+_root.P).duplicateMovieClip(eval("P"+_root.P)._name+"shadow", _root.P+_root.level-500);
sn = eval("P"+_root.P)._name;
eval("P"+_root.P).onUnload = function() {
eval(this._name+"shadow").removeMovieClip();
};
eval(sn+"shadow").beginFill(_root.frontColor, 10);
eval(sn+"shadow").drawCircle((pt), 0, 0);
eval(sn+"shadow").endFill();
eval("P"+_root.P).beginFill(_root.frontColor*10, 5);
eval("P"+_root.P).drawCircle((_root.pt/2), 0, 0);
this.endFill();
_root.P++;
_root.tmpx = _root._xmouse;
_root.tmpy = _root._ymouse;
}
}
};
md.onMouseUp = function() {
if (_root.isMouseDown == true) {
_root.isMouseDown = false;
if (_root.tool == "sqr") {
_root.P++;
}
if (_root.tool == "ova") {
_root.P++;
}
actionList[actionList.length-1].end = _root.P;
}
_root.tmpx = -1;
_root.tmpy = -1;
_root.level += 1000;
_root.count = 0;
};
mm.onMouseMove = function() {
// setear area en donde debe dibujar
if (_xmouse < 705 && _xmouse > 70 && _ymouse < 595 && _ymouse > 115) {
_root.paintMode = !(Panel.hitTest(_root._xmouse, _root._ymouse, true));
if (_root.paintMode) {
//Mouse.hide();
_root.cursor._visible = 1;
if (_root.tool == "del") {
for (i=0; i<_root.P && _root.isMouseDown; i++) {
if (eval("P"+i).hitTest(_root.cursor)) {
eval("P"+i).removeMovieClip();
}
}
}
if (_root.tool == "sqr") {
if(this.drawing){
sqr = eval("P"+(_root.P));
sqr.clear();
point = new Object();
point.x = _root._xmouse;
point.y = _root._ymouse;
sqr.globalToLocal(point);
toX = point.x;
toY = point.y;
sqr.beginFill(_root.frontColor, 100);
sqr.moveTo(0, 0);
sqr.lineTo(toX, 0);
sqr.lineTo(toX, toY);
sqr.lineTo(0, toY);
sqr.endFill();
}
}
if (_root.tool == "ova") {
if(this.drawing){
ova = eval("P"+(_root.P));
ova.clear();
point = new Object();
point.x = _root._xmouse;
point.y = _root._ymouse;
ova.globalToLocal(point);
toX = point.x;
toY = point.y;
v_far = Math.abs(0-toY);
h_far = Math.abs(0-toX);
far = Math.sqrt((v_far*v_far)+(h_far*h_far));
ova.beginFill(_root.frontColor, 100);
ova.drawCircle(far, 0, 0);
ova.endFill();
}
}
if (_root.tool == "pen") {
_root.count++;
if (_root.count%500 == 0) {
_root.level += 1000;
}
if (_root.isMouseDown && _root.count%4 == 0) {
if (_root.tmpx != -1 && _root.tmpy != -1) {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P).drawLine(_root._xmouse, _root._ymouse, _root.tmpx, _root.tmpy, _root.pt);
_root.P++;
}
_root.tmpx = _root._xmouse;
_root.tmpy = _root._ymouse;
}
}
if (_root.tool == "mak") {
_root.count++;
if (_root.count%500 == 0) {
_root.level += 1000;
}
if (_root.isMouseDown && _root.count%2 == 0) {
if (_root.tmpx != -1 && _root.tmpy != -1) {
Paint.duplicateMovieClip("P"+_root.P, _root.level+P);
eval("P"+_root.P).drawNeonLine(_root._xmouse, _root._ymouse, _root.tmpx, _root.tmpy, _root.pt);
_root.P++;
}
_root.tmpx = _root._xmouse;
_root.tmpy = _root._ymouse;
}
}
} else {
Mouse.show();
_root.cursor._visible = 0;
}
}
};
Mouse.addListener(md);
Mouse.addListener(mm);
Mouse.addListener(mu);
//
MovieClip.prototype.drawCircle = function(r, x, y) {
this.moveTo(x+r, y);
a = Math.tan(22.5*Math.PI/180);
for (var angle = 45; angle<=360; angle += 45) {
// endpoint:
var endx = r*Math.cos(angle*Math.PI/180);
var endy = r*Math.sin(angle*Math.PI/180);
// control:
// (angle-90 is used to give the correct sign)
var cx = endx+r*a*Math.cos((angle-90)*Math.PI/180);
var cy = endy+r*a*Math.sin((angle-90)*Math.PI/180);
this.curveTo(cx+x, cy+y, endx+x, endy+y);
}
};
MovieClip.prototype.drawLine = function(fromX, fromY, toX, toY, pt) {
this._x = fromX;
this._y = fromY;
point = new Object();
point.x = toX;
point.y = toY;
this.globalToLocal(point);
// trace(point.x + " " + point.y);
toX = point.x;
toY = point.y;
// way cal
v_far = Math.abs(0-toY);
h_far = Math.abs(0-toX);
far = Math.sqrt((v_far*v_far)+(h_far*h_far));
adj = (toX-0);
Q = Math.acos(adj/far)/(Math.PI/180);
if (0>toY) {
rot = 90-Q;
} else {
rot = 90+Q;
}
if (rot>90) {
way = 360-Math.abs(rot-90);
} else {
way = Math.abs(rot-90);
}
for (i=0; i<far; i += 2) {
nx = int((i)*Math.cos((way)*(Math.PI/180)));
ny = -(int((i)*Math.sin((way)*(Math.PI/180))));
this.beginFill(_root.frontColor, 100);
this.drawCircle((pt/2), nx, ny);
this.endFill();
}
};
MovieClip.prototype.drawNeonLine = function(fromX, fromY, toX, toY, pt) {
this._x = fromX;
this._y = fromY;
point = new Object();
point.x = toX;
point.y = toY;
this.globalToLocal(point);
// trace(point.x + " " + point.y);
toX = point.x;
toY = point.y;
// way cal
v_far = Math.abs(0-toY);
h_far = Math.abs(0-toX);
far = Math.sqrt((v_far*v_far)+(h_far*h_far));
adj = (toX-0);
Q = Math.acos(adj/far)/(Math.PI/180);
if (0>toY) {
rot = 90-Q;
} else {
rot = 90+Q;
}
if (rot>90) {
way = 360-Math.abs(rot-90);
} else {
way = Math.abs(rot-90);
}
this.duplicateMovieClip(this._name+"shadow", _root.P+_root.level-500);
this.onUnload = function() {
eval(this._name+"shadow").removeMovieClip();
};
for (i=0; i<far; i += 2) {
nx = int((i)*Math.cos((way)*(Math.PI/180)));
ny = -(int((i)*Math.sin((way)*(Math.PI/180))));
eval(this._name+"shadow").beginFill(_root.frontColor, 10);
eval(this._name+"shadow").drawCircle((pt), nx, ny);
eval(+this._name+"shadow").endFill();
}
for (i=0; i<far; i += 2) {
nx = int((i)*Math.cos((way)*(Math.PI/180)));
ny = -(int((i)*Math.sin((way)*(Math.PI/180))));
c = new Color(this);
c.setRGB(_root.frontColor);
c.blendRGB(0xffffff, .2);
this.beginFill(c.getRGB(), 100);
this.drawCircle((pt/2), nx, ny);
this.endFill();
}
};
function cursorReflesh() {
this.createEmptyMovieClip("cursor", 100001);
c = new Color(this.cursor);
c.setRGB(_root.frontColor);
if (_root.frontColor>(0xffffff/2)) {
c.blendRGB(0x000000, -0.3);
} else {
c.blendRGB(0xffffff, -0.5);
}
this.cursor.lineStyle(1, 0xffffff, 100);
this.cursor.drawCircle(pt/2, 0, 0);
this.cursor.startDrag(true);
}
function undo() {
if (actionList.length>0) {
a = actionList.pop();
if (a.start == undefined) {
C = new Color(this.Background);
C.setRGB(a);
C2 = new Color(this.Panel.bubg);
C2.setRGB(a);
} else {
for (i=a.start; i<=a.end; i++) {
eval("P"+i).removeMovieClip();
}
_root.P = a.start;
}
}
}
cursorReflesh();
I hope you can help and thank you so much!

Getting Started Using Drawing Api To Draw A Barchart
There are a few things that I need for clarification purposes. This is my first time using the drawing api and I am not sure where everything goes. First of all let me give you a brief explanation of what I am trying to accomplish.

I want a barchart that starts at $30,000 and based on a calculation that is derived from my submit button I want the barchart to decrease by the amount that was calculated. Therefore, if the amount calculated is $10,000 then the barchart should decrease through animation from $30,000 to $20,000.

So, here are a few questions that I have:

1. Do I insert the drawing api actionscripting code in my 'Actions' layer or do I put it in my calculate button actionscript?

2. Is there a good resource for using the drawing api that demonstrates barcharts (website, books, etc...)?

3. Since I am using animation is there another element besides the drawing api that I need?

Basically, if someone can give me some keywords that I should research that is involved in doing this, that would be great.

Thanks in advance.

Drawing Board Thing
I found this tut http://www.kirupa.com/developer/acti...awingboard.htm
and wat i want to do is have thing like Flash and i need help.
I know how to make the lines thicker but i need when you click the button the lines turn thicker like the As changes any ideas.

Converting An .exe Flash File Back To Edible .fla File?
Does any one know if there are ways to convert an .exe flash file back to ediable .fla file?

How To Disable Auto Play For Imported Videos
So I realized two things:
1. Importing a video by selectiing "Embed video in SWF and lay in timeline" the video auto plays when I test the video. If I add a rewind button it works: [gotoAndPlay(1)]
2. Importing a video by selecting "Progressive download from a web server" I can disable the auto play, but I can not get the rewind button to work: [gotoAndPlay(1)]

Is there a way where I can disable a video from auto playing and also have a rewind button?

I use on(Release) for both actions.

Thanks! I'm new to this!!!

Drawing API - Making A Global Draw Box Function.
Hey everyone, I have here the code for a function that creates a box with curved corners and a fill. It works if the code is not within a function, but when I put it in a function and try to reference it globally, I get an error message saying that I can't use a "with" statement because there was no object. Any idea?


// The following code is on the main timeline. A movie clip on the main timeline houses a variable called movieClip. The variable holds the name of the movie clip in which it resides...so let's say i had a movie clip on the main timeline called "admin_login_bg". Within that movie clip I wanted to create a box. So I would call the global function...

createBox("admin_login_box", 0, 0, 300, 100, 10, 2, 0x000000, 100, 0xCCCCCC, false);

The global function below should create a movie clip within the movie clip that resides on the main timeline... _root.admin_login_bg.admin_login_box ...and within that movie clip create the box.

_global.createBox = function(clip_name, xloc, yloc, width, height, corner_bevel, l_thickness, l_colour, l_alpha, f_colour, drop_shadow) {
_root[movieClip].createEmptyMovieClip(""+clip_name+"", _root[movieClip].getNextHighestDepth());
_root[movieClip].clip_name._x = xloc;
_root[movieClip].clip_name._y = yloc;
with (_root[movieClip].clip_name) {
lineStyle(l_thickness, l_colour, l_alpha);
moveTo(corner_bevel, 0);
if (f_colour) {
beginFill(f_colour);
}
lineTo(width-corner_bevel, 0);
curveTo(width, 0, width, corner_bevel);
lineTo(width, height-corner_bevel);
curveTo(width, height, width-corner_bevel, height);
lineTo(corner_bevel, height);
curveTo(0, height, 0, height-corner_bevel);
lineTo(0, corner_bevel);
curveTo(0, 0, corner_bevel, 0);
if (f_colour) {
endFill();
}
}
};

How To Script: Save Drawing On Swf, Then Reload To Draw Again
i'm working on a class project that allows people to draw on a square, save it, display it for others to see, and then lets anyone to continue drawing on that square.

how do i script that? i need to use flash and AS2.0, and i'm trying to do some research on how to do this whole thing, and i'm hearing a lot of things: some say xml, some with php and mysql? whatever it is, i believe this has to be a server-side thing? i don't mind learning light scripting of other languages, but the primary scripting should be AS, since it's a flash class.

i'm not sure if this is true, but i think xml, php, and mysql are only text-based? for my project, i imagine that people would be saving an swf and then loading that swf and continue adding. is there a script in AS that generates an swf? maybe jpg is fine too. i just need to be able to save and load something that's image based and not text-based.

thanks ahead of time!

Drawing Board ,draw Straight Line
i heave learnt how to create a drawing board in flash mx 2004 for use to draw line from this thread http://www.kirupa.com/developer/acti...awingboard.htm
but i need some help here

Question1:ie. i draw 3 line means i am in step 3 , how can i undo to step 2 ?how to create actionscript for undo?

Question2: how to erase for example the line i drawn out in this drawing board during test scene or test movie?

Question3:how can i specify the range/area for the drawing board as i have no intention for it to cover full scale ?

In Regards To The "drawing Board: Draw In Mx: Tutorial
Original Tutorial Links: http://www.kirupa.com/developer/acti...awingboard.htm

Is it possible for me to add different colors for people to draw in by selecting; "clicking" on a button?

Is it also possible for me to add different line thickness' by selecting; "clicking" on a button?

[CS3] How To Script: Save Drawing On Swf, Then Reload To Draw Again
i'm working on a class project that allows people to draw on a square, save it, display it for others to see, and then lets anyone to continue drawing on that square.

how do i script that? i need to use flash and AS2.0, and i'm trying to do some research on how to do this whole thing, and i'm hearing a lot of things: some say xml, some with php and mysql? whatever it is, i believe this has to be a server-side thing? i don't mind learning light scripting of other languages, but the primary scripting should be AS, since it's a flash class.

i'm not sure if this is true, but i think xml, php, and mysql are only text-based? for my project, i imagine that people would be saving an swf and then loading that swf and continue adding. is there a script in AS that generates an swf? maybe jpg is fine too. i just need to be able to save and load something that's image based and not text-based.

thanks ahead of time!

Drawing Board ,draw Straight Line
i heave learnt how to create a drawing board in flash mx 2004 for use to draw line from this thread http://www.kirupa.com/developer/acti...awingboard.htm
but i need some help here

Question1:ie. i draw 3 line means i am in step 3 , how can i undo to step 2 ?how to create actionscript for undo?

Question2: how to erase for example the line i drawn out in this drawing board during test scene or test movie?

Question3:how can i specify the range/area for the drawing board as i have no intention for it to cover full scale ?

Auto Setting Smoothing To True For Imported Bitmaps?
Is there a way to auto set smoothing for all bitmaps in the library? or at least for imported bitmaps?

MS Paint-like Function With The Drawing API: Can't Draw More Than 1 Line At A Time
Hi everyone! I've been lurking around here for some time now, and so many of you have been very helpful (via answering other people's similar questions), so I'd like to start by saying thanks, since this is my first post.

Now, on to business!

What I'm trying to do is imitate the functionality of a primitive drawing program, such as MicroSoft Paint, which comes with the PC. Actually, just one small part of it, but it's the best analogy I can think of. (Eventually this will be part of a chemistry-education site, so it's actually a curved electron arrow I'm looking to draw, ultimately. At the rate I'm currently going, eventually will probably mean 3012 A.D.).

I want the user to be able to click and draw lines on the screen. There's an excellent tutorial on here (I believe) that helped me get to the point where the user can draw a line, but there's a problem. Because I've basically had to make it so the line is drawn, erased, and redrawn as the mouse moves, using the clear() method, the first line vanishes once the second line is drawn.

It goes sort of like this:
-user clicks initial spot on screen
-moveTo() that initial spot
-lineTo() wherever the mouse is now
-user moves the mouse
-using clear() draw-erase-redraw-erase-redraw-erase-redraw-etc.
-user releases the mouse
-clear() and moveTo() the initial spot, then lineTo() the spot where mouse released

Up to this point, there is no problem. However, according the help file and my own experience, clear() deletes everything drawn in this way at runtime. So my question is this: how the heck do I get the existing lines to stay put when the user is drawing the second line? None of the tutorials I've seen have gone past drawing a single line. Ack!
I have seen a Flash version of MS Paint (Actionscript Cookbook from O'Rielly press has it as one of their recipies, but there's so much else going on in the code, I can't seem to pull out what I need), so this must be possible, but I haven't been able to get it to work, even by trying to capture the first and second clicks as separate sets of variables.

Here's the code that I have gotten to work for a single line (it's actually a specific curved line I'm looking to draw, which is why the curveTo() points are so mathy. It doesn't matter if it's lineTo() or curveTo(), the basic premise is the same).

code: onMouseDown = function()
{
createEmptyMovieClip("Line", 1);
// get the x and y mouse positions
//and store them in variables
var xstart:Number = _xmouse
var ystart:Number = _ymouse
onMouseMove = function()
{
this.clear()
this.moveTo(xstart, ystart);
this.lineStyle(1,0x000000,100);
this.curveTo((_xmouse-((_xmouse-xstart)/4)),(_ymouse-((_xmouse-xstart)/3)),_xmouse, _ymouse)
}

onMouseUp = function()
{
this.clear()
this.moveTo(xstart, ystart);
this.lineStyle(1,0x000000,100);
this.curveTo((_xmouse-((_xmouse-xstart)/4)),(_ymouse-((_xmouse-xstart)/3)),_xmouse, _ymouse);
onMouseMove=null;
onMouseUp=null;
}}


Thanks to anyone taking the time to try and help me with this!

Drawing API - Draw Rectangle By Dragging Mouse On Canvas
I need to to incorporate a functionality where the user can use his mouse to draw a rectangle by dragging his mouse over the canvas - much like the Rectangle Drawing Tool in the Flash Authoring environment. The requirement is something like a rubberband tool where the user can define a portion of a map by drawing a rectangle over it. The coordinates needs to be captured. Can anyone help me with the actionscript.

Action Script 1.0 & 2.0 Drawing Board: Draw In MX Tutorial Help
I know the tutorial is simple all it involves is copying and pasting, applying it to an actual interactive page is where Im lost. Im new to actionscripting so bear with me if this is a simple task. I would like to have my viewers contact me by being able to draw on a notebook and a way to send it to my email. The code says _root.emptyMovieClip("line",1).
But where Im applying it to wouldn't be empty. What would I replace that code with?
And how do I get my users to send their actual note to me? Im in desperate need of help since this is due in a week. Thanks.

Drawing API - Draw Rectangle By Dragging Mouse On Canvas
I need to to incorporate a functionality where the user can use his mouse to draw a rectangle by dragging his mouse over the canvas - much like the Rectangle Drawing Tool in the Flash Authoring environment. The requirement is something like a rubberband tool where the user can define a portion of a map by drawing a rectangle over it. The coordinates needs to be captured. Can anyone help me with the actionscript.

How To Make A Save Button To The Drawing Made By The Draw...
How to make a save button to the drawing made by the drawing maker
can any one help me
please.

Flash File Where You Can Draw And Save?
hi,

i've found lots of flash movies on this site where the user can draw with a pen... but does anybody know how their drawing can be saved as a file?

i saw it on a website once, where you could draw, and then send it to someone as an e-greeting, so i imagine there is some way, because to do that, they had to save it.

i don't know if maybe there is some way to save it as a jpeg, or what... does anybody have any ideas?


even just if you know about some kind of command in actionscript for saving... that would help too.

thanks

heather

[MX04] Drawing On Imported Pictures
This is my first day using flash and I must say that it's loads of fun. I imported a png graphic into my animation and I want to use the paint tools on it but for whatever reason it won't let me. How would I go about doing this? Thanks a lot.

Help Controlling Main Flash File From Imported Flash File
i have a main flash file, and i have imported another swf into a movieclip in the main flash file. there is a stop in the main file and the imported swf plays. what i need to do is have the imported swf tell the main file when it is done playing. so in the last frame of the imported swf, i need it to go to a frame labeled "finish" in the main flash file.

any idea how to do this?

thank you.

Converting A File Too Use In Flash
Was wondering if anyone here can tell me how too convert a DEM file from Half-life into a movie so that i can make a flash intro too there site?

Converting Flash File To Gif?
Is there a way to export or convert a flash file to a picture file? Even if I go through fireworks? How would I get my flash animation imported into Fireworks???

Thanks,
vv

Flash Says File Size One Thing, Computer Says Another
I noticed that on my preloader that flash is saying that the file size of my swf is 311KB, but my computer is only listing it at 100KB. Has anyone ever heard of this before?

Just in case, here is the code for my preloader.

onClipEvent(load){
function loader(){
bLoaded = Math.round(_root.mcTopContainer.getBytesLoaded()/1024);
bTotal = Math.round(_root.mcTopContainer.getBytesTotal()/1024);
bPercent = Math.round((bLoaded/bTotal)*100);
if(bLoaded == bTotal){
clearInterval(preloader);
_root.gotoAndPlay("playMovie");
}else{
_root.mcPreloader.mcLoadBar._width = bPercent;
_root.mcPreloader.tInfo = bPercent + "% of " + bTotal + "KB";
}
}
preloader = setInterval(loader,50);
}


Thanks.

Website Navigation Flash File, Thing...
Hello there, ive been trying tirelessly with this problem and im wondering wether with your wisdom you can help at all... Now basically... what I want to happen...

<<Website Loads>>

A bar comes down from the home words on the Flash file and in the "main" frame for the website the home page is displayed...

You click... Members (for example)
The Home Bar fades away and sinks back... and the members bar emerges and stretches out...once it reaches the end the "members" page is loaded into the frame.

Now someone please tell me what im doing wrong... I have attached the .fla file, for MX 2004

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