[Flashcoders] How can I set stage dimensions ? (AS3)

2008-06-05 Thread Ali Drongo
Hiya, I can't understand why the dimensions I've set in my app class  
aren't being implemented. If someone could have a look at my code and  
show me the error of my ways I'd be very happy :)

Cheers,
Ali

/

package {
import flash.events.*;
import flash.display.Sprite;
import flash.display.Shape;
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.IOErrorEvent;
import com.adobe.serialization.json.JSON;
import flash.display.StageScaleMode;
[SWF( backgroundColor='0xE3FF12', frameRate='30', width='100',  
height='100')]


public class MyApp extends Sprite {

private var loader:URLLoader;
private var request:URLRequest;
private var objCount:Number;
public function MyApp()
{
super();
		trace(- - - stagewidth:+stage.stageWidth+   
height:+stage.stageHeight);

//tracing as stagewidth:820  height:808  ?
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How can I set stage dimensions ? (AS3)

2008-06-05 Thread Rich Shupe
You didn't specify if this was for Flash or Flex. If it's Flash, metadata
isn't supported. If it's for Flex, it looks correct to me:
 I don't know enough about Flex to offer a suggestion. You might try the
FlexCoders list?



Rich
http://www.LearningActionScript3.com


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


Re: [Flashcoders] How can I set stage dimensions ? (AS3)

2008-06-05 Thread Rich Shupe
Sorry, that previous post was sent prematurely:

You didn't specify if this was for Flash or Flex. If it's Flash, metadata
isn't supported. If it's for Flex, it looks correct to me:

http://www.morearty.com/blog/2006/06/27/setting-the-width-and-height-of-a-pu
re-actionscript-application/

I don't know enough about Flex to offer a suggestion. You might try the
FlexCoders list?

The only thing I can think of as a wild guess is that maybe you want to
trace after the constructor has finished, or after a stage resize event?
However, you can probably see with the naked eye that your stage size is not
100 x 100.

Rich
http://www.LearningActionScript3.com


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


Re: [Flashcoders] AS3 - A simple questions

2008-06-05 Thread EECOLOR
I would recommend using event.currentTarget instead of event.target at all
times.

the event.currentTarget property contains a reference to the instance at
which you registered the event listener. event.target refers to the class
that dispatches the event.

In this case there is no difference between .target and .currentTarget, but
in future cases you might encounter problems. The cases where you would use
event.target are so rare that I would urge everyone to allways use
event.currentTarget.


Greetz Erik


On 6/3/08, Rich Shupe [EMAIL PROTECTED] wrote:

 for (var i:int = 0; i  3; i++) {
 var txtFld:TextField = new TextField();
 txtFld.name = TextField + i;
 txtFld.border = true;
 txtFld.x = i*120;
 addChild(txtFld);
 txtFld.addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
 }

 function onClick(evt:Event):void {
 trace(Hi I'm, evt.target.name);
 }



 Rich
 http://www.LearningActionScript3.com



 ___
 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] AS3 - A simple questions

2008-06-05 Thread Viktor Hesselbom

I use event.target in the current application I'm developing.

It's nice in MouseEvents for determing what is currently under the mouse  
and not what dispatches the event.


On Thu, 05 Jun 2008 14:17:43 +0200, EECOLOR [EMAIL PROTECTED] wrote:

I would recommend using event.currentTarget instead of event.target at  
all

times.

the event.currentTarget property contains a reference to the instance at
which you registered the event listener. event.target refers to the class
that dispatches the event.

In this case there is no difference between .target and .currentTarget,  
but
in future cases you might encounter problems. The cases where you would  
use

event.target are so rare that I would urge everyone to allways use
event.currentTarget.


Greetz Erik


On 6/3/08, Rich Shupe [EMAIL PROTECTED] wrote:


for (var i:int = 0; i  3; i++) {
var txtFld:TextField = new TextField();
txtFld.name = TextField + i;
txtFld.border = true;
txtFld.x = i*120;
addChild(txtFld);
txtFld.addEventListener(MouseEvent.CLICK, onClick, false, 0, true);
}

function onClick(evt:Event):void {
trace(Hi I'm, evt.target.name);
}



Rich
http://www.LearningActionScript3.com



___
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




--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

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


[Flashcoders] Creating a list from actionscript cue points in Flash video

2008-06-05 Thread Paul Jinks
I'm something of a noob, so bear with me here. I think this is pretty
straightforward, but I'm stuck.

I have a 'talking head' flv with actionscript cue points whose names I
want to appear in a textfield named mainText to act as a summary of what's
being said, a bit like powerpoint. Thus:

mainText.wordWrap = true;
var vidList:Object = new Object();
vidList.cuePoint = function(cues) {
if (cues.info.type == actionscript) {
var texthtml = cues.info.name;
mainText.htmlText = secondText.htmlText+texthtml;
}
};
vid.addEventListener(cuePoint, vidList);

So far so good, except that I get a continuous stream of text, not the
nice list I yearn for. Every time I try to format mainText.htmlText I get
an error. I've tried

mainText.htmlText = mainText.htmlText+'br'+texthtml;
and variations on this on without success.

Thanks in advance for your help.

Paul

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


[Flashcoders] flex 3 Event.RESIZE

2008-06-05 Thread Patrick J. Jankun

Hello Everyone,

This is something probably very stupid, but i have an basic problem  
with my AS code:
i got an event Listener added to stage instance in the main class  
function/constructor


stage.addEventListener(Event.RESIZE, initialise);


problem is, this event never gets fired, and i simply can't find out  
why :(, i scale the stage
in the browser env, the event is being ignored. I tried Event.INIT and  
others, they seems

to work, but not this one, can someone tell me what the heck do i wrong?

P.
--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org

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


Re: [Flashcoders] Creating a list from actionscript cue points in Flash video

2008-06-05 Thread Paul Jinks
Aaaargh! There's a typo in my code there. It should read

   mainText.htmlText = mainText.htmlText+texthtml;


I had a stray text field called secondText in there previously. This
isn't/wasn't the source of the problem. Many apologies.

Paul

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


Re: [Flashcoders] flex 3 Event.RESIZE

2008-06-05 Thread Sidney de Koning

Hi Patrick,

How is your Flash set in your HTML? in pixels or in percent?

GReets,

Sid

On Jun 5, 2008, at 4:04 PM, Patrick J. Jankun wrote:


Hello Everyone,

This is something probably very stupid, but i have an basic problem  
with my AS code:
i got an event Listener added to stage instance in the main class  
function/constructor


stage.addEventListener(Event.RESIZE, initialise);


problem is, this event never gets fired, and i simply can't find out  
why :(, i scale the stage
in the browser env, the event is being ignored. I tried Event.INIT  
and others, they seems
to work, but not this one, can someone tell me what the heck do i  
wrong?


P.
--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org

___
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] flex 3 Event.RESIZE

2008-06-05 Thread Romuald Quantin
This event is the right one, maybe because the stage == null when you add
the listener?

If it helps, I wrote classes to handle liquid UI based on this event:
http://www.soundstep.com/blog/downloads/baseui/

Even if you don't use it, you can probably check the code and find
something.

You might need to check the html, if your movie is not resized with the
browser, the event won't fire.

Romu



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Patrick J.
Jankun
Sent: 05 June 2008 15:04
To: Flashcoder Mailinglist
Subject: [Flashcoders] flex 3 Event.RESIZE

Hello Everyone,

This is something probably very stupid, but i have an basic problem  
with my AS code:
i got an event Listener added to stage instance in the main class  
function/constructor

stage.addEventListener(Event.RESIZE, initialise);


problem is, this event never gets fired, and i simply can't find out  
why :(, i scale the stage
in the browser env, the event is being ignored. I tried Event.INIT and  
others, they seems
to work, but not this one, can someone tell me what the heck do i wrong?

P.
--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org

___
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] flex 3 Event.RESIZE

2008-06-05 Thread Romuald Quantin
Sorry didn't see it was flex.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Patrick J.
Jankun
Sent: 05 June 2008 15:04
To: Flashcoder Mailinglist
Subject: [Flashcoders] flex 3 Event.RESIZE

Hello Everyone,

This is something probably very stupid, but i have an basic problem  
with my AS code:
i got an event Listener added to stage instance in the main class  
function/constructor

stage.addEventListener(Event.RESIZE, initialise);


problem is, this event never gets fired, and i simply can't find out  
why :(, i scale the stage
in the browser env, the event is being ignored. I tried Event.INIT and  
others, they seems
to work, but not this one, can someone tell me what the heck do i wrong?

P.
--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org

___
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] flex 3 Event.RESIZE

2008-06-05 Thread Patrick J. Jankun
Sidney: i didnt even checked it out, cause the event don't fire in   
the stand alone player

as well, i mean, what the f*k am i doing wrong here?

im trying to use flex 3 only for this project, and not flash ide,  
honestly i don't know even

how to change the .html wrappers settings inside flex

:(

P.

On Jun 5, 2008, at 4:14 PM, Sidney de Koning wrote:


Hi Patrick,

How is your Flash set in your HTML? in pixels or in percent?

GReets,

Sid

On Jun 5, 2008, at 4:04 PM, Patrick J. Jankun wrote:


Hello Everyone,

This is something probably very stupid, but i have an basic problem  
with my AS code:
i got an event Listener added to stage instance in the main class  
function/constructor


stage.addEventListener(Event.RESIZE, initialise);


problem is, this event never gets fired, and i simply can't find  
out why :(, i scale the stage
in the browser env, the event is being ignored. I tried Event.INIT  
and others, they seems
to work, but not this one, can someone tell me what the heck do i  
wrong?


P.
--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org

___
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


--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org

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


Re: [Flashcoders] flex 3 Event.RESIZE

2008-06-05 Thread Patrick J. Jankun
already done this, before even adding that listener, this is the whole  
code i want to get working:


public function PbMain() : void
{
StageAlign.TOP_LEFT;
StageQuality.HIGH;
StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, initialise);
}

private function initialise() : void
{   
trace( Initialised );
stage.removeEventListener(Event.RESIZE, initialise );
init();
}

On Jun 5, 2008, at 4:37 PM, Eduardo Omine wrote:


I think you must set stage.scaleMode = StageScaleMode.NO_SCALE.

--
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org

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


Re: [Flashcoders] Creating a list from actionscript cue points in Flash video

2008-06-05 Thread Paul Jinks
Fixed it. I think all I had to do was set mainText.multiline = true;

Cheers

Paul



On Thu, June 5, 2008 3:05 pm, Paul Jinks wrote:
 Aaaargh! There's a typo in my code there. It should read

  mainText.htmlText = mainText.htmlText+texthtml;


 I had a stray text field called secondText in there previously. This
 isn't/wasn't the source of the problem. Many apologies.

 Paul

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



-- 

Check out my website: http://www.pauljinks.co.uk :o)


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


Re: [Flashcoders] flex 3 Event.RESIZE

2008-06-05 Thread Viktor Hesselbom

Is that your actual code?

Because if it is, I think I see the problem.

You can't just write a reference to the constants. You have to actually  
use them to set the stage's align, quality etc.


public function PbMain() : void
{
stage.align = StageAlign.TOP_LEFT;
stage.quality = StageQuality.HIGH;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, initialise);
}

Also, as've been said, be sure stage is accessible.

/ Viktor H

On Thu, 05 Jun 2008 17:16:43 +0200, Patrick J. Jankun [EMAIL PROTECTED] wrote:

already done this, before even adding that listener, this is the whole  
code i want to get working:


public function PbMain() : void
{
StageAlign.TOP_LEFT;
StageQuality.HIGH;
StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, initialise);
}

private function initialise() : void
{   
trace( Initialised );
stage.removeEventListener(Event.RESIZE, initialise );
init();
}

On Jun 5, 2008, at 4:37 PM, Eduardo Omine wrote:


I think you must set stage.scaleMode = StageScaleMode.NO_SCALE.

--Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org

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




--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

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


Re: [Flashcoders] Creating a list from actionscript cue points in Flash video

2008-06-05 Thread Viktor Hesselbom

Congratulations on fixing it. ;)

/ Viktor H

On Thu, 05 Jun 2008 18:08:46 +0200, Paul Jinks [EMAIL PROTECTED]  
wrote:



Fixed it. I think all I had to do was set mainText.multiline = true;

Cheers

Paul



On Thu, June 5, 2008 3:05 pm, Paul Jinks wrote:

Aaaargh! There's a typo in my code there. It should read


mainText.htmlText = mainText.htmlText+texthtml;



I had a stray text field called secondText in there previously. This
isn't/wasn't the source of the problem. Many apologies.

Paul

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








--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

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


Re: [Flashcoders] flash animations Slow on IE7

2008-06-05 Thread Derek Nugent
I wonder how many  it's because IE 7 is poo  replies you'll get 

I guess this could be the first!

That is odd :(

 Best regards
Derek Nugent


email: [EMAIL PROTECTED]
[EMAIL PROTECTED]
web:   http://www.dereknugent.com


- Original Message 
From: maurice sallave [EMAIL PROTECTED]
To: Flashcoders@chattyfig.figleaf.com
Sent: Thursday, June 5, 2008 2:00:44 PM
Subject: [Flashcoders] flash animations Slow on IE7

Sorry if this has been asked before, but is there a reason why my animations
are running slow on IE7?  I'm currently developing on a PC running player 9
and all the other browsers, FF and even Safari, are running fine.  Thanks
for any help.
___
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] flex 3 Event.RESIZE

2008-06-05 Thread Patrick J. Jankun

Viktor,

you were completly right, i have actually fully overseen that  
mistake :-/
after correcting that mistakes everything seems to work. Thank you for  
pointing it out!


P.
On Jun 5, 2008, at 7:10 PM, Viktor Hesselbom wrote:


Is that your actual code?

Because if it is, I think I see the problem.

You can't just write a reference to the constants. You have to  
actually use them to set the stage's align, quality etc.


public function PbMain() : void
{
stage.align = StageAlign.TOP_LEFT;
stage.quality = StageQuality.HIGH;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, initialise);
}

Also, as've been said, be sure stage is accessible.

/ Viktor H

On Thu, 05 Jun 2008 17:16:43 +0200, Patrick J. Jankun [EMAIL PROTECTED]  
wrote:


already done this, before even adding that listener, this is the  
whole code i want to get working:


public function PbMain() : void
{
StageAlign.TOP_LEFT;
StageQuality.HIGH;
StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, initialise);
}

private function initialise() : void
{   
trace( Initialised );
stage.removeEventListener(Event.RESIZE, initialise );
init();
}

On Jun 5, 2008, at 4:37 PM, Eduardo Omine wrote:


I think you must set stage.scaleMode = StageScaleMode.NO_SCALE.

--Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org

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




--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

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


--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org

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