Re: [Flashcoders] Duplicate Bitmap and scale question

2009-03-04 Thread Hans Wichman
Hi,

you create a clip based on mc's width, called img.
then you scale image, so its width is half of what it used to be.
Then you draw img into img2. Img2's size is based on half the height and
width, but the draw method ignores those transformation, so it draws an
unscaled version of img in img2.

regards
JC

On Sun, Mar 1, 2009 at 3:58 PM, natalia Vikhtinskaya
natavi.m...@gmail.comwrote:

 Hi
 Please explain what is wrong in this code:
 function duplicateMovieClipImage(from:MovieClip, target:MovieClip){
var visuals = new flash.display.BitmapData(from._width,
 from._height);
visuals.draw(from);
target.attachBitmap(visuals, 1,auto,true);

 }

 duplicateMovieClipImage(mc,img)
 img._xscale=50;
 img._yscale=50;
 duplicateMovieClipImage(img,img2)
 I expected that img1 and img2 have the same scale. Instead of that
 img2 show 50% of mc.
 ___
 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] try-catch-finally ...

2009-03-04 Thread Weyert de Boer
Sure. Reasonable good practice to catch exceptions. I normally use it 
for things like catch the exception and try it once again and if it 
fails for the second time. I will show an error message or try secondary 
option.

Technically, it's good practice/professional to use try-catch-finally blocks
in your actionscript logic. This ensures a robust, easily debugg-able
application.

However, can anyone comment if they actually use try-catch-finally or
whether anyone is for or against it's use.

I ask because I've received an application (which streams vidoe) that was
blowing out numerous users CPUs to 100%. Upon further investigation, it
appears that a netstream event is firing 20 times a second, and within the
listener (listener function that is) for the event, there is a
try-catch-finally block. I removed the try-catch-finally and CPU usage
halved on my machine.
Anyone care to comment for or against try-catch-finally and it's use.

Steve.
___
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] money question AJAX style apps or flash?

2009-03-04 Thread allandt bik-elliott (thefieldcomic.com)
as an aside, we had a really great presentation from the guys at eyeblaster
about the value of flash rich media advertising for branding and direct
response and the pitfalls of a reliance on clicks to sell the advertising.

His case was that rich media as a branding exercise is more effective than
television advertising which is turn is more effective than print
advertising. His reasoning was the following:
formatsense
print ads sight
television sight, hearing
rich media   sight, hearing, touch

By creating richmedia toys that allow the user to 'play' with the brand
identity in different ways (an example might be using different types of
deodorant in a bathroom cabinet to show the effects on the laydees for axe)
will embed that brand into the users subconscious much more effectively that
watching (or not) a 30 second spot on tv. They tracked that users that used
a richmedia experience like this spent on average 1 minute (and showed us a
campaign that users spent wy more than that - about 5 minutes  on
average) mucking about with the ad but then didn't click through. The
results they showed us was from search and in sales.

They also showed us the value of direct response in flash banners,
especially ones placed in 'typing' places like email / messenger clients.
They showed us a case study where a mobile phone company added a form to
allow the user to sign up directly from the ad but because they required 2
forms of id, they actually asked for the user's passport number (!!!). They
got something like a 15% response rate on the ad! It wasn't even very nice.

their old paper is at
http://www.eyeblaster.com/Data/Uploads/ResourceLibrary/10Things_branding.pdf

The new one will be going up at
http://www.eyeblaster.com/Content.aspx?page=resourceid=45 (not there at the
time of this post)

in terms of advertising, there is little doubt that flash is the way forward
(even from where we are already). My hope is that rich media will become the
norm and that people that use flash-blockers will be the ones missing out.

a


On Tue, Mar 3, 2009 at 6:11 PM, Joel Stransky stranskydes...@gmail.comwrote:

 We were recently discussing this from a business stand point at flashkit.
 You might find it enlightening.
 http://board.flashkit.com/board/showthread.php?t=789389

 On Tue, Mar 3, 2009 at 12:12 PM, Anthony Pace anthony.p...@utoronto.ca
 wrote:

  Thanks for the answer.  Good points.
 
 
  allandt bik-elliott (thefieldcomic.com) wrote:
 
  The company i'm at at the mo uses flash for advertising, navigation and
  impressive landing pages for sites. simpler forms of navigation will
 move
  to
  ajax imo while more complicated pieces (carousels, 3d etc) will stay as
  flash
 
  advertising will stay as it is - flash is the smallest, most efficient
 way
  of delivering advertising and with rich media becoming more important
 for
  branding and data-capture, the flash banner is here to stay.
 
  landing pages that don't really use flash to do anything more than fade
  items in will move to ajax but for proper animation, flash is still the
  best.
 
  not sure about flex. As far as I've always thought, Flex is for building
  applications and was made for the c programmers coming to the .swf
 format
  who are used to having libraries of components and pre-made classes.
 I'll
  be
  looking into it more when I get some time.
 
  a
 
  On Tue, Mar 3, 2009 at 10:29 AM, Anthony Pace anthony.p...@utoronto.ca
  wrote:
 
 
 
  Because of the trend, have you noticed less jobs for Flash then for
 AJAX
  style webapps? A push to DHTML and AJAX because of SEO issues?
  So many bad developers giving companies leaving a bad taste in the
 mouths
  of clients?
  Is freelance flash developer starting to become a bad title?
  What about the move to FLEX for big organizations? Bad for flashers
  because
  it makes it easier to produce cookie cutter apps?
  ___
  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
 



 --
 --Joel Stransky
 stranskydesign.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


[Flashcoders] error problem in as3

2009-03-04 Thread Gustavo Duenas

hi I have this problem coders:

I have a function name init( is a 3d carrousel menu for fp10)
ok, this function is call from a button, the problem is when I want  
to get of rid of the menu(carrousel) using removechild()

on the other buttons in my stage, I have this error:


TypeError: Error #1009: Cannot access a property or method of a null  
object reference.

at com.theflashblog.fp10::SimpleZSorter$/traverseParents()
at com.theflashblog.fp10::SimpleZSorter$/sortClips()
at Carousel/loop()

those are functions part of the carrousel creation class.
The error appears as a dialog window when I'm using a browser and  
when I put dismiss all, it doesn't get back again, but I would like to
don't have it anytime, any ideas how could I remove that, I mean the  
remove child works, but just after the appearance of the dialog  
window with the error.


Thanks,


Gustavo Duenas

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


[Flashcoders] [AS3] Dynamic and Static text field font conflict work arounds

2009-03-04 Thread Joel Stransky
I've finally run into a situation where I really need the same font both
embeded and used statically.
I've been searching the web and there a lots of mentions of the bug but I've
yet to find a great work around.
Does anyone have a preferred or elegant fix they can recommend?

-- 
--Joel Stransky
stranskydesign.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] [AS3] Dynamic and Static text field font conflict work arounds

2009-03-04 Thread Taka Kojima
what's the exact bug, because I just created two text fields, one with
static text, the other dynamic. I embedded the font in the dynamic
text field and it worked...



On Wed, Mar 4, 2009 at 11:16 AM, Joel Stransky j...@stranskydesign.com wrote:
 I've finally run into a situation where I really need the same font both
 embeded and used statically.
 I've been searching the web and there a lots of mentions of the bug but I've
 yet to find a great work around.
 Does anyone have a preferred or elegant fix they can recommend?

 --
 --Joel Stransky
 stranskydesign.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


[Flashcoders] SoundSpectrum on audio track of a video?

2009-03-04 Thread Matt S.
Hey,
do you guys know if its possible to use the AS3 Sound Spectrum
functionality on the audio track of a video that's playing via a
NetStream?

thx,

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


Re: [Flashcoders] [AS3] Dynamic and Static text field font conflict work arounds

2009-03-04 Thread Joel Stransky
Sorry I meant exported fonts that are in turn applied to a dynamic textField
whose embedFonts property is set to true.

On Wed, Mar 4, 2009 at 2:41 PM, Taka Kojima t...@gigafied.com wrote:

 what's the exact bug, because I just created two text fields, one with
 static text, the other dynamic. I embedded the font in the dynamic
 text field and it worked...



 On Wed, Mar 4, 2009 at 11:16 AM, Joel Stransky j...@stranskydesign.com
 wrote:
  I've finally run into a situation where I really need the same font both
  embeded and used statically.
  I've been searching the web and there a lots of mentions of the bug but
 I've
  yet to find a great work around.
  Does anyone have a preferred or elegant fix they can recommend?
 
  --
  --Joel Stransky
  stranskydesign.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




-- 
--Joel Stransky
stranskydesign.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] [AS3] Dynamic and Static text field font conflict work arounds

2009-03-04 Thread Taka Kojima
ahh...

I would use a tool like TypeTool to create a new version of the
font, use one for static and one for embedding...

However, why not just set your static textFields to dynamic...

You can use the font in your library by setting the font to exportName*

- Taka

On Wed, Mar 4, 2009 at 12:02 PM, Joel Stransky stranskydes...@gmail.com wrote:
 Sorry I meant exported fonts that are in turn applied to a dynamic textField
 whose embedFonts property is set to true.

 On Wed, Mar 4, 2009 at 2:41 PM, Taka Kojima t...@gigafied.com wrote:

 what's the exact bug, because I just created two text fields, one with
 static text, the other dynamic. I embedded the font in the dynamic
 text field and it worked...



 On Wed, Mar 4, 2009 at 11:16 AM, Joel Stransky j...@stranskydesign.com
 wrote:
  I've finally run into a situation where I really need the same font both
  embeded and used statically.
  I've been searching the web and there a lots of mentions of the bug but
 I've
  yet to find a great work around.
  Does anyone have a preferred or elegant fix they can recommend?
 
  --
  --Joel Stransky
  stranskydesign.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




 --
 --Joel Stransky
 stranskydesign.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] Dynamic and Static text field font conflict work arounds

2009-03-04 Thread Joel Stransky
I considered the alternative font option too but new software is not in the
projects budget.
The font is not exported into the .swf that needs it. I'm using a fonts.swf
as a global library.
I don't want to create a textFormat for each static field so setting them to
dynamic is not an option.

What did you mean by You can use the font in your library by setting the
font to exportName* ?

On Wed, Mar 4, 2009 at 3:19 PM, Taka Kojima t...@gigafied.com wrote:

 ahh...

 I would use a tool like TypeTool to create a new version of the
 font, use one for static and one for embedding...

 However, why not just set your static textFields to dynamic...

 You can use the font in your library by setting the font to exportName*

 - Taka

 On Wed, Mar 4, 2009 at 12:02 PM, Joel Stransky stranskydes...@gmail.com
 wrote:
  Sorry I meant exported fonts that are in turn applied to a dynamic
 textField
  whose embedFonts property is set to true.
 
  On Wed, Mar 4, 2009 at 2:41 PM, Taka Kojima t...@gigafied.com wrote:
 
  what's the exact bug, because I just created two text fields, one with
  static text, the other dynamic. I embedded the font in the dynamic
  text field and it worked...
 
 
 
  On Wed, Mar 4, 2009 at 11:16 AM, Joel Stransky j...@stranskydesign.com
 
  wrote:
   I've finally run into a situation where I really need the same font
 both
   embeded and used statically.
   I've been searching the web and there a lots of mentions of the bug
 but
  I've
   yet to find a great work around.
   Does anyone have a preferred or elegant fix they can recommend?
  
   --
   --Joel Stransky
   stranskydesign.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
 
 
 
 
  --
  --Joel Stransky
  stranskydesign.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




-- 
--Joel Stransky
stranskydesign.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] error problem in as3

2009-03-04 Thread Paul Andrews
Well, somewhere you're trying to access a non-existent object.. Possibly 
it's related to removing an object from the display list via removeChild() 
then trying to access other objects via it's parent (which no longer 
exists). With so little to go on it's hard to guess.


Paul
- Original Message - 
From: Gustavo Duenas gdue...@leftandrightsolutions.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, March 04, 2009 7:09 PM
Subject: [Flashcoders] error problem in as3



hi I have this problem coders:

I have a function name init( is a 3d carrousel menu for fp10)
ok, this function is call from a button, the problem is when I want  to 
get of rid of the menu(carrousel) using removechild()

on the other buttons in my stage, I have this error:


TypeError: Error #1009: Cannot access a property or method of a null 
object reference.

at com.theflashblog.fp10::SimpleZSorter$/traverseParents()
at com.theflashblog.fp10::SimpleZSorter$/sortClips()
at Carousel/loop()

those are functions part of the carrousel creation class.
The error appears as a dialog window when I'm using a browser and  when I 
put dismiss all, it doesn't get back again, but I would like to
don't have it anytime, any ideas how could I remove that, I mean the 
remove child works, but just after the appearance of the dialog  window 
with the error.


Thanks,


Gustavo Duenas

___
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] Re: mouseEnabled Loader issue

2009-03-04 Thread Fabio Pinatti
Hello again,

wow, I don't make idea what, how or why, but that solved my problem:

*mcB.loaderInfo.loader.mouseEnabled = false;*

(I put that on my swf B, the top level swf). That permitted me disable
Loader mouseChildren and access my level A.

Any explanation why this happens, would be great...

Thank you!


On Wed, Mar 4, 2009 at 11:15 PM, Fabio Pinatti fpina...@gmail.com wrote:

 Hello flashcoders,

 I'm having some issues with some target things, in as3. I need to access a
 movieclip A under a movieclip B. Movieclip A is in a swf, and B in other
 above it. My first try was mouseEnabled. but it didn't work. The weird is,
 if I put a mouse click in the stage of movie that has movieclip B (that is
 the one I'm not having sucess in disable). the event.target returns a Loader
 object. Why is this happening? I thought I could just use mouseEnabled =
 false to access lower level movieclips, but for different movies, seems that
 that Loader preserves a hit area, that I don't know how to disable.
 Actually, one thing works:

 in swf B:

 private function click(e:MouseEvent):void {

   e.target.mouseEnabled = false;

 }

 This works on first click, since the Loader target is disabled. Then, I'm
 able to click on under movieclip, the movieclip A. But I can't leave user
 clicks... I need to disable before any user interaction... The big question
 is, why is it getting a Loader target?? How can I disable Loader mouse
 interaction?

 Thanks so much...

 --
 Fabio Pinatti
 :: web.developer
  www.pinatti.com.br
 :: 19. 9184.3745 / 3342.1130




-- 
Fábio Pinatti
:: web.developer
 www.pinatti.com.br
:: 19. 9184.3745 / 3342.1130
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] mouseEnabled Loader issue

2009-03-04 Thread Fabio Pinatti
Hello flashcoders,

I'm having some issues with some target things, in as3. I need to access a
movieclip A under a movieclip B. Movieclip A is in a swf, and B in other
above it. My first try was mouseEnabled. but it didn't work. The weird is,
if I put a mouse click in the stage of movie that has movieclip B (that is
the one I'm not having sucess in disable). the event.target returns a Loader
object. Why is this happening? I thought I could just use mouseEnabled =
false to access lower level movieclips, but for different movies, seems that
that Loader preserves a hit area, that I don't know how to disable.
Actually, one thing works:

in swf B:

private function click(e:MouseEvent):void {

  e.target.mouseEnabled = false;

}

This works on first click, since the Loader target is disabled. Then, I'm
able to click on under movieclip, the movieclip A. But I can't leave user
clicks... I need to disable before any user interaction... The big question
is, why is it getting a Loader target?? How can I disable Loader mouse
interaction?

Thanks so much...

-- 
Fabio Pinatti
:: web.developer
 www.pinatti.com.br
:: 19. 9184.3745 / 3342.1130
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] include directive ...

2009-03-04 Thread SJF
Looking for clarity on the include directive in a CS3 FLA file.

Technically, does anyone know if pound-for-pound, having code on a
movieclip's timeline is EXACTLY the same as having it's code in an external
.as file and using the include directive?

Here are more details:

1) The code being externalised contains imports, variable declarations,
numerous functions and runtime code (approx. 150-250 lines of code)
2) The movieclip is dynamic and created on the fly by the application,
putting the movieclip within various other movieclips deep in the display
stack
3) Multiple other movieclips (approx. 30) also contain code with imports,
variable declarations, functions and runtime code

So the question I ask:

Is it technically possible to externalise all code in a CS3 FLA document by
exporting all code from all timelines and using the include directive?

Are there issues with instantiation of objects/classes or problems with
import paths, etc?

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


Re: [Flashcoders] include directive ...

2009-03-04 Thread Paul Andrews
The include directive is just plain text inclusion from an external source. 
Once included it's as though it were inline.


I think that if you are using the timeline and having lots of includes all 
over the place to replace all of the inline code, it would be a nightmare to 
work out what's going on.


I rarely use the include directive. Better to use classes.

Paul


- Original Message - 
From: SJF sjf...@gmail.com

To: flashcoders@chattyfig.figleaf.com
Sent: Thursday, March 05, 2009 2:37 AM
Subject: [Flashcoders] include directive ...



Looking for clarity on the include directive in a CS3 FLA file.

Technically, does anyone know if pound-for-pound, having code on a
movieclip's timeline is EXACTLY the same as having it's code in an 
external

.as file and using the include directive?

Here are more details:

1) The code being externalised contains imports, variable declarations,
numerous functions and runtime code (approx. 150-250 lines of code)
2) The movieclip is dynamic and created on the fly by the application,
putting the movieclip within various other movieclips deep in the display
stack
3) Multiple other movieclips (approx. 30) also contain code with imports,
variable declarations, functions and runtime code

So the question I ask:

Is it technically possible to externalise all code in a CS3 FLA document 
by

exporting all code from all timelines and using the include directive?

Are there issues with instantiation of objects/classes or problems with
import paths, etc?

Thoughts?
___
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