[Flashcoders] test - please ignore

2006-08-02 Thread Martin Baltzer Hennelund

Just need to see if I can write to the list. Sorry for the
inconvenience,
___
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] Ignoring error in code on compile

2006-08-02 Thread Martin Wood
do you mean that you want to compile those classes seperately but are getting 
errors when they are referenced?


You could create interfaces for the classes and code to that.

martin

Ramon Miguel M. Tayag wrote:

Hi everyone,

I want to use Screenweaver to create a desktop application.  Just like
the other SWF2EXE programs, you can arbitrarily call an object, like,
swFile.function to access the commands.

The problems comes in when I put these commands in classes and I
compile the classes.  How do I tell Flash to ignore these errors and
continue compiling like those weren't there?

The workaround would be ugly (pointing to the root that contains the
functions), and I'd like to avoid that.

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] amfphp, many calls at once

2006-08-02 Thread Martin Weiser

hello,

this is classical scheme of amf php
import mx.remoting.*;
import mx.rpc.*;
import mx.remoting.debug.NetDebug;

var gatewayUrl:String = http://localhost/flashservices/gateway.php;

NetDebug.initialize();
var _service:Service = new Service(gatewayUrl, null, 'HelloWorld', null , 
null);

var pc:PendingCall = _service.say(Hello world!);
pc.responder = new RelayResponder(this, handleResult, handleError);
How do i ensure calls are not lost, when one method calls is repeated 
before the previous call (the same method), is the result from forst call 
lost?I thought that is the work of pendingCallis it?Martin 


___
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] browsing photo gallery problem

2006-08-02 Thread hervé hubert

Hi all,
I'm making a flash photo gallery
Everything is working fine except two points:

- If I'm on the 1st picture and I press back instead of next,
the xml text will be 'undefined' cause it's looking a picture who 
doesn't exist.

The gallery should stay on picture n°1 and not go to picture n°0
Same problem for the last picture.
I'm kinda newbie in AS and I can't find a solution to automatically 
stop the gallery,

or to make it as a loop.
Can anybody help me?

- I found a usefull trick, I set the 1st picture to be visible during 
the loading

so all the pictures load in the background without the visitor notice it
so he can already browse the gallery.
The problem is that the picture n°1 always stays visible at the back,
when I try to make alpha transitions between each picture, the picture 
n°1 always appear on the back.
Is there's a way to delete it at the moment the visitor begins to 
browse the gallery?


Thanks alot to take a look at the code below
h.


function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; itotal; i++) {
image[i] = 
xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
			description[i] = 
xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;

}
id = setInterval(preloadPic, 100);
} else {
content = file not loaded!;
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(images05.xml);
var loadTot = 0;
var k = 0;
// ///
function preloadPic() {
clearInterval(id);
var con = picture.duplicateMovieClip(con+k, 9984+k);
con.loadMovie(image[k]);
var temp = _root.createEmptyMovieClip(temp+k, 99+k);
temp.onEnterFrame = function() {
var total = con.getBytesTotal();
var loaded = con.getBytesLoaded();
percent = Math.round((loaded/total*100)/image.length);
preloader.preload_bar._xscale = loadTot+percent;
info.text = Loading picture +k+ of +image.length+ total;
if (loaded == total  total4) {
con._visible = 0;
con0._visible = 1;
nextPic();
loadTot += percent;
delete this.onEnterFrame;
}
};
}
function nextPic() {
if (kimage.length-1) {
k++;
preloadPic();
} else {
firstImage();
trace(hit);
}
}
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};


// ///
var p = 0;
var current;
MovieClip.prototype.fadeIn = function() {
if (this._alpha100) {
current._alpha -= 100;
this._alpha += 100;
} else {
current._visible = 0;
delete this.onEnterFrame;
}
};
function nextImage() {
current = this[con+p];
p++;
var picture = this[con+p];
picture._visible = 1;
picture._alpha = 0;
picture.onEnterFrame = fadeIn;
desc_txt.text = description[p];
picture_num();
if (p11) {
current = this[con+p];
p--;
var picture = this[con+p];
}
}
function prevImage() {
current = this[con+p];
p--;
var picture = this[con+p];
picture._visible = 1;
picture._alpha = 0;
picture.onEnterFrame = fadeIn;
desc_txt.text = description[p];
picture_num();
if (p-0) {
current = this[con+p];
p++;
var picture = this[con+p];
}
}

function firstImage() {
con0._visible = 1;
con0._alpha = 0;
con0.onEnterFrame = fadeIn;
desc_txt.text = description[0];
picture_num();
}

function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+ / +total;
}

___
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] Mtasc Delegate

2006-08-02 Thread Pål Østerud
Hi João,
Mtasc is more strict with variable scope than MM's compiler. 
If you want to use mtasc on MM's Delegate method you can rename the variable 
called func inside the dynamically created function in the Delegate.create 
method (that is two places exactly, and don't touch the line 
arguments.callee.func). I can't quote MM's sourcecode here due to copyright. 
Hope that helps.

Yours sincerely,
Pål Østerud

 --
 
 From: jcarlos [EMAIL PROTECTED]
 hi All,
 I´m having problems using Delegate  with MTASC
 this works fine Flash compiler
  if (_actionRelease)
  {
   container_mc.onRelease = Delegate.create (this, handleRelease);
  }
 but doesn´t work with MTASC
 Any help?  Directions ?
 Thanks in advance
 João Carlos 

___
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] Mtasc Delegate

2006-08-02 Thread jcarlos

it doesn´t work


- Original Message - 
From: John Grden [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Wednesday, August 02, 2006 12:30 AM
Subject: Re: [Flashcoders] Mtasc  Delegate


what's the error you get? or does it just simply not work?

JPG

On 8/1/06, jcarlos [EMAIL PROTECTED] wrote:


hi All,

I´m having problems using Delegate  with MTASC

this works fine Flash compiler

  if (_actionRelease)
  {
   container_mc.onRelease = Delegate.create (this, handleRelease);
  }

but doesn´t work with MTASC

Any help?  Directions ?

Thanks in advance

João Carlos

___
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





--
John Grden
___
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] Mtasc Delegate

2006-08-02 Thread jcarlos

thanks Pål  I´will check that

- Original Message - 
From: Pål Østerud [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, August 02, 2006 6:48 AM
Subject: Re: [Flashcoders] Mtasc  Delegate


Hi João,
Mtasc is more strict with variable scope than MM's compiler.
If you want to use mtasc on MM's Delegate method you can rename the variable 
called func inside the dynamically created function in the Delegate.create 
method (that is two places exactly, and don't touch the line 
arguments.callee.func). I can't quote MM's sourcecode here due to 
copyright. Hope that helps.


Yours sincerely,
Pål Østerud


--

From: jcarlos [EMAIL PROTECTED]
hi All,
I´m having problems using Delegate  with MTASC
this works fine Flash compiler
 if (_actionRelease)
 {
  container_mc.onRelease = Delegate.create (this, handleRelease);
 }
but doesn´t work with MTASC
Any help?  Directions ?
Thanks in advance
João Carlos


___
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] Most efficient way to set a ColorTransform property on a MovieClip

2006-08-02 Thread Mark Walters

What would be the quickest most efficient way to apply a
ColorTransform and set the rgb property on a MovieClip?

With the Color object, you could use the following line:

(new Color(my_mc)).setRGB(0x00);

... and if you extended the Color class and added an rgb getter
setter, the following would work as well:

(new XColor(my_mc)).rgb = 0x00;

... but with ColorTransform, I can't seem to find a single line
solution. I've tried:

(my_mc.transform.colorTransform = new ColorTransform ()).rgb = 0x00;

... which doesn't work, although it also doesn't throw an error.
I know that I can pass in all the parameters (rm, gm, bm, etc) into
the ColorTransform constructor and get it to work on a single line,
but I've extended the ColorTransform class and want to be able to call
the methods and properties the most efficiently.

If anyone could help, that would be very much appreciated.

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] Font symbols, Polish, Export for Actionscript, barf

2006-08-02 Thread James Tarling

Hello,

Flash seems to be particularly unfriendly when working with Polish text.

If I create a font symbol, choose not to export it in the linkage 
properties, use it in a dynamic textfield played on the stage, embed 
Basic Latin plus the extra characters I need for Polish, and populate it 
with some French, German and Polish words, they all display fine.


If I then choose to export my font symbol, then the Polish characters 
disappear - the French and German characters display fine. This would 
appear to me to be broken.


- I don't suppose anyone has managed to resolve this problem? Or could 
tell me how I'm misunderstanding the situation.
- Macromedia, please sort out fonts in the next version of the Flash 
IDE, they are a nightmare at the moment. Please let us select which 
glyphs we want for a font per movie, rather than per text field (maybe 
having an override option per text field). (I have submitted this as a 
feature request). I can't think of many scenarios where you might want 
to stop characters appearing in field that couldn't just be achieved by 
some script. Or am I alone in this one?


Thanks,
James




___
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] Most efficient way to set a ColorTransform property on a MovieClip

2006-08-02 Thread Marcos Neves

This is a classic object oriented problem. The MovieClip can´t know
that the rbg property has changed from his ColorTransform property.
There ar 3 solutions:
The first is the easier for Macromedia but worst for us programers.
The movieClip, update its ColorTransform when you set it, like this
mc.colorTransform = new ColorTransform

The second solution would be with listeners. When you assign
mc.colorTransform = new ColorTransform, the movie clip do
colorTransform.addEventListener(COLOR_CHANGE, 

The third would be the color transform has a reference to the
movieClip and do the same done on the first situation, so when you
assign colorTransform.rbg = 0xFF the color transform do:
parentMovieClip.colorTransform = this (where this is the
colorTransform)

Those solutions are fine if you want to change only one property, but
if you change 6 properties, the movieClip would be updated 6 times on
the last two solutions. Unless the movieClip waits to update only at
some internal refresh frame event (but this is with macromedia).

My suggestion is create a helper class that would do the follow?

new HelperColorTransform(movieClip).rgb = 0xFF;
and inside you would do what you can´t do with one line of code.

Let´s extends the discussion, since this problem exists in many places of Flash.

On 8/2/06, Mark Walters [EMAIL PROTECTED] wrote:

What would be the quickest most efficient way to apply a
ColorTransform and set the rgb property on a MovieClip?

With the Color object, you could use the following line:

(new Color(my_mc)).setRGB(0x00);

... and if you extended the Color class and added an rgb getter
setter, the following would work as well:

(new XColor(my_mc)).rgb = 0x00;

... but with ColorTransform, I can't seem to find a single line
solution. I've tried:

(my_mc.transform.colorTransform = new ColorTransform ()).rgb = 0x00;

... which doesn't work, although it also doesn't throw an error.
I know that I can pass in all the parameters (rm, gm, bm, etc) into
the ColorTransform constructor and get it to work on a single line,
but I've extended the ColorTransform class and want to be able to call
the methods and properties the most efficiently.

If anyone could help, that would be very much appreciated.

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] New to the list - got a question

2006-08-02 Thread Jon
Hi All,

I'm new to the list, so appologies if I don't get the posting right on this - 
but I have a question.

I'm trying to load in a set of XML data, manipulate it and then get it to 
display on the stage. So far so good on the first two fronts - I can get the 
data in and get everything I want out of it.

Now the amount of XML is dynamic, so I have pushed the needed data into an 
array.

For example.

XML:

xml
data
item/item
/data
 data
item/item
 /data
/xml

The amount of data elements is dynamic (and there is a lot of other rubbish 
in the XML) so I've pushed all the data elements into an array.

So far, so good, I can cycle through the array and access the XML elements 
using Xpath.

The problem is - for each data element, I want to create a new instance of a 
MovieClip on the stage (thats already created in the library) and set varaibles 
inside it, and change it's X and Y positions.

No problems creating it - but I can't access the MovieClip! Because the data is 
dymanic, I need to be able to create x amount of MovieClips.

So I'm using the following code to do this:

//For each Data Element in the Array (x = 0; x  numDataElementsInArray; x++)
{
var newItemDividerName:String = itemDividerStageRecord +x;
attachMovie(itemDivider, newItemDividerName ,x);

//Now this all works, a newMovieClip is created on the stage (for as many 
elements as I have), 10 at the moment

}

Now the problem is - I then can't access the MovieClip dynamically. Basically I 
want to be able to access it by the variable name
i've just assigned it.

For example - I now have (when it is published), 10 elements on level0, named 
itemDividerStageRecord0-9.

So I want to set their cords. So what i've been doing is:

_root._level0.newItemDividerName._x = nextItemDivider; //nextItemDivider is a 
Number which does increment

And thats not working at all - nothing is changing.

I've traced it down to the name I'm using to access it - if in the same loop I 
put:

_root._level0.itemDividerStageRecord6._x = nextItemDivider;

That works for one MovieClip (obviously).

But I want to be able to access each MovieClip dynamically.

Is there any way to do this? I want to pass the instance name the varaible when 
setting the cord, not use the absolute element name newitemDividerName.

Please let me know if this is confusing, I can explain better!

Cheers.

-Jon-

___
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] New to the list - got a question

2006-08-02 Thread André Goliath
Use the Array operator liek this

var x = 6;
_root._level0.[itemDividerStageRecord+x]._x = nextItemDivider;

hth

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jon
Sent: Wednesday, August 02, 2006 2:45 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] New to the list - got a question

Hi All,

I'm new to the list, so appologies if I don't get the posting right on this
- but I have a question.

I'm trying to load in a set of XML data, manipulate it and then get it to
display on the stage. So far so good on the first two fronts - I can get the
data in and get everything I want out of it.

Now the amount of XML is dynamic, so I have pushed the needed data into an
array.

For example.

XML:

xml
data
item/item
/data
 data
item/item
 /data
/xml

The amount of data elements is dynamic (and there is a lot of other
rubbish in the XML) so I've pushed all the data elements into an array.

So far, so good, I can cycle through the array and access the XML elements
using Xpath.

The problem is - for each data element, I want to create a new instance of
a MovieClip on the stage (thats already created in the library) and set
varaibles inside it, and change it's X and Y positions.

No problems creating it - but I can't access the MovieClip! Because the data
is dymanic, I need to be able to create x amount of MovieClips.

So I'm using the following code to do this:

//For each Data Element in the Array (x = 0; x  numDataElementsInArray;
x++)
{
var newItemDividerName:String = itemDividerStageRecord +x;
attachMovie(itemDivider, newItemDividerName ,x);

//Now this all works, a newMovieClip is created on the stage (for as many
elements as I have), 10 at the moment

}

Now the problem is - I then can't access the MovieClip dynamically.
Basically I want to be able to access it by the variable name
i've just assigned it.

For example - I now have (when it is published), 10 elements on level0,
named itemDividerStageRecord0-9.

So I want to set their cords. So what i've been doing is:

_root._level0.newItemDividerName._x = nextItemDivider; //nextItemDivider is
a Number which does increment

And thats not working at all - nothing is changing.

I've traced it down to the name I'm using to access it - if in the same loop
I put:

_root._level0.itemDividerStageRecord6._x = nextItemDivider;

That works for one MovieClip (obviously).

But I want to be able to access each MovieClip dynamically.

Is there any way to do this? I want to pass the instance name the varaible
when setting the cord, not use the absolute element name
newitemDividerName.

Please let me know if this is confusing, I can explain better!

Cheers.

-Jon-

___
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] Overriding method FlashPaper

2006-08-02 Thread Jiri Heitlager
Hi I have a question. I am overridding the   goToLinkTarget () method of 
flashpaper object. The reason is that the links to pages, where not
opening in a new window. It works but somehow the anchors dont work 
anymore. I dont understand why because I am simply just forwarding the 
aguments. I hope someone can help me out.
 
Here is my code

code
var originalFlashPaperAPI={
  goToLinkTarget: fp_document.goToLinkTarget
} 
//override method
   fp_document.goToLinkTarget = function (linktarget:String, 
window:Object):Void {

   if (arguments[0].indexOf(anchor)0){
   
originalFlashPaperAPI.goToLinkTarget(linktarget,_blank)

   }else{
  //format is anchor:foo
   //but when harcoded it also doesnt work
   originalFlashPaperAPI.goToLinkTarget(linktarget)
   }

 }

/code

___
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] New to the list - got a question

2006-08-02 Thread Merrill, Jason
_root._level0.[

_root._level0?  

Just _level0 should suffice.  There's only 1 _level0.

Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of André Goliath
Sent: Wednesday, August 02, 2006 8:50 AM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] New to the list - got a question

Use the Array operator liek this

var x = 6;
_root._level0.[itemDividerStageRecord+x]._x = nextItemDivider;

hth

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jon
Sent: Wednesday, August 02, 2006 2:45 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] New to the list - got a question

Hi All,

I'm new to the list, so appologies if I don't get the posting right on this
- but I have a question.

I'm trying to load in a set of XML data, manipulate it and then get it to
display on the stage. So far so good on the first two fronts - I can get the
data in and get everything I want out of it.

Now the amount of XML is dynamic, so I have pushed the needed data into an
array.

For example.

XML:

xml
data
item/item
/data
 data
item/item
 /data
/xml

The amount of data elements is dynamic (and there is a lot of other
rubbish in the XML) so I've pushed all the data elements into an array.

So far, so good, I can cycle through the array and access the XML elements
using Xpath.

The problem is - for each data element, I want to create a new instance of
a MovieClip on the stage (thats already created in the library) and set
varaibles inside it, and change it's X and Y positions.

No problems creating it - but I can't access the MovieClip! Because the data
is dymanic, I need to be able to create x amount of MovieClips.

So I'm using the following code to do this:

//For each Data Element in the Array (x = 0; x  numDataElementsInArray;
x++)
{
var newItemDividerName:String = itemDividerStageRecord +x;
attachMovie(itemDivider, newItemDividerName ,x);

//Now this all works, a newMovieClip is created on the stage (for as many
elements as I have), 10 at the moment

}

Now the problem is - I then can't access the MovieClip dynamically.
Basically I want to be able to access it by the variable name
i've just assigned it.

For example - I now have (when it is published), 10 elements on level0,
named itemDividerStageRecord0-9.

So I want to set their cords. So what i've been doing is:

_root._level0.newItemDividerName._x = nextItemDivider; //nextItemDivider is
a Number which does increment

And thats not working at all - nothing is changing.

I've traced it down to the name I'm using to access it - if in the same loop
I put:

_root._level0.itemDividerStageRecord6._x = nextItemDivider;

That works for one MovieClip (obviously).

But I want to be able to access each MovieClip dynamically.

Is there any way to do this? I want to pass the instance name the varaible
when setting the cord, not use the absolute element name
newitemDividerName.

Please let me know if this is confusing, I can explain better!

Cheers.

-Jon-

___
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] New to the list - got a question

2006-08-02 Thread André Goliath
yeah, sorry, damn copypaste ;) 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: Wednesday, August 02, 2006 2:53 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] New to the list - got a question

_root._level0.[

_root._level0?  

Just _level0 should suffice.  There's only 1 _level0.

Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of André Goliath
Sent: Wednesday, August 02, 2006 8:50 AM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] New to the list - got a question

Use the Array operator liek this

var x = 6;
_root._level0.[itemDividerStageRecord+x]._x = nextItemDivider;

hth

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jon
Sent: Wednesday, August 02, 2006 2:45 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] New to the list - got a question

Hi All,

I'm new to the list, so appologies if I don't get the posting right on
this
- but I have a question.

I'm trying to load in a set of XML data, manipulate it and then get it to
display on the stage. So far so good on the first two fronts - I can get
the
data in and get everything I want out of it.

Now the amount of XML is dynamic, so I have pushed the needed data into an
array.

For example.

XML:

xml
data
item/item
/data
 data
item/item
 /data
/xml

The amount of data elements is dynamic (and there is a lot of other
rubbish in the XML) so I've pushed all the data elements into an array.

So far, so good, I can cycle through the array and access the XML elements
using Xpath.

The problem is - for each data element, I want to create a new instance
of
a MovieClip on the stage (thats already created in the library) and set
varaibles inside it, and change it's X and Y positions.

No problems creating it - but I can't access the MovieClip! Because the
data
is dymanic, I need to be able to create x amount of MovieClips.

So I'm using the following code to do this:

//For each Data Element in the Array (x = 0; x  numDataElementsInArray;
x++)
{
var newItemDividerName:String = itemDividerStageRecord +x;
attachMovie(itemDivider, newItemDividerName ,x);

//Now this all works, a newMovieClip is created on the stage (for as many
elements as I have), 10 at the moment

}

Now the problem is - I then can't access the MovieClip dynamically.
Basically I want to be able to access it by the variable name
i've just assigned it.

For example - I now have (when it is published), 10 elements on level0,
named itemDividerStageRecord0-9.

So I want to set their cords. So what i've been doing is:

_root._level0.newItemDividerName._x = nextItemDivider; //nextItemDivider
is
a Number which does increment

And thats not working at all - nothing is changing.

I've traced it down to the name I'm using to access it - if in the same
loop
I put:

_root._level0.itemDividerStageRecord6._x = nextItemDivider;

That works for one MovieClip (obviously).

But I want to be able to access each MovieClip dynamically.

Is there any way to do this? I want to pass the instance name the varaible
when setting the cord, not use the absolute element name
newitemDividerName.

Please let me know if this is confusing, I can explain better!

Cheers.

-Jon-

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] New to the list - got a question 2

2006-08-02 Thread Jon
Cheers Jason,

Unfortunately I have no control over the XML produced.

The code you provided didn't work. 

_root._level0.[itemDividerStageRecord+x]._x = nextItemDivider;

I get an error when compiling the actionscript now - 

Expected a field name after '.' operator.

-Jon-

___
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 / JavaScript Proxy - Paramteters undefined

2006-08-02 Thread Andreas Stephan

Hi,
I have been trying to communicate between JS and Flash using the 
JS/Flash integration kit from osflash.org.
Communication from AS to JS works fine, I am having problems with JS to 
AS communication though: anytime I try to access an AS function from JS, 
none of my parameters I try to pass to the AS-function are actually 
recognized. Is there a trick to this? Maybe it is a scope problem? I am 
not sure, but I cannot see a reason why this is not working.


Here is a very reduced version of my AS-Code:

 Class FlvPlayer
import mx.video.FLVPlayback;
import mx.utils.*;
import com.macromedia.javascript.JavaScriptProxy;

class FlvPlayer{
  var jsProxy:JavaScriptProxy;
//Constructor Method
  function FlvPlayer(flvPlaybackInstance:FLVPlayback) {
  jsProxy = new JavaScriptProxy(_root.lcId, this);}
  //is called from JS and is supposed to load the new file, but 
does not receive any arguments -- all the vars are undefined

  function loadNewFiles(item){
  _root.debug(item + ' / vFile: '+ item.videoFile +/ cpFile:+ 
item.cuePointsFile);  }

//called when a cuePoint is reached -- as2js com works fine
  function cuePointReached(evtObj:Object){//call a js 
funciton in page, that displays the tiel and description
  jsProxy.call(displayDescription, 
cuePointData[currentCuePoint].title,  
cuePointData[currentCuePoint].description);  currentCuePoint++;

  }
}

-- the call inside my JS-File:
var dataObj = {movieUrl:'test', 
cuePointFileUrl:cuePointFileUrl};  
flashProxy.call('loadNewFiles', dataObj);


the function is called correctly but none of the parameters are passed, 
dataObj is 'undefined' when I trace it.

Any help is greatly appreciated.

Cheers,
Andreas Stephan
___
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] Strange Radio Button Behavior Problem

2006-08-02 Thread Randal
Thanks so much for your insight here -- it was indeed correct that the radio 
buttons were being triggered after the onclick handler. Your script does also 
work -- thanks!

I had found my script at:

http://www.adobe.com/go/tn_15174

Which is pretty old, but since I was trying to export to an older flash format 
I thought it should work. Did this script EVER work?

-- Randal


At 4:57 PM -0500 8/1/06, phaedrus wrote:
The radio button is changing state after the clip event fires.  Because of
this:

When you first click High, nothing has been set yet.  After the event is
done, the High radio button gets set on.

The next time you check, the High radio button is on when the clip event
is fired and this is reported, regardless of which you clicked on.  After
the clip event is done firing, the new state gets set.

And so on. 

If you're not committed to adding the script to the container movie clip,
you can try the following (based on the docs here:
http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/js/html/wwhelp.ht
m?href=Part4_ASLR2.html )


Name the movie clip containing your buttons (eg: mcSpeedbuttons).
Alternatively, this clip isn't necessary and the buttons can be put on the
main timeline w/o a container.

I changed the data parameter on the buttons from speed to High and
Low, respectively.

I named the empty top layer in your flash app actions and added the
following actionscript to the first frame of the timeline in that layer:

speedButtonListener = new Object();
speedButtonListener.click = function (evt) {
   trace(You selected  + evt.target.selection.data);
   dyntext.text = evt.target.selection.data;
}

mcSpeedbuttons.buttonGroup.addEventListener(click,speedButtonListener);

Testing the app, it seems to work like this.

- phaedrus

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Randal
Sent: Tuesday, August 01, 2006 4:30 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Strange Radio Button Behavior Problem

I have come across what looks like a bug to me in the behavior of the
radiobutton component in Flash 8 Pro.

I have posted a movie at:

http://huntingdesign.com/radioproblem/radioproblem.html

And the source FLA at:

http://huntingdesign.com/radioproblem/radioproblem.fla


Here is the code applied to the movieclip that contains the radio buttons:

onClipEvent (mouseDown) {
  if(hitTest(_root._xmouse, _root._ymouse, false)) {
for (item in this) {
  rButton = this[item];
  if (rButton.getState()) {
   trace (You selected +rButton.getLabel());
   _root.dyntext.text = rButton.getLabel();
   
  }
}
  }
}

This is taken pretty much straight from the Macromedia docs on radio
buttons. The behavior I see is that with one click nothing happens. With
another click the selected button get darkened, but no label is reported to
the dynamic text area or to the trace. Then with a click on the other radio
button the PREVIOUSLY SELECTED button now is reported. After that point
always the previously selected button is always reported, so if you click on
a button multiple times it reports the other button first then itself.

All I am trying to do here is create a simple interface to toggle between
two states in a movie, which I thought would be a logical use for radio
buttons -- but this is really frustrating.


___
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] New to the list - got a question

2006-08-02 Thread Giles Taylor
Why not use:

var myMovie_mc:MovieClip = attachMovie(itemDivider, newItemDividerName
,x);

Then you can set the properties by doing:

myMovie_mc._x = nextItemDivider ;

Giles

P.S. Best to stick to one subject name for each question on the list
because the list archive will then be able to tie the discussion
together when searching

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jon
Sent: 02 August 2006 13:45
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] New to the list - got a question

Hi All,

I'm new to the list, so appologies if I don't get the posting right on
this - but I have a question.

I'm trying to load in a set of XML data, manipulate it and then get it
to display on the stage. So far so good on the first two fronts - I can
get the data in and get everything I want out of it.

Now the amount of XML is dynamic, so I have pushed the needed data into
an array.

For example.

XML:

xml
data
item/item
/data
 data
item/item
 /data
/xml

The amount of data elements is dynamic (and there is a lot of other
rubbish in the XML) so I've pushed all the data elements into an
array.

So far, so good, I can cycle through the array and access the XML
elements using Xpath.

The problem is - for each data element, I want to create a new
instance of a MovieClip on the stage (thats already created in the
library) and set varaibles inside it, and change it's X and Y positions.

No problems creating it - but I can't access the MovieClip! Because the
data is dymanic, I need to be able to create x amount of MovieClips.

So I'm using the following code to do this:

//For each Data Element in the Array (x = 0; x  numDataElementsInArray;
x++) {
var newItemDividerName:String = itemDividerStageRecord +x;
attachMovie(itemDivider, newItemDividerName ,x);

//Now this all works, a newMovieClip is created on the stage (for as
many elements as I have), 10 at the moment

}

Now the problem is - I then can't access the MovieClip dynamically.
Basically I want to be able to access it by the variable name i've just
assigned it.

For example - I now have (when it is published), 10 elements on level0,
named itemDividerStageRecord0-9.

So I want to set their cords. So what i've been doing is:

_root._level0.newItemDividerName._x = nextItemDivider; //nextItemDivider
is a Number which does increment

And thats not working at all - nothing is changing.

I've traced it down to the name I'm using to access it - if in the same
loop I put:

_root._level0.itemDividerStageRecord6._x = nextItemDivider;

That works for one MovieClip (obviously).

But I want to be able to access each MovieClip dynamically.

Is there any way to do this? I want to pass the instance name the
varaible when setting the cord, not use the absolute element name
newitemDividerName.

Please let me know if this is confusing, I can explain better!

Cheers.

-Jon-

___
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] New to the list - got a question 2

2006-08-02 Thread Merrill, Jason
Cheers Jason,

Unfortunately I have no control over the XML produced.

The code you provided didn't work.

_root._level0.[itemDividerStageRecord+x]._x = nextItemDivider;

Uh, I didn't provide that code.  That was André.

But it should work if you have:

_level0.[itemDividerStageRecord+x]._x = nextItemDivider;

Then nextItemDivder should be equal to:

_level0.itemDividerStageRecord0._x
_level0.itemDividerStageRecord1._x
_level0.itemDividerStageRecord2._x
_level0.itemDividerStageRecord3._x
_level0.itemDividerStageRecord4._x
etc.  

If you have your instances named as such and your loop is working.


Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Jon
Sent: Wednesday, August 02, 2006 9:19 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] New to the list - got a question 2

Cheers Jason,

Unfortunately I have no control over the XML produced.

The code you provided didn't work.

_root._level0.[itemDividerStageRecord+x]._x = nextItemDivider;

I get an error when compiling the actionscript now -

Expected a field name after '.' operator.

-Jon-

___
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] New to the list - got a question 2

2006-08-02 Thread Adrian Park

try:

_level0[itemDividerStageRecord+x]._x

(note: removed '.' after _level0).

HTH
Adrian

On 8/2/06, Jon [EMAIL PROTECTED] wrote:


Cheers Jason,

Unfortunately I have no control over the XML produced.

The code you provided didn't work.

_root._level0.[itemDividerStageRecord+x]._x = nextItemDivider;

I get an error when compiling the actionscript now -

Expected a field name after '.' operator.

-Jon-

___
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] New to the list - got a question 2

2006-08-02 Thread Merrill, Jason
_level0[
(note: removed '.' after _level0).

Oops - yeah, I meant that too!

Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Adrian Park
Sent: Wednesday, August 02, 2006 9:30 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] New to the list - got a question 2

try:

_level0[itemDividerStageRecord+x]._x

(note: removed '.' after _level0).

HTH
Adrian

On 8/2/06, Jon [EMAIL PROTECTED] wrote:

 Cheers Jason,

 Unfortunately I have no control over the XML produced.

 The code you provided didn't work.

 _root._level0.[itemDividerStageRecord+x]._x = nextItemDivider;

 I get an error when compiling the actionscript now -

 Expected a field name after '.' operator.

 -Jon-

 ___
 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] Re: New to the list - got a question 2

2006-08-02 Thread Jon
I have now manage to get this working - using the following code:

setProperty(newItemDividerName, _x , nextItemDividerX);

Although why wouldn't my previous code work?

Regards,


-Jon-

___
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] x,y coordinates of a character

2006-08-02 Thread Robert Gordon
Hey List!

I'm trying to find a way to determine the stage coordinates of a character
within a dynamically constructed text field (multiline, wrapping, html
formated). I've experimented with Erik's TextFieldExtension - but the html
formatting  wrapping seem to throw it off. Anyone have another solution?
One thought I had was to recolor the field to white, colour the character of
interest to non-white, convert to a bitmap object and walk it pixel by
pixel. Can't imagine that's going to be very efficient though...

Thanks in advance for any suggestions,

r o b


| Robert Gordon
| The Article 19 Group Inc.
| phone: 514.938.8512
| email: [EMAIL PROTECTED]
| http://www.article19.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] x,y coordinates of a character

2006-08-02 Thread John Mark Hawley
Can you make your life easier and use a monospace font?

 
 From: Robert Gordon [EMAIL PROTECTED]
 Date: 2006/08/02 Wed AM 09:12:10 CDT
 To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] x,y coordinates of a character
 
 Hey List!
 
 I'm trying to find a way to determine the stage coordinates of a character
 within a dynamically constructed text field (multiline, wrapping, html
 formated). I've experimented with Erik's TextFieldExtension - but the html
 formatting  wrapping seem to throw it off. Anyone have another solution?
 One thought I had was to recolor the field to white, colour the character of
 interest to non-white, convert to a bitmap object and walk it pixel by
 pixel. Can't imagine that's going to be very efficient though...
 
 Thanks in advance for any suggestions,
 
 r o b
 
 
 | Robert Gordon
 | The Article 19 Group Inc.
 | phone: 514.938.8512
 | email: [EMAIL PROTECTED]
 | http://www.article19.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
 

--
John Mark Hawley
The Nilbog Group
773.968.4980 (cell)

___
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] Re: New to the list - got a question 2

2006-08-02 Thread Merrill, Jason
setProperty is oldschool - I think Flash 4.  You certainly shouldn't
have to use that. 

Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Jon
Sent: Wednesday, August 02, 2006 10:08 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Re: New to the list - got a question 2

I have now manage to get this working - using the following code:

setProperty(newItemDividerName, _x , nextItemDividerX);

Although why wouldn't my previous code work?

Regards,


-Jon-

___
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] Ignoring error in code on compile

2006-08-02 Thread Ramon Miguel M. Tayag

On 8/2/06, Martin Wood [EMAIL PROTECTED] wrote:

do you mean that you want to compile those classes seperately but are getting
errors when they are referenced?


Yup.  Since the class has to be compiled into a swf file eventually.


You could create interfaces for the classes and code to that.


Ahh.. yes, that's true.  I could make it an interface.  Thanks!  Will
try it out.



martin


--
Ramon Miguel M. Tayag
___
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] x,y coordinates of a character

2006-08-02 Thread janosch
When using Flash 8, you can use the Method 
BitmapData.getColorBoundsRect, that will be faster.


Janosch



Robert Gordon schrieb:


Hey List!

I'm trying to find a way to determine the stage coordinates of a character
within a dynamically constructed text field (multiline, wrapping, html
formated). I've experimented with Erik's TextFieldExtension - but the html
formatting  wrapping seem to throw it off. Anyone have another solution?
One thought I had was to recolor the field to white, colour the character of
interest to non-white, convert to a bitmap object and walk it pixel by
pixel. Can't imagine that's going to be very efficient though...

Thanks in advance for any suggestions,

r o b


| Robert Gordon
| The Article 19 Group Inc.
| phone: 514.938.8512
| email: [EMAIL PROTECTED]
| http://www.article19.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] Possible Challenge: AS 3.0 Compiler :)

2006-08-02 Thread John Giotta

It maybe too soon for anyone to have a full grasp on AMF or SWF specs
of an AS3.0 SWF but I wonder if its possible to create a crude
compiler from AS3.0.

AS3.0 ouroboros of sorts.
___
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] tweening multiple properties simultaneously

2006-08-02 Thread Matthew Ganz

thanks for the links.

enrico - i tried scaling first and it didn't work, and rich, i tried the 
TweenExtend class and that also didn't work. i'm still getting the same 
results. the zooming in works but my tweens of the 'x' and 'y' is not 
working anymore.


below is my function. can you see s/thing in the way i'm calculating the 
displacement for 'nX' and 'nY' that may be the cause of the problem?


thanks for lending a hand. very much appreciated.

public function zoomIn(activeState:MovieClip)
{
 var nX:Number = (Stage.width/2) - activeState._xmouse; // activeState is 
reference to US map mc.

 var nY:Number = (Stage.height/2) - activeState._ymouse;

 // zoom in to the selected state.
 new Tween( activeState, _x, Strong.easeOut, activeState._x, nX, 2, 
true );
 new Tween( activeState, _y, Strong.easeOut, activeState._y, nY, 2, 
true );


 // zoom into the map
 new Tween( activeState, _xscale, Strong.easeOut, activeState._xscale, 
200, 2, true );
 new Tween( activeState, _yscale, Strong.easeOut, activeState._yscale, 
200, 2, true );

}
- Original Message - 
From: Rich Rodecker [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Tuesday, August 01, 2006 12:20 PM
Subject: Re: [Flashcoders] tweening multiple properties simultaneously


there is a class out there called TweenExtended...it works exaclty the 
same

way as the Tween class, excpet you pass in arrays for the properties you
want to tween, and their corresponding starts/finish values.

http://www.sqcircle.com/downloads/




On 8/1/06, Matthew Ganz [EMAIL PROTECTED] wrote:


hi.

i'm using the tween class to move a map movie clip's x and y properties.
so whichever state the user clicks on my US map movieClip, it gets 
centered

on the stage.  it works great like this:

public function expand(activeState:MovieClip)
{
  var nX:Number = (Stage.width/2) - activeState._xmouse;
  var nY:Number = (Stage.height/2) - activeState._ymouse;

  // move it to the center of the stage.
  new Tween( activeState, _x, Strong.easeOut, activeState._x, nX, 2,
true );
  new Tween( activeState, _y, Strong.easeOut, activeState._y, nY, 2,
true );
}

the problem comes when i introduce two new tweens to scale the map as
well. the result is that the x and y don't appear to move but the scale
tween does work.

public function expand(activeState:MovieClip)
{
  var nX:Number = (Stage.width/2) - activeState._xmouse;
  var nY:Number = (Stage.height/2) - activeState._ymouse;

  // move it to the center of the stage.
  new Tween( activeState, _x, Strong.easeOut, activeState._x, nX, 2,
true );
  new Tween( activeState, _y, Strong.easeOut, activeState._y, nY, 2,
true );

  // zoom into the map
  new Tween( activeState, _xscale, Regular.easeOut, 
activeState._xscale,

500, 2, true );
  new Tween( activeState, _yscale, Regular.easeOut, 
activeState._yscale,

500, 2, true );
}

are there problems tweening multiple properties at once? has anyone
experienced this before?

thank you. -- matt.
___
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] x,y coordinates of a character

2006-08-02 Thread Robert Gordon
Wish I could ... But I need the formatting...

r o b


| Robert Gordon
| The Article 19 Group Inc.
| phone: 514.938.8512
| email: [EMAIL PROTECTED]
| http://www.article19.com


 From: John Mark Hawley [EMAIL PROTECTED]
 Organization: Nilbog
 Reply-To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Date: Wed, 2 Aug 2006 9:17:15 -0500
 To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Subject: Re: [Flashcoders] x,y coordinates of a character
 
 Can you make your life easier and use a monospace font?
 
 
 From: Robert Gordon [EMAIL PROTECTED]
 Date: 2006/08/02 Wed AM 09:12:10 CDT
 To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] x,y coordinates of a character
 
 Hey List!
 
 I'm trying to find a way to determine the stage coordinates of a character
 within a dynamically constructed text field (multiline, wrapping, html
 formated). I've experimented with Erik's TextFieldExtension - but the html
 formatting  wrapping seem to throw it off. Anyone have another solution?
 One thought I had was to recolor the field to white, colour the character of
 interest to non-white, convert to a bitmap object and walk it pixel by
 pixel. Can't imagine that's going to be very efficient though...
 
 Thanks in advance for any suggestions,
 
 r o b
 
 
 | Robert Gordon
 | The Article 19 Group Inc.
 | phone: 514.938.8512
 | email: [EMAIL PROTECTED]
 | http://www.article19.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
 
 
 --
 John Mark Hawley
 The Nilbog Group
 773.968.4980 (cell)
 
 ___
 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: Re: [Flashcoders] x,y coordinates of a character

2006-08-02 Thread John Mark Hawley
I think you're stuck with either mucking with bitmaps or measuring the width of 
each character, the kerning between each pair, the line heights...(hope you at 
least stick with one font size and one font for these text fields if you're 
working in Flash 7 or lower, and forget about Unicode)

 
 From: Robert Gordon [EMAIL PROTECTED]
 Date: 2006/08/02 Wed AM 09:56:38 CDT
 To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Subject: Re: [Flashcoders] x,y coordinates of a character
 
 Wish I could ... But I need the formatting...
 
 r o b
 
 
 | Robert Gordon
 | The Article 19 Group Inc.
 | phone: 514.938.8512
 | email: [EMAIL PROTECTED]
 | http://www.article19.com
 
 
  From: John Mark Hawley [EMAIL PROTECTED]
  Organization: Nilbog
  Reply-To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
  Date: Wed, 2 Aug 2006 9:17:15 -0500
  To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
  Subject: Re: [Flashcoders] x,y coordinates of a character
  
  Can you make your life easier and use a monospace font?
  
  
  From: Robert Gordon [EMAIL PROTECTED]
  Date: 2006/08/02 Wed AM 09:12:10 CDT
  To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
  Subject: [Flashcoders] x,y coordinates of a character
  
  Hey List!
  
  I'm trying to find a way to determine the stage coordinates of a character
  within a dynamically constructed text field (multiline, wrapping, html
  formated). I've experimented with Erik's TextFieldExtension - but the html
  formatting  wrapping seem to throw it off. Anyone have another solution?
  One thought I had was to recolor the field to white, colour the character 
  of
  interest to non-white, convert to a bitmap object and walk it pixel by
  pixel. Can't imagine that's going to be very efficient though...
  
  Thanks in advance for any suggestions,
  
  r o b
  
  
  | Robert Gordon
  | The Article 19 Group Inc.
  | phone: 514.938.8512
  | email: [EMAIL PROTECTED]
  | http://www.article19.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
  
  
  --
  John Mark Hawley
  The Nilbog Group
  773.968.4980 (cell)
  
  ___
  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
 

--
John Mark Hawley
The Nilbog Group
773.968.4980 (cell)

___
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] tweening multiple properties simultaneously

2006-08-02 Thread Merrill, Jason
Haven't followed the thread close, but maybe wrap it up in a static
class like this - call your custom function which has all the tweens
combined.  This is what I do, works for me.  Something like this:

//file Animate.as in actionscriptclasspath/com/boa/effects/

import mx.transitions.Tween;
import mx.transitions.easing.*;

class com.boa.effects.Animate{
   public static function myFade(clip:MovieClip, time:Number,
xscale:Number, yscale:Number):Array{
  var a:Object = new Tween(clip, _alpha, Regular.easeIn, 0, 100,
time, true);
  var b:Object = new Tween(clip, _xscale, Regular.easeIn, xscale,
100, time, true);
  var c:Object = new Tween(clip, _yscale, Regular.easeIn, yscale,
100, time, true);
  //returnArray is just an array of the tweens 
  //so you can check to see if they are done:
  var returnArray:Array = new Array(a,b,c)
  return returnArray;
  } 
}


//.fla and/or other class usage:

import.com.boa.effects.Animate;
Animate.myFade(myClip, .5, 50, 50)


Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
___
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] how to hide your AS 2.0 from flash leech software

2006-08-02 Thread Christian Pugliese
anybody knows some effective way to make your classes hidden from that 
flash's leech softwares? like so-think...



___
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] Local Video Window and VU meter

2006-08-02 Thread jon
Hi,
 We are looking for a resource to build a simple 320x240 video window that
displays an uncropped image from a local camera source, along with a
simple VU meter that displays the level from a local microphone. Pretty
basic. If you got the chops, drop me a note and we'll make something
happen. Include your rate, any samples and an estimate of effort to be
considered. We would like this done in the next 1-2 weeks.

 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] Security Violation with FLV loading using NetConnection

2006-08-02 Thread Cedric Muller

A.swf: (local, on HD)
loads in B.swf (remote, on www.mydomain.com/dir/B.swf)
using a MovieClipLoader

B.swf starts a NetConnection to stream a FLV (from same domain,  
www.mydomain.com/dir/files/movies/any.flv)


This works nicely if I compile B.swf and test (I see the FLV being  
played)
now, if I upload B.swf on 'www.mydomain.com/dir/B.swf' and launch  
A.swf from the local drive, this just fails with the following DUMB  
message:


*** Security Violation ***
Connection interrupted with null - forbidden operation from  
www.mydomain.com/dir/B.swf

-- distant SWF files don't have access to local files.

I am in a localTrusted sandbox, and using MovieClipLoader +  
allowDomain always went fine for me.


here is all the code in B.swf:
var netConn = new NetConnection();
netConn.connect(null);
var netStream = new NetStream(netConn);
var link = http://www.mydomain.com/dir/files/movies/any.flv;;
netStream.onStatus = function(info) {
}
this.video_player.attachVideo(netStream);
this.video_player.smoothing = true;
netStream.setBufferTime(5);
netStream.play(link);

(nb: this is the basic code for loading FLVs by creating a local stream)


How can I deal with 'null' ?
null is required for streaming FLV files without connecting to a FMS  
(ex FCS) server (see live docs)

netConn.connect(null)
but then it fails the whole thing

of course, I did System.security.allowDomain(*);

What SHOULD I consider now ?
I am suspecting the connect method to pass the argument whatever it  
is ... by passing 'null' Flash still tries to establish a connection,  
hence my problem.
I was thinking someone did hack the NetConnection class (but I  
couldn't find any hacked NetConnection), what else ?

thanks in advance,
Cedric
___
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