RE: [Flashcoders] dynamically attached not smoothing using BitmapData?

2009-06-04 Thread Cor
Hi List,

I don't have a solution for this (I wish...), but a question.
I try to understand the the use of bitmaps.
If I understand correctly, it is used to edit pixels of a loaded image.
But if there is nothing to edit, what is the benefit of using Bitmap???
Or maybe I should ask: When use Bitmap and when not?

Kind regards
Cor

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of allandt
bik-elliott (thefieldcomic.com)
Sent: woensdag 3 juni 2009 12:19
To: Flash Coders List
Subject: [Flashcoders] dynamically attached not smoothing using BitmapData?

Hey guys

I'm having a problem with using smoothing on my loaded bitmap images with
AS3 and I was wondering if you could help, please?

Here is my code:
[code]
private function sendImageLoadEvent(e:Event):void
{
var nCurImg:Number = _arImageArray.length;

var bmp:Bitmap = e.target.content as Bitmap;
bmp.smoothing = true;

// create scale / offset
var bmp_xscale:Number = stage.stageWidth / bmp.width;
var bmp_yscale:Number = stage.stageHeight / bmp.height;
var bmp_scale:Number = Math.min(bmp_xscale, bmp_yscale);
var bmp_scaledWidth:Number = bmp.width * bmp_scale;
var bmp_scaledHeight:Number = bmp.height * bmp_scale;
var bmp_xshift:Number = (stage.stageWidth - bmp_scaledWidth)
/ 2;
var bmp_yshift:Number = (stage.stageHeight -
bmp_scaledHeight) / 2;

var bmpMatrix:Matrix = new Matrix(bmp_scale, 0, 0,
bmp_scale, bmp_xshift, bmp_yshift);

var bmpImage:BitmapData = new BitmapData(stage.stageWidth,
stage.stageHeight, false, 0x00);
bmpImage.draw(bmp, bmpMatrix, null, null, null, true);
bmp.bitmapData = bmpImage;
bmp.smoothing = true;

_arImageArray[nCurImg] = new Sprite();
_arImageArray[nCurImg].addChild(bmp);
_sprViewingArea.addChild(_arImageArray[nCurImg]);
}
[/code]

I saw on grant skinners blog that adding a bitmapData property to a Bitmap
object will remove the smoothing property so that is why I'm re-applying the
smoothing to see if that makes a difference

It seems like this is quite a buggy thing to do (based on the amount of
unresolved forum hits in google) but i'd like to see if there's a solution.

Could it be the size of the images (ie Is there a maximum size to scale from
/ to / by)? Anything you've learned could be helpful.

Thanks for your help in advance
Alz
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] removing dynamically created movie clips(HELP)

2009-06-04 Thread Glen Pike
Try iterating / looping through the main timeline (the old AS2 _root) 
clip.  I don't think you can rename that one.


I think if you are using timeline ActionScript and adding children to 
something, it is always the clip your code is in - so in this case, you 
are probably adding to the root clip.  You probably should not be able 
to add children to the stage directly ;)


HTH

Glen

Gustavo Duenas wrote:



Hi Glen, I did as you said and this is the result of the first 
part:clip is [object MainTimeline] name root1 how can I rename the 
object?True is I don't know how.

I tried using :

var newWindow:AboutUsWindow = new AboutUsWindow();
newWindow.name = newWindow;

but it returns nothing, I only have the phrase you have in the 
beginning of my email.


Regards,


Gustavo


























___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] help removing an display object created

2009-06-04 Thread Glen Pike

Hi,

   Sorry, I just replied to your other thread, but now I see your code...

   Try something like this...

   function removeClip(thenameoftheobject) {
  thenameoftheobject.parent.removeChild(thenameoftheobject);
   }

   Glen

Gustavo Duenas wrote:



I have several buttons which create some windows based on a movie clip 
that exports for actioncript.
Everything is ok, with the creation, but when it comes to close them ( 
I have a button in the window itself that

can remove the child), I will trying to do it using actionscript.

if (stage.contains(thenameoftheobject)){
stage.removeChild(thenameoftheobject)}

but so far it isn't working,
Flash is telling me that the display object is not there (course is 
not there until it is created by the button) so everyone knows how 
could I
remove the child from the same buttons without the warning that the 
buttons are not there.


here is my code for the windows. it will explain how I have those 
created.


function newClick(e:MouseEvent){
productsOff();
removerChild()

gotoAndPlay(75);
var newBack:Loader = new Loader();
newBack.load(new URLRequest(imgs/sombrero.jpg));
this.backMovie.addChild(newBack)

var myWindow:AboutUsWindow = new AboutUsWindow();

myWindow.name = e.currentTarget.name;
trace(myWindow.name);
myWindow.x=500.0;
myWindow.y=391.0;
var myText:URLLoader= new URLLoader();
myText.addEventListener(Event.COMPLETE, onLoaded);
function onLoaded(e:Event):void{
myWindow.textoWindow.text= e.target.data;
myScroll.scrollTarget=myWindow.textoWindow;
   
}

myText.load(new URLRequest(text/+ e.currentTarget.name+.txt));
var myScroll:UIScrollBar = new UIScrollBar();
myScroll.enabled=true;
myScroll.direction= VERTICAL;
myScroll.setSize(myWindow.textoWindow.width, 
myWindow.textoWindow.height);


myScroll.x=300;
myScroll.y=-33;
myScroll.height = myWindow.textoWindow.height;
myWindow.addChild(myScroll);
var myLoader:Loader = new Loader();
myLoader.load(new URLRequest(e.currentTarget.name+.swf));
myWindow.imgScreen.addChild(myLoader);
myWindow.botoncito.buttonMode=true;
myWindow.botoncito.addEventListener(MouseEvent.MOUSE_OVER, 
botoncitoOver);
myWindow.botoncito.addEventListener(MouseEvent.MOUSE_OUT, 
botoncitoOut);
myWindow.botoncito.addEventListener(MouseEvent.CLICK, 
botoncitoClick);


//new botoncitoBehaviour//


function botoncitoOver(e:MouseEvent):void{

e.currentTarget.gotoAndPlay(2);
   
}

function botoncitoOut(e:MouseEvent):void{
e.currentTarget.gotoAndStop(1);
}
function botoncitoClick(e:MouseEvent):void{
   
removeChild(e.currentTarget.parent);
   
}

addChild(myWindow);

}



Any help is appreciated.

Gus


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] help removing an display object created

2009-06-04 Thread Gustavo Duenas
Hi Glen, problem is that for each button it creates a different clip  
named newWindow.


I have them named and it works according to your last formula the  
name of each one is root1 + the name on the object
I 'm trying to make a code to see first which is the object that is  
already created like


function removeClip():void{

if (root1.displayObject.name ==contact){
removeChild(root1.contact);
}else if(root1.displayObject.name==aboutUs){
removeChild(root1.aboutUs);
}else if(root1.displayObject.name==support){
removeChild(root1.support);
}else if(root1.displayObject.name==process){
removeChild(root1.process);
}else if(root1.displayObject.name ==enviroment){
removeChild(root1.enviroment);
} else{ trace(everything clear);
}

That is exactly the structure of what I'm looking for.

Regards,

Gustavo

P.s: this is a wild guess I haven't tried yet.

On Jun 4, 2009, at 4:16 AM, Glen Pike wrote:


Hi,

   Sorry, I just replied to your other thread, but now I see your  
code...


   Try something like this...

   function removeClip(thenameoftheobject) {
  thenameoftheobject.parent.removeChild(thenameoftheobject);
   }

   Glen

Gustavo Duenas wrote:



I have several buttons which create some windows based on a movie  
clip that exports for actioncript.
Everything is ok, with the creation, but when it comes to close  
them ( I have a button in the window itself that

can remove the child), I will trying to do it using actionscript.

if (stage.contains(thenameoftheobject)){
stage.removeChild(thenameoftheobject)}

but so far it isn't working,
Flash is telling me that the display object is not there (course  
is not there until it is created by the button) so everyone knows  
how could I
remove the child from the same buttons without the warning that  
the buttons are not there.


here is my code for the windows. it will explain how I have those  
created.


function newClick(e:MouseEvent){
productsOff();
removerChild()

gotoAndPlay(75);
var newBack:Loader = new Loader();
newBack.load(new URLRequest(imgs/sombrero.jpg));
this.backMovie.addChild(newBack)
var myWindow:AboutUsWindow = new AboutUsWindow();
myWindow.name = e.currentTarget.name;
trace(myWindow.name);
myWindow.x=500.0;
myWindow.y=391.0;
var myText:URLLoader= new URLLoader();
myText.addEventListener(Event.COMPLETE, onLoaded);
function onLoaded(e:Event):void{
myWindow.textoWindow.text= e.target.data;
myScroll.scrollTarget=myWindow.textoWindow;
   }
myText.load(new URLRequest(text/+ e.currentTarget.name 
+.txt));

var myScroll:UIScrollBar = new UIScrollBar();
myScroll.enabled=true;
myScroll.direction= VERTICAL;
myScroll.setSize(myWindow.textoWindow.width,  
myWindow.textoWindow.height);


myScroll.x=300;
myScroll.y=-33;
myScroll.height = myWindow.textoWindow.height;
myWindow.addChild(myScroll);
var myLoader:Loader = new Loader();
myLoader.load(new URLRequest(e.currentTarget.name+.swf));
myWindow.imgScreen.addChild(myLoader);
myWindow.botoncito.buttonMode=true;
myWindow.botoncito.addEventListener(MouseEvent.MOUSE_OVER,  
botoncitoOver);
myWindow.botoncito.addEventListener(MouseEvent.MOUSE_OUT,  
botoncitoOut);
myWindow.botoncito.addEventListener(MouseEvent.CLICK,  
botoncitoClick);

//new botoncitoBehaviour//
function botoncitoOver(e:MouseEvent):void{
e.currentTarget.gotoAndPlay(2);
   }
function botoncitoOut(e:MouseEvent):void{
e.currentTarget.gotoAndStop(1);
}
function botoncitoClick(e:MouseEvent):void{
   removeChild(e.currentTarget.parent);
   }
addChild(myWindow);
}


Any help is appreciated.

Gus


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders






___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Runtime Align Panel package AS3

2009-06-04 Thread Ktu
Hey List,

I have created a fairly robust alignment tool I have dubbed VizAlign. This
package duplicates the align panel and more!

License: I was thinking of releasing under GPL.

Compiled code size - 5.8kb... for now

Features:
Straight Forward Human-like API
Ignores Nesting
Treat Multiple Objects As Groups
Works In Full Screen Mode
Use As Many Targets As You Need
Use As Many Alignment Methods You Need In One Method Call
25 Different Alignment Methods
Easily Add New Alignment Methods
TruePixel Option For Even Pixel Results
Choose To Apply Results Immediately
Or Just Get Return Values For Animating
70% Documented Using ASDoc

This is an example of the kind of stuff you can do with the VizAlign class.
Capabilities.html cannot handle grouping options.
http://www.cataclysmicrewind.com/viz...abilities.htmlhttp://www.cataclysmicrewind.com/vizalign/examples/capabilities.html
http://www.cataclysmicrewind.com/viz...les/groups.swfhttp://www.cataclysmicrewind.com/vizalign/examples/groups.swf

Method Descriptions:
http://www.cataclysmicrewind.com/vizalign/examples/MethodDescriptions.html

View current documentation here:
http://www.cataclysmicrewind.com/vizalign/docs


Question: I have ideas for more functionality but am not sure if they are
worth it. Are you interested in this type of tool being released and
maintained? I see much potential for this package. Do you?

If enough people are interested then I will consider adding functionality
and reducing file size.

Ktu
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Unwanted Irregular Angles with Graphics.lineTo

2009-06-04 Thread John Giotta
This is probably a well known issue, but I'm probably out of the loop.

I'm drawing a rather small shape with the draw API, but I'm getting
odd pixel points.
My shape:
(4, 0), (0, 4), (0, 11), (8, 11), (8, 4), (4,0)

Its basically a square with a steeple top. When drawn, the line from
8, 4 to 4,0 actually looks like it starts from 7, 3 giving me a offset
in my angle.

Anyone know why this is?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS 2.0 and JAX-WS

2009-06-04 Thread Ktu
Have you used the WebService panel that is built into the Flash IDE. I would
assume that if you can view the wsdl in the web service panel in the ide
that you can use it in code...


Ktu

On Mon, Jun 1, 2009 at 4:59 PM, Rodney Green green.rod...@gmail.com wrote:

 When trying to load the wsdl for a web service created with jax-ws, I get
 an
 undefined in the xsd path.  Is Flash able to load this?  I read something
 about Flash not being able to load external xsd files.  Is this the case?
 What can I do to read the wsdl properly?  I'm using CS3 ans AS 2 - does CS4
 have any updated web service (AS 2) capabilities?

 Thanks in advance.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Server-side image export from swf

2009-06-04 Thread Ktu
You should check out AlivePDF

http://alivepdf.bytearray.org/

Ktu

On Tue, May 26, 2009 at 10:40 AM, Dan Farrow d...@squarebracket.net wrote:

 Hi all,
 I'm building an online tool to let my client create diagrams and then
 download them as print resolution images or pdf. I wondered if anyone had
 suggestions for ways to achieve this on the server.

 Some brief googling suggests that converting the image to an array of
 pixels
 and passing them to the server is the way to go, but as the images need to
 be high-res I'm wondering if there might be a quicker solution using svg
 export or similar?

 Thanks in advance for any help
 Dan
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Unwanted Irregular Angles with Graphics.lineTo

2009-06-04 Thread Anthony Pace

//using your co-ordinates, this works fine, with no weirdness that I can see

   this.graphics.lineStyle(1,0x33,1,true,'none');
   this.graphics.moveTo(4,0);
   // no need for this.graphics.lineTo(4,0); because you are 
already there

   this.graphics.lineTo(0,4);
   this.graphics.lineTo(0,11);
   this.graphics.lineTo(8,11);
   this.graphics.lineTo(8,4);
   this.graphics.lineTo(4,0);

John Giotta wrote:

This is probably a well known issue, but I'm probably out of the loop.

I'm drawing a rather small shape with the draw API, but I'm getting
odd pixel points.
My shape:
(4, 0), (0, 4), (0, 11), (8, 11), (8, 4), (4,0)

Its basically a square with a steeple top. When drawn, the line from
8, 4 to 4,0 actually looks like it starts from 7, 3 giving me a offset
in my angle.

Anyone know why this is?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

  

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders