Re: [Flashcoders] first help for as3

2007-06-15 Thread Juan Carlos Anorga
if you don't want the swf to take up the whole page in the browser,  
you'll need to edit the html. As for setting the scaleMode you can  
set it like this:


stage.scaleMode = StageScaleMode.NO_SCALE;

- juan

On Jun 15, 2007, at 12:09 PM, Gustavo Duenas wrote:

Hi Juan thanks I did it, and I was wondering how can I set up the  
size of the stage, I';ve tried stage.scaleMode();
with no results, any ideas, because this flex thing makes resizable  
all time and I'd like to have the way i like  in the size I want.


Regards


gustavo

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] first help for as3

2007-06-15 Thread Juan Carlos Anorga
You have to wait for your image to load before you can change the  
width and height. your Loader instance has a contentLoaderInfo  
property that is an instance of the LoaderInfo class. The LoaderInfo  
instance will dispatch the Event.INIT event when your Loader instance  
is ready to be manipulated. You can listener for the event like this:


backLoader.contentLoaderInfo.addEventListener(Event.INIT, resizeImage);

and then you would have to add a new method to your class called  
resizeImage (or whatever you want to call it as long as it matches  
the name in the addEventListener argument):


public function resizeImage():void {
backLoader.width = 100; // or whatever your new width is
backLoader.height = 100; // or whatever your new height is
}

- juan

On Jun 15, 2007, at 10:46 AM, Gustavo Duenas wrote:

Thanks Juan, look I changed as you told me but it seems that the  
image is huge as it should be, how ca I resize it, I've tried  
using .width and heightr but then nothing...some ideas, this is the  
new code:


package {
import flash.display.Sprite;
import flash.display.*;
import flash.events.*;
import flash.accessibility.*;
import com.adobe.viewsource.ViewSource;
import flash.net.*;
import flash.geom.*;
import flash.text.*;
import flash.net.URLRequest;
import flash.net.*;




public class template1 extends Sprite
{
public function template1()
{
//inserting movieClip as background;
var backLoader:Loader = new Loader();
			backLoader.load(new URLRequest("http://leftandrightsolutions.com/ 
backy1.jpg"));


backLoader.x=-200;
backLoader.y=0;

addChild(backLoader);


}


}
}
}


regards


gustavo



On Jun 15, 2007, at 12:54 PM, Juan Carlos Anorga wrote:


Hi Gustavo,

the load method takes a URLRequest instance, not a String. So change:

backLoader.load("http://leftandrightsolutions.com/backy1.jpg";);

to:

backLoader.load(new URLRequest("http://leftandrightsolutions.com/ 
backy1.jpg"));


- juan

On Jun 15, 2007, at 9:34 AM, Gustavo Duenas wrote:

Ok coder this is my first flash as3 project in flex, I'm just  
trying to do something simple.

But I have an 1067 error that says:


1067: Implicit coercion of a value of type String to an unrelated  
type flash.net:URLRequest.	template1	template1.as	line 22	




package {
import flash.display.Sprite;
import flash.display.*;
import flash.events.*;
import flash.accessibility.*;
import com.adobe.viewsource.ViewSource;
import flash.net.*;
import flash.geom.*;
import flash.text.*;
import flash.net.URLRequest;
import flash.net.*;




public class template1 extends Sprite
{
public function template1()
{
//inserting image as background;
var backLoader:Loader = new Loader();

backLoader.load("http://leftandrightsolutions.com/backy1.jpg";);
addChild(backLoader);

}
}
}


I have to admit I'm the newbiest in this as3 project thinghelp.


Gustavo Duenas
Creative Director
LEFT AND RIGHT SOLUTIONS LLC
1225 W. Beaver St. Suite 119
Jacksonville, Fl.  32204
904 . 2650330
www.leftandrightsolutions.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



Gustavo Duenas
Creative Director
LEFT AND RIGHT SOLUTIONS LLC
1225 W. Beaver St. Suite 119
Jacksonville, Fl.  32204
904 . 2650330
www.leftandrightsolutions.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


_

Re: [Flashcoders] first help for as3

2007-06-15 Thread Juan Carlos Anorga

Hi Gustavo,

the load method takes a URLRequest instance, not a String. So change:

backLoader.load("http://leftandrightsolutions.com/backy1.jpg";);

to:

backLoader.load(new URLRequest("http://leftandrightsolutions.com/ 
backy1.jpg"));


- juan

On Jun 15, 2007, at 9:34 AM, Gustavo Duenas wrote:

Ok coder this is my first flash as3 project in flex, I'm just  
trying to do something simple.

But I have an 1067 error that says:


1067: Implicit coercion of a value of type String to an unrelated  
type flash.net:URLRequest.	template1	template1.as	line 22	




package {
import flash.display.Sprite;
import flash.display.*;
import flash.events.*;
import flash.accessibility.*;
import com.adobe.viewsource.ViewSource;
import flash.net.*;
import flash.geom.*;
import flash.text.*;
import flash.net.URLRequest;
import flash.net.*;




public class template1 extends Sprite
{
public function template1()
{
//inserting image as background;
var backLoader:Loader = new Loader();

backLoader.load("http://leftandrightsolutions.com/backy1.jpg";);
addChild(backLoader);

}
}
}


I have to admit I'm the newbiest in this as3 project thinghelp.


Gustavo Duenas
Creative Director
LEFT AND RIGHT SOLUTIONS LLC
1225 W. Beaver St. Suite 119
Jacksonville, Fl.  32204
904 . 2650330
www.leftandrightsolutions.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] regular expressions in Flash8?

2007-05-18 Thread Juan Carlos Anorga
well... you can't really use regular expressions in flash8 unless you  
let javascript in the browser do it for you. I don't think you need  
regexp to solve your problem though. I think you could just do this:


var txt:String = "test/descr 
can we now use regularexpressions in Flash8 to manipulate strings?

I need to replace all instances of "/descr" with "actionscript..
   but.. some instances of "want to change those if possible. thanks for any insights.


-Boyd
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Dynamic E4X

2007-05-16 Thread Juan Carlos Anorga

check out the docs for the descendants method in the XML class.



you should be able to do this:

var node:String = "zip";
employees.descendants(node);

- juan

On May 16, 2007, at 4:57 PM, Chris Hill wrote:


The as3 examples for XML show the following:
var node:String = "zip";
trace(employees.employee[0].address[node]); // 98765

What I'd like to do is something like this:
var node:String = "zip";
trace(employees..[node]); // 98765

ie: Find all nodes that are called 'zip' in the document, but do it  
dynamically.


any ideas?
C
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Duplicating a movieclip/sprite in AS3

2007-04-28 Thread Juan Carlos Anorga
if you use URLLoader[1] to load in your avm1 swfs then you can save  
the data as a byte array which you would be able to load into a Loader 
[2] display object with loadBytes. Everytime you want a duplicate it  
just create another Loader object and load the byte array in.


- juan

[1] 


[2] 


On Apr 28, 2007, at 8:39 AM, ben gomez farrell wrote:

Thanks!  I can't make my sprite into a bitmap, cause it needs to  
scale big or small after duplication.  Even if it wasn't the alpha  
preview and I was just making simple graphic assets in Flash 8 to  
use in Flash player 9, isn't there some way to duplicate a loaded  
AVM1Movie?

thanks!
ben

Muzak wrote:

Personally I wouldn't try mixing the Alpha Preview with Flex.
It's not feature complete and certain things will be quite  
different in FCS3.


For instance there's the "Flex Component Kit for FCS3" that makes  
Flex/Flash integration ALOT easier:

http://labs.adobe.com/wiki/index.php/Flex_Component_Kit_for_Flash_CS3

AFAIK, there's no easy way to make copies of loaded swf's.
If they're nothing more than simple graphics, I'd say the easiest  
way to make copies is to use the BitmapData class.


Here's an example (using mxml), where I'm loading a Flash 8 swf  
containing a simple graphic (bitmap) on stage.
The swf is loaded into an Image component. Once loaded, the Image  
content (AVM1Movie) is copied.
Then the new BitmapData is set as the source of another Image  
component.


You should be able to do the same in AS3 with the Loader class  
instead of an Image component.



http://www.adobe.com/2006/mxml";  
layout="absolute">


 
  
 

 
  complete="swfCompleteHandler(event)" />

  
 



regards,
Muzak

- Original Message - From: "ben gomez farrell"  
<[EMAIL PROTECTED]>

To: "Flashcoders mailing list" 
Sent: Friday, April 27, 2007 9:32 PM
Subject: [Flashcoders] Duplicating a movieclip/sprite in AS3




Hey everyone,
I can't seem to figure out how to duplicate a sprite in AS3.   
Thanks to various tutorials online, I got so far as to take the
constructor of the sprite I want to duplicate and instantiate a  
new one.


   var targetClass:Class = (stamp as Object).constructor;
   mStamp = new targetClass() as Sprite;

This works in normal situations.  However, the sprite I'm getting  
are SWF's loaded at runtime.  If I trace a normal asset's
constructor it will trace as [Object myasset], but no matter what  
I do, my externally loaded SWF's constructors all trace as

[Object MovieClip] or [Object AVM1Movie].
So of course creating a new instance of the constructor will  
result in a blank, fresh-made movieclip.
Basically my external SWFs are just some graphics on stage in one  
frame.  I've tried setting the document class, and publishing as
Flash 8, 9, Actionscript 2, Actionscript 3, and nothing changes.   
I'm not using Flash CS3 yet, just the AS3 Alpha for making

assets and then compiling with Flex 2 SDK.

Anyone?
Thanks!
ben





___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] AS 3.0 - dynamically create object from library class

2006-11-06 Thread Juan Carlos Anorga
I think you are looking for getDefinitionByName(name:String) in the  
flash.utils package.


- juan

On Nov 6, 2006, at 3:15 PM, Dave Geurts wrote:



  I am trying to dynamical "attach" or create new objects from  
Classes that are linked in the library.  In the library I did the  
linkage properties and it is using the "Auto Generated Class"  
feature.  Before AS 3 days I would use attach and eval to get this  
working.  any ideas?



Working Code:
  var questionObj:MovieClip = new set1_1();
  inventoryPanel.addChild(questionObj);



Dynamic Code does not work on creating a new class from the library
  var questionObj:MovieClip = new ["set"+1+"_"+1]();
  inventoryPanel.addChild(questionObj);

returns-
TypeError: Error #1007: Instantiation attempted on a non-constructor


THANKS -Dave Geurts
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Mac IDE for AS !

2006-07-25 Thread Juan Carlos Anorga

I use TextMate 

- Juan

On Jul 25, 2006, at 1:28 AM, Dan Course wrote:

What Program do you all develop you AS classes... I'm stumped on a  
Mac!


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com