Re: [Flashcoders] [AS3] Timers behaving erratically

2007-02-24 Thread badi malik
i've had this happen many times and even posted to the list about iti use 
the debugger that comes with the flash ide alot and only then can i see what's 
happening...if you look at the instances using the debugger you can see that 
the instances haven't cleared their values. what i've done in the past is make 
sure that i call removeMovieClip as well as call delete, and pray! :)

hope this helps

- Original Message 
From: Daniel Thompson [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Friday, February 23, 2007 6:13:07 PM
Subject: RE: [Flashcoders] [AS3] Timers behaving erratically

 classes. The second time this class is instantiated, the 
 timers don't fire. Any reason why this is happening?

Actually, nowhere in the application they aren't firing.
Here's the code that disables the application:



public static function disable(message:String):void {
  with (_instance) {
var snapshot:Bitmap = takeSnapshot();

destroyForm();

_container.addChildAt(snapshot, 0);
_container.addChildAt(drawCurtains(), 1);
_container.stage.addEventListener(MouseEvent.CLICK,
mouseClickHandler);

showAlert(message);

_container.stage.invalidate();

_enabled = false;
  }
}


private function destroyForm():void {
  _container.removeChild(_container.getChildByName(form));
  _form = null;
}


___
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] hooking up GUI in pure OO code...

2007-02-04 Thread badi malik
Hi Jason,

in a situation like this i first determine if Button is a dynamic class...if it 
is i designate a  variable and assign it the parent class to it like this 
myButton.parentObj = this;

this way i can call any function that's a memeber of the parent class like so...

myButton.onRelease = function() {
  this.parentObj.doSomething();
}

if it's not a dynamic class then you can either hack it to be or design another 
call back mechanizm

hope this helps

b


- Original Message 
From: Jason Boyd [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Sunday, February 4, 2007 1:56:39 PM
Subject: [Flashcoders] hooking up GUI in pure OO code...

OK this is making me nuts. It seems to be an impossible scope problem,
to do something that ought to be very very possible, and in fact
common. The basic problem: I want to have initialization code in a
Main class that hooks up GUI controls to methods in this class (acting
as a controller class essentially). For various reasons, I do not want
to use components; the GUI elements are either Buttons or MovieClips.
Again, this ought to be possible, right?

So here's the problem case:

class Main {
  var myButton:Button; // placed on stage in authoring time

  function init() {
myButton.onRelease = function() {
  doSomething();
}
  }

  function doSomething() {
trace(something);
  }
}

This does not work, nor is there any way I can wrap my head around
getting it to work, as the anonymous function assigned to the button
event handler has this scoped as the button itself, so
doSomething() refers to a non-existent function
myButton.doSomething(). Simply assigning the member function to the
button event handler directly doesn't help, as this function is then
unable to call other member functions for the same reason. E.g.:

function init() {
  myButton.onRelease = doSomething();
}

function doSomething() {
  // this will be called now, but this still refers to the button,
not objects of this class
}

There has *got* to be some way around this issue. Right?
___
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] export images from flash

2007-01-08 Thread badi malik

hi all,
i'm wondering if it's possible to export a jpg from flash and post it to a
server for an application like Image Magick to composite...?

thanks much
___
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] export images from flash

2007-01-08 Thread badi malik
thank you.
b

- Original Message 
From: Mick G [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Monday, January 8, 2007 2:51:13 PM
Subject: Re: [Flashcoders] export images from flash

http://www.quasimondo.com/archives/000572.php



On 1/8/07, badi malik [EMAIL PROTECTED] wrote:

 hi all,
 i'm wondering if it's possible to export a jpg from flash and post it to a
 server for an application like Image Magick to composite...?

 thanks much
 ___
 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] Switch case problem...

2006-12-05 Thread badi malik
you might be missing a ':'

b

- Original Message 
From: Jose Maria Barros [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Tuesday, December 5, 2006 11:01:30 AM
Subject: Re: [Flashcoders] Switch case problem...

yes

On 12/5/06, Joey Rivera [EMAIL PROTECTED] wrote:

 You putting breaks in the case statements?

 Joey Rivera
 Flash Developer
 iLearn, Inc.
 (770) 218-0972


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Jose Maria
 Barros
 Sent: Tuesday, December 05, 2006 1:50 PM
 To: Flashcoders mailing list
 Subject: [Flashcoders] Switch case problem...

 Hi..
 Ive done a function with a switch case wich have each one a string
 variable
 value  with the name of the link...

 var linkName:String = ;

 switch(linkName) {

   case link1:
   //run function with a gotoAndPlay  that goes to the  frame(linkName)

  case link2:
  //run function with a gotoAndPlay  that goes to the  frame(linkName)

 etc
 }


 And when i press a button for that link...he stores the value in the
 variable(linkName) and he runs the function...

 The problem is that when i press the button one...he goes to that
 link...but
 when i press the same button again...he goes to other link...

 I dont understand...i appreciate some help..

 Thanks in advance.
 ___
 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





___
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] C++ flash host supporting transparency

2006-10-11 Thread badi malik

here ya go
http://www.codeproject.com/useritems/FlashGui.asp

best

b

- Original Message 
From: Chris Douglass [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, October 11, 2006 7:34:31 AM
Subject: [Flashcoders] C++ flash host supporting transparency

Hey, I'm building a C++ app to run on Windows (then maybe on Mac and X) that
will host SWFs.  On Windows I'm using the Flash activeX control to host my
Flash app.  I'd like to render the Flash viewport/window onto my
application's surface with transparency such that only the content on the
stage is drawn to my window.  

Does anyone know how you would implement this within a custom host/container
like mine?  How do the browsers implement this (well the ones that support
it)?  Does Flash tell the host the key color being used for transparency?
I've seen a few articles here and there that Flash sends its output to an
off-screen buffer that the browsers use to render Flash content with
non-rectangular transparency.  But, I'm not sure how as a host container the
Flash frame buffers and transparency key color are accessible to me.

Does the stage color become the RGB key color value that Flash communicates
to the browser to assist with this process?  What if that same color is used
in the content of your movie/content within your SWF?  Do the browsers
render those pixels transparently as well?  

Anyway, I'm going to start some tests but thought maybe someone could shed
some light for me.  Also, does anyone have experience building their own SWF
host application that runs on Windows and Mac?  I need to port my app (and
am not interested in using the commercial swf/exe hosts out there, at least
not yet ;]) to the Mac, so whatever transparency technique I use on Win32
would hopefully not require a full-rewrite on the Mac (yeah right).

Is there an SDK for people wanting to build their own hosts for Flash apps?
Is there a lower-level interface/API I can tap into that exposes the Flash
content/internals so that developers can write their own unique hosts?  What
wrapper/API is exposed to the Mac platform developers for creating
containers on OSX?

Thanks for ANY input :)  I'll start fiddling with WMODE and see what happens
for starters...  Where is the definitive internals book on the Flash runtime
engine?  Does one exist?

Chris Douglass
Innovative Code  Design
Atlanta, GA
www.innovativecode.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] FLVPlayer and addASCuePoint

2006-09-19 Thread badi malik
Hi til, 
are you still there?...i did something similar on a different project...take a 
look in eric's dropbox
basically...nav cue points are embedded in the video, but actionscript 
cuepoints you can add dynamically...give me a call and we can discuss it
 
 
list -- sorry for thiswe work together...
 
b


- Original Message 
From: til [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Tuesday, September 19, 2006 4:53:27 PM
Subject: [Flashcoders] FLVPlayer and addASCuePoint


Hello everyone. After a long hiatus from this list, I decided to
resubscribe, becasue i am at my wit's end :(

Thankfully, chattyfig has some of the world's best AS coders so I'm
sure this is no problem for you people. Here goes:

I got a FLVplayer (flash 8 pro) instance and loaded an flv that has no
cuepoints encoded. I really don't want to encode cuepoints, but use AS
to create them.

The code below works fine: it moves the playback to 8secs into the film.

BUT! -- here is the problem! -- the trace action I have set for that
cuepoint JUST WONT EXECUTE.

The only way I can make it show is to seek to about 3 secs before my
cuepoint, but obviously that also plays the film 3 secs earlier.

I tired using seekToNavCuePoint() but that doesn't do anything, not
even moves playback header.
What else could I try? Again ,the video jumps as expected, but the
action isnt happening.

// load file
Vid1.contentPath = film.flv;

// cue point listening
var listnerObject:Object = new Object();
listnerObject.cuePoint = function(eventObject:Object):Void  {
cuepointers(eventObject); // calling function below
}
Vid1.addEventListener(cuePoint, listnerObject);

// make cuepoints
Vid1.addASCuePoint(1,cuePt1);
Vid1.addASCuePoint(8,cuePt8);

// button to seek to a specific cuepoint
btn1.onPress = function(){
Vid1.seek(Vid1.findCuePoint(cuePt8)[time]);
}

// my function to do something when the cuepoint is hit
function cuepointers(eventObject){
switch(eventObject.info.name){
case cuePt1 :
trace(cue1);
break;
case cuePt8 :
trace(cue8); // here! this action just wont happen :(
break;
default : break;
}//end switch
}
___
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] flv playback component question...

2006-09-18 Thread badi malik
hi,
I've noticed that the cuePoints array is often null even when the component is 
already on stage and i fill in the parameters in the properties box...does 
anyone know the real location of the cue points?...when i try to call 
findNearestCuePoint i get error msgs...the metadata contains the navigation cue 
points alright, but the actionscript cue points aren't where they're supposed 
to be...i know they exist because the app responds to them just fine...
 
note: i'm not using fms...
___
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] more flv playback component questions...

2006-09-18 Thread badi malik
hi again,
 
does anyone know how to make the playback component respond to minutes...it 
appears as though it only like seconds but doesn't like something like 64 
seconds...
 
thanks
 
b
___
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] bandwidth detection...

2006-09-16 Thread badi malik
thanks greg...
no, i'm not using FMS.  I searched for bandwidth detection before, but came up 
empty handed...not that there weren't any articles, but none of them seemed 
quite what i was looking for at the time...i'll look again and see what comes 
up this time..
 
regards
 
b


- Original Message 
From: greg h [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Saturday, September 16, 2006 2:59:56 PM
Subject: Re: [Flashcoders] bandwidth detection...


badi,

Am I correct that you are NOT using the Flash Media Server?  (fyi ...
bandwidth detection is a feature of
FMShttp://www.adobe.com/products/flashmediaserver/productinfo/features/#f-3-1
.)

Normally I would suggest your cross posting your question on the
FlashCommlist, but weirdly that list has been off-line for almost a
month.  In case
it comes back up, you can find it here:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

I googled the following:  bandwidth detection flash
and there are 11,300  matches,  46 of which are at Adobe.com.

While you wait for others to post on this thread, you might want to check
what you can find with a similar google search.

hth,

g

On 9/15/06, badi malik [EMAIL PROTECTED] wrote:

 I'm wondering if anyone has any suggestions regarding bandwidth
 detection...i'm trying to choose between high and low bandwidth versions of
 the same video

 thanks

___
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] bandwidth detection...

2006-09-16 Thread badi malik
Hi Duncan,
wow...impressive...thanks alot!
 
b


- Original Message 
From: Duncan Reid [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Saturday, September 16, 2006 7:40:39 PM
Subject: Re: [Flashcoders] bandwidth detection...


Hi Badi,

Have a look at the first example on this page.  I have not used this
personally, but have looked at some of their other files and they are all
well done.  At the very least it may get you started.

http://www.betriebsraum.de/blog/downloads/

good luck,
Dunc


On 9/16/06, badi malik [EMAIL PROTECTED] wrote:

 thanks greg...
 no, i'm not using FMS.  I searched for bandwidth detection before, but
 came up empty handed...not that there weren't any articles, but none of them
 seemed quite what i was looking for at the time...i'll look again and see
 what comes up this time..

 regards

 b


 - Original Message 
 From: greg h [EMAIL PROTECTED]
 To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Sent: Saturday, September 16, 2006 2:59:56 PM
 Subject: Re: [Flashcoders] bandwidth detection...


 badi,

 Am I correct that you are NOT using the Flash Media Server?  (fyi ...
 bandwidth detection is a feature of
 FMS
 http://www.adobe.com/products/flashmediaserver/productinfo/features/#f-3-1
 
 .)

 Normally I would suggest your cross posting your question on the
 FlashCommlist, but weirdly that list has been off-line for almost a
 month.  In case
 it comes back up, you can find it here:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

 I googled the following:  bandwidth detection flash
 and there are 11,300  matches,  46 of which are at Adobe.com.

 While you wait for others to post on this thread, you might want to check
 what you can find with a similar google search.

 hth,

 g

 On 9/15/06, badi malik [EMAIL PROTECTED] wrote:
 
  I'm wondering if anyone has any suggestions regarding bandwidth
  detection...i'm trying to choose between high and low bandwidth versions
 of
  the same video
 
  thanks
 
 ___
 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
___
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] bandwidth detection...

2006-09-15 Thread badi malik
I'm wondering if anyone has any suggestions regarding bandwidth detection...i'm 
trying to choose between high and low bandwidth versions of the same video
 
thanks 
 
 

 
- Original Message 
From: Claus Wahlers [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Friday, September 15, 2006 7:52:08 AM
Subject: Re: [Flashcoders] BitmapData.getPixel() - negative value ?


Number.toString() is a little borked.

Meister Skinner explains it here:
http://www.gskinner.com/blog/archives/2005/12/source_code_tra.html

Cheers,
Claus.


Jeroen Beckers wrote:

 var n:Number = -16777216
 trace(n.toString(16));
 
 Gives me:
 
 -100 ?
 
 
 
 Claus Wahlers wrote:

 pixel = -16777216

 -16777216 is 0xff00 (solid black)

 Try to trace pixel.toString(16)

 Cheers,
 Claus.
___
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