[Flashcoders] Using FlexBuilder3 profiler with FlashCS3

2008-04-25 Thread Martin Tremblay

Hello,

Is there a way to use the Flexbuilder3 profiler with a FlashCS3 file? I
just want to take a swf and run it through the profiler. Is it possible?

Martin t.
LVL 


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


[Flashcoders] Re: E4X Non sense !!! Need help | Thank Kenneth

2008-02-18 Thread Martin Tremblay

Thanks Kenneth

This was exactly what I was looking for.
//trace(xmlData2.accesscode.(shortcut.text()[0] == S000));

 
Martin T
LVL


///
Date: Fri, 15 Feb 2008 16:57:13 -0500
From: Martin Tremblay [EMAIL PROTECTED]
Subject: [Flashcoders] E4X Non sense !!! Need help
To: flashcoders@chattyfig.figleaf.com
Message-ID:

[EMAIL PROTECTED]
Content-Type: text/plain;   charset=us-ascii


EX4 cannot find a node using E4X when one of it's sibling has the same
name.

Is there a way to avoid this problem ?


var xmlData:XML = 
root
 
 accesscode id=S001
   shortcutS001/shortcut
   shortcutsmallbusiness/shortcut
 /accesscode
 
 accesscode id=S000
   shortcutS000/shortcut
   shortcut2S000/shortcut2
 /accesscode

/root;


trace(xmlData.accesscode.(@id == S000));
trace(-);
trace(xmlData.accesscode.(shortcut == S000));
trace(-);

trace(xmlData.accesscode.(@id == S001));
trace(-);
trace(xmlData.accesscode.(shortcut == S001));
trace(-);



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


[Flashcoders] E4X Non sense !!! Need help

2008-02-15 Thread Martin Tremblay

EX4 cannot find a node using E4X when one of it's sibling has the same
name.

Is there a way to avoid this problem ?


var xmlData:XML = 
root
 
 accesscode id=S001
   shortcutS001/shortcut
   shortcutsmallbusiness/shortcut
 /accesscode
 
 accesscode id=S000
   shortcutS000/shortcut
   shortcut2S000/shortcut2
 /accesscode

/root;


trace(xmlData.accesscode.(@id == S000));
trace(-);
trace(xmlData.accesscode.(shortcut == S000));
trace(-);

trace(xmlData.accesscode.(@id == S001));
trace(-);
trace(xmlData.accesscode.(shortcut == S001));
trace(-);

Martin T.
LVL



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


[Flashcoders] AS3 receiving mouse event on overlap sibling sprite

2008-02-05 Thread Martin Tremblay

Hi,

Trying to have two sibling sprite that overlap receive mouse
event in the section that overlap. Is that possible?

code:

package
{
import flash.display.*
import flash.events.*;

public class MouseEventTwoMC extends MovieClip
{
public function MouseEventTwoMC ()
{
var sp1:Sprite = createCircle(100, 100);
var sp2:Sprite = createCircle(150, 100);

addChild(sp1);
addChild(sp2);  
}


public function createCircle (_nX:Number,
_nY:Number):Sprite
{
var spriteCircle:Sprite = new Sprite();
spriteCircle.addEventListener
(MouseEvent.ROLL_OVER, onROver);
spriteCircle.addEventListener
(MouseEvent.ROLL_OUT, onROut);
spriteCircle.x = _nX;
spriteCircle.y = _nY;

spriteCircle.graphics.lineStyle(2, 0x22, 1);
spriteCircle.graphics.beginFill(0x3CC4C4, 1);
spriteCircle.graphics.drawCircle(0,0, 75);
spriteCircle.graphics.endFill();

spriteCircle.alpha = 0.3;

return spriteCircle;
}


public function onROver (_event:MouseEvent):void
{

_event.target.alpha = 0.1;
}

public function onROut (_event:MouseEvent):void
{
_event.target.alpha = 0.3;

}

}
}

Martin T.
LVL


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


[Flashcoders] Loaded file is an unknown type ??

2007-09-10 Thread Martin Tremblay
In AS3, using the Loader Class, I get this error.

Error #2044: Unhandled IOErrorEvent:. text=Error #2124: Loaded file is
an unknown type.

Here's a description of the problem:
1)I load multiple file and once.

2)Only some of them don't load and not always the same one.(Sometime
a.swf load and not b.swf and without doing any modification to the code,
b.swf would load but not a.swf)

3)In a browser on the web, the problem is WORST (more swf not loading)
when I refresh the page.

4)If I load directly the .swf in the browser, the file load fine.

Anyone seen this? Could it a specific problem with the cache on my
machine?
This is driving me crazy.
Thx in advance

 
Martin Tremblay
LVL 

___
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] AS3 how to link movieclip manually put on the stage to class member

2007-08-08 Thread Martin Tremblay

Hello group !

Just trying to find the best way to link a movieclip manually put on the
stage to a class member.

Right now this is what I'm doing.

public class A extends MovieClip
{
 private var m_mcOnTheStage:MovieClip;

public function A ():void
{
//onthestage_mc is a movieclip manually put in the .fla
m_mcOnTheStage = onthestage_mc;
}
}


Is there a better way?
 
Martin Tremblay
LVL Studio 

___
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] Re: FLV CuePoints - discrepancies between CuePoint time and actual time [updated]

2007-05-18 Thread Martin Tremblay
I used Flash Encoder 8 instead of Sorenzon Squeeze and now my cuepoint
are perfectly synchronized. Unfortunately even using similar parameters
the quality of the flv is better with Sorenzon Squeeze. In Sorenzon
Squeeze, the cuepoint get called exactly 1 1/3 of seconds before.

Martin Tremblay
lvl
 


___
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] FLV CuePoints - discrepancies between CuePoint time and actual time

2007-05-17 Thread Martin Tremblay

Video newbie!

I inserted multiple CuePoint into a flv.

The problem is when onCuePoint is call on the netstream, is it not being
called directly on time, but almost a full seconds before the actual
cuepoint time.

Example:

My first cuepoint is at 7.40, but when the onCuePoint handler is called
the actual time is 6.24 ?

Is this a known problem or I am doing something wrong?


I use:

-uncompressed mov
-Sorenzon Squeeze 4.5
-Codec:Sorenson Spark Pro
-Frame rate: 15 f/s
-Keyframe every 15 frames
-auto Key Frame on Scene Change (frequent)
-Flash 8 / as2
-Flv is playing directly into a Video object.

thx
 
Martin Tremblay
LvL Studio

___
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] ISOMETRIC GAME ENGINE

2007-03-14 Thread Martin Tremblay
Bonjour Gilles,

 

We built a very simple iso grid class for our latest games.
It's in French tho. (http://kaboum.telequebec.com
http://kaboum.telequebec.com/ ). We are interested in open-sourcing it
in the next few month (along the rest of our game framework, but we need
to create some documentation before we do), but we could share our
IsoGrid class right now since it's pretty easy to use.

 

Martin Tremblay

Lead Developper

Lvl

 

ps: you can reach me directly at  mtremblay lvlstudio com

 

we are currently looking for a tile iso game engine for one of our  

projects.

 

 

___
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] Dynamically placing caret in a textfield

2007-01-22 Thread Martin Tremblay

I'm trying to place the caret at a specific position in a textfield, but
this seems to work only after I click at least once in the textfield.

But in my app, I CAN'T click, anybody know a way to get the caret to
blinking at a specific position without clicking in the textfield first
??


Here's a code to try this at home:

- create an input text name debug_txt on the stage

Code:

this.moveCaret = function ()
{
var nCaret = Selection.getCaretIndex();

if (nCaret == -1)
{
Selection.setFocus(_root.debug_txt);
}

Selection.setSelection(nCaret + 1, nCaret + 1);

}
_root.debug_txt.text = Hello World;
setInterval(moveCaret, 1500);



 
Martin T.
LVL 

___
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] using parseInt() and Math.floor() doesn't return the same value

2006-10-19 Thread Martin Tremblay

I'm wandering if we should continue to use Math.floor() and Math.ceil()
since they are unreliable.

Code:
var a = 2.999;

trace(parseInt(a.toString()));
trace(Math.floor(a));
trace(a);

output:
3
2
3

Would using methods using parseInt to simulate Math.floor() and
Math.ceil() be safer?

Example

public static function floor(_nValue:Number):Number
{
return parseInt(_nValue.toString()); 
}

public static function ceil(_nValue:Number):Number
{
return parseInt(_nValue.toString()) + 1; 
}


Martin T.
lvl

___
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] Can this be true?

2006-05-02 Thread Martin Tremblay


Try with this FPS counter

this.createTextField(fps_txt, 1000, 10, 10, 100, 100);

this.nLastFrame = getTimer();

this.onEnterFrame = function ()
{
var nCurrentFrame = getTimer();
var nFPS = Math.round(1000 / (nCurrentFrame - this.nLastFrame));
this.fps_txt.text = nFPS;
this.nLastFrame = nCurrentFrame;
}


Martin Tremblay
lvl

___
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] Getting File name when using ReferenceList

2006-04-05 Thread Martin Tremblay
Hi,

I'm uploading an image using FileReference::upload. My php file
which handle the actual file is placing the file in the appropriate
folder and rename the file. 

My question is: How can I retrieve the new name using the
callback provided with the FileReference method ?

Martin
lvl

___
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] Combobox stop working after resize

2005-11-08 Thread Martin Tremblay
 
The combobox seems to stop working (but I still receive the event) after an 
element been selected and the ComboBox.setSize() method is called.

If no selection been made before setSize, the combo is working just fine.

Is there a workaround other than re-attaching a new combo box?

See the example:
http://www.lvlstudio.com/bug/resizeCombo.html

Here's the code, to try it yourself:

resize_mc.delegate = this;
resize_mc.onRelease = function ()
{
this.delegate.resizeCombo();
}

this.resizeCombo = function ()
{
var nCurrentSize = this.test_cb._width;

this.test_cb.setSize(nCurrentSize == 100 ? 200 : 100);
}

Martin Tremblay


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.12.8/162 - Release Date: 11/5/2005
 
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders