Re: [Flashcoders] Help Getting Size of Text Dynamically

2006-08-17 Thread Aaron Roberson

I'm half way there...

I figured out how to resize the movie clip based on the length of the
text being loaded from the name attribute of the xml node. I added the
following line to my code:

curr_item.name.autoSize = left;

Now I need to figure out how to make the spacing between each menu
item 15px. Sounds simple, and is for others, but now that each movie
clip is a different size I'm not sure how to do that. Any help on that
would be appreciated!

-Aaron

On 8/17/06, Elena Blanco [EMAIL PROTECTED] wrote:

By size, are you referring to the length of the text (in this case the
name?)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aaron
Roberson
Sent: Thursday, August 17, 2006 1:55 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Help Getting Size of Text Dynamically

I am creating a dynamic drop down menu using XML and I am having
trouble spacing out each menu item.

Is there a way of determing the size of the text in each xml node?

Thanks for your help,
Aaron

P.S. This menu is based on a tutorial at kirupa.com.

Here is the XML:

?xml version=1.0 encoding=iso-8859-1?
menu name=navigation
item name=Home link=http://whitehorsemedia.com; /
menu name=About Us
link=http://whitehorsemedia.com/about/index.cfm;
item name=Our Name
link=http://whitehorsemedia.com/about/name.cfm; /
item name=News
link=http://whitehorsemedia.com/about/news.cfm; /
item name=We Believe
link=http://whitehorsemedia.com/about/believe.cfm; /
item name=Staff
link=http://whitehorsemedia.com/about/staff.cfm; /
item name=Projects
link=http://whitehorsemedia.com/about/projects.cfm; /
/menu
/menu

Here is the ActionScript:


// generates a list of menu items (effectively one menu)
// given the inputted parameters.  This makes the main menu
// as well as any of the submenus
GenerateMenu = function(container, name, x, y, depth, node_xml) {
// variable declarations
var curr_node;
var curr_item;
var curr_menu = container.createEmptyMovieClip(name, depth);

// for all items or XML nodes (items and menus)
// within this node_xml passed for this menu
for (var i=0; inode_xml.childNodes.length; i++) {
// movieclip for each menu item
curr_item = curr_menu.attachMovie(menuitem,item+i+_mc,
i);
curr_item._x = x + i*curr_item._width;
curr_item._y = y;
curr_item.trackAsMenu = true;

// item properties assigned from XML
curr_node = node_xml.childNodes[i];
curr_item.link = curr_node.attributes.link;
curr_item.name.text = curr_node.attributes.name;

// item submenu behavior for rollover event
if (node_xml.childNodes[i].nodeName == menu){
// open a submenu
curr_item.node_xml = curr_node;
curr_item.onRollOver = curr_item.onDragOver =
function(){
var x = 200;
var y = this._y + this._height;
GenerateMenu(curr_menu, submenu_mc, x, y,
1000, this.node_xml);
// show a hover color
var col = new Color(this.background);
col.setRGB(0xf4faff);
};
}else{ // nodeName == item
curr_item.arrow._visible = false;
// close existing submenu
curr_item.onRollOver = curr_item.onDragOver =
function(){
curr_menu.submenu_mc.removeMovieClip();
// show a hover color
var col = new Color(this.background);
col.setRGB(0xf4faff);
};
}

curr_item.onRollOut = curr_item.onDragOut = function(){
// restore color
var col = new Color(this.background);

col.setTransform({ra:100,rb:0,ga:100,gb:0,ba:100,bb:0});
};

// any item, menu opening or not can have actions
curr_item.onRelease = function(){
Actions[goToURL](this.link);
CloseSubmenus();
};
} // end for loop
};

// create the main menu, this will be constantly visible
CreateMainMenu = function(x, y, depth, menu_xml){
// generate a menu list
GenerateMenu(this, mainmenu_mc, x, y, depth, menu_xml.firstChild);
// close only submenus if visible durring a mouseup
// this main menu (mainmenu_mc) will remain
mainmenu_mc.onMouseUp = function(){
if (mainmenu_mc.submenu_mc 
!mainmenu_mc.hitTest(_root

Re: [Flashcoders] Help Getting Size of Text Dynamically

2006-08-17 Thread Aaron Roberson

Jason,

I used textfield.autoSize = left which seems to fix half of my
problem. Maybe I can use textfield.textWidth to fix the other half -
which is to get the menu items to be evenly spaced from one another
and not spaced on a static value.

I post back...

Aaron

P.S. That textfield is name.

On 8/17/06, Merrill, Jason [EMAIL PROTECTED] wrote:

XML is actually not relevant to the question here.  Only the text string
you get from it is.  Once the text string is in a TextField, you should
just be able to use the TextField.textWidth property.

Jason Merrill
Bank of America
Learning  Organization Effectiveness - Technology Solutions






-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Aaron Roberson
Sent: Thursday, August 17, 2006 4:55 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Help Getting Size of Text Dynamically

I am creating a dynamic drop down menu using XML and I am having
trouble spacing out each menu item.

Is there a way of determing the size of the text in each xml node?

Thanks for your help,
Aaron

P.S. This menu is based on a tutorial at kirupa.com.

Here is the XML:

?xml version=1.0 encoding=iso-8859-1?
menu name=navigation
  item name=Home link=http://whitehorsemedia.com; /
  menu name=About Us
link=http://whitehorsemedia.com/about/index.cfm;
  item name=Our Name
link=http://whitehorsemedia.com/about/name.cfm; /
  item name=News
link=http://whitehorsemedia.com/about/news.cfm; /
  item name=We Believe
link=http://whitehorsemedia.com/about/believe.cfm; /
  item name=Staff
link=http://whitehorsemedia.com/about/staff.cfm; /
  item name=Projects
link=http://whitehorsemedia.com/about/projects.cfm; /
  /menu
/menu

Here is the ActionScript:


// generates a list of menu items (effectively one menu)
// given the inputted parameters.  This makes the main menu
// as well as any of the submenus
GenerateMenu = function(container, name, x, y, depth, node_xml) {
  // variable declarations
  var curr_node;
  var curr_item;
  var curr_menu = container.createEmptyMovieClip(name, depth);

  // for all items or XML nodes (items and menus)
  // within this node_xml passed for this menu
  for (var i=0; inode_xml.childNodes.length; i++) {
  // movieclip for each menu item
  curr_item =
curr_menu.attachMovie(menuitem,item+i+_mc,
i);
  curr_item._x = x + i*curr_item._width;
  curr_item._y = y;
  curr_item.trackAsMenu = true;

  // item properties assigned from XML
  curr_node = node_xml.childNodes[i];
  curr_item.link = curr_node.attributes.link;
  curr_item.name.text = curr_node.attributes.name;

  // item submenu behavior for rollover event
  if (node_xml.childNodes[i].nodeName == menu){
  // open a submenu
  curr_item.node_xml = curr_node;
  curr_item.onRollOver = curr_item.onDragOver =
function(){
  var x = 200;
  var y = this._y + this._height;
  GenerateMenu(curr_menu, submenu_mc, x,
y,
1000, this.node_xml);
  // show a hover color
  var col = new Color(this.background);
  col.setRGB(0xf4faff);
  };
  }else{ // nodeName == item
  curr_item.arrow._visible = false;
  // close existing submenu
  curr_item.onRollOver = curr_item.onDragOver =
function(){
  curr_menu.submenu_mc.removeMovieClip();
  // show a hover color
  var col = new Color(this.background);
  col.setRGB(0xf4faff);
  };
  }

  curr_item.onRollOut = curr_item.onDragOut = function(){
  // restore color
  var col = new Color(this.background);

col.setTransform({ra:100,rb:0,ga:100,gb:0,ba:100,bb:0});
  };

  // any item, menu opening or not can have actions
  curr_item.onRelease = function(){
  Actions[goToURL](this.link);
  CloseSubmenus();
  };
  } // end for loop
};

// create the main menu, this will be constantly visible
CreateMainMenu = function(x, y, depth, menu_xml){
  // generate a menu list
  GenerateMenu(this, mainmenu_mc, x, y, depth,
menu_xml.firstChild);
  // close only submenus if visible durring a mouseup
  // this main menu (mainmenu_mc) will remain
  mainmenu_mc.onMouseUp = function(){
  if (mainmenu_mc.submenu_mc 
!mainmenu_mc.hitTest(_root._xmouse,
_root._ymouse, true

Re: [Flashcoders] Help Getting Size of Text Dynamically

2006-08-17 Thread Aaron Roberson

Elena,

Option 2 is exactly the track I am currently taking!

I am having a hard time adjusting the width of the movie clip based on
the length of the text after setting it to auto size. Can you help?

Here is my code:

for (var i=0; inode_xml.childNodes.length; i++) {
// movieclip for each menu item
curr_item = curr_menu.attachMovie(menuitem,item+i+_mc, i);
curr_item.name.autoSize = left;
curr_item._width = curr_item.name.textWidth;
curr_item._x = x + i*curr_item._width;
curr_item._y = y;
curr_item.trackAsMenu = true;
// truncated

Thanks,
Aaron

P.S. Option #2 is:

quoteYou could set autosize = true for the dynamic text field, then retrieve
the length of the text field once populated with the text, the adjust the
width of the movie clip based on it.. all on the fly./quote


On 8/17/06, Elena Blanco [EMAIL PROTECTED] wrote:

A couple of ideas that pop in my mind

1. You can store the name in a temporary string and get the length of it
with string.length - then change the width of the movie clip accordingly
2. You could set autosize = true for the dynamic text field, then retrieve
the length of the text field once populated with the text, the adjust the
width of the movie clip based on it.. all on the fly.

Let me know if any helps!

ELENA BLANCO
Blancomedia
WEB APPLICATION ARCHITECT
920 HULL STREET
HOOD RIVER, OR 97031
p: 541.490.4993
e: [EMAIL PROTECTED]
w: http://www.blancomedia.com


-Original Message-
From: Aaron Roberson [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 17, 2006 2:13 PM
To: [EMAIL PROTECTED]
Subject: Re: [Flashcoders] Help Getting Size of Text Dynamically

Yes, I am referring to the length of the text in the name attribute of
the xml nodes.

The script is creating a new movie clip based on an existing movie
clip in the library. The movie clip in the library (menuitem) has an a
movie clip (arrow) and a dynamic text field (name). When the script
creates the new movie clips for each menu item, instead of making them
the width of the text, they are the width of the movie clip in the
library. The width of the movie clip in the library is based on the
text inside, which makes me think that I could change the width of the
generated movie clips based on the text loaded from xml.

I hope that makes sense!

On 8/17/06, Elena Blanco [EMAIL PROTECTED] wrote:
 By size, are you referring to the length of the text (in this case the
 name?)

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Aaron
 Roberson
 Sent: Thursday, August 17, 2006 1:55 PM
 To: flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] Help Getting Size of Text Dynamically

 I am creating a dynamic drop down menu using XML and I am having
 trouble spacing out each menu item.

 Is there a way of determing the size of the text in each xml node?

 Thanks for your help,
 Aaron

 P.S. This menu is based on a tutorial at kirupa.com.

 Here is the XML:

 ?xml version=1.0 encoding=iso-8859-1?
 menu name=navigation
 item name=Home link=http://whitehorsemedia.com; /
 menu name=About Us
 link=http://whitehorsemedia.com/about/index.cfm;
 item name=Our Name
 link=http://whitehorsemedia.com/about/name.cfm; /
 item name=News
 link=http://whitehorsemedia.com/about/news.cfm; /
 item name=We Believe
 link=http://whitehorsemedia.com/about/believe.cfm; /
 item name=Staff
 link=http://whitehorsemedia.com/about/staff.cfm; /
 item name=Projects
 link=http://whitehorsemedia.com/about/projects.cfm; /
 /menu
 /menu

 Here is the ActionScript:


 // generates a list of menu items (effectively one menu)
 // given the inputted parameters.  This makes the main menu
 // as well as any of the submenus
 GenerateMenu = function(container, name, x, y, depth, node_xml) {
 // variable declarations
 var curr_node;
 var curr_item;
 var curr_menu = container.createEmptyMovieClip(name, depth);

 // for all items or XML nodes (items and menus)
 // within this node_xml passed for this menu
 for (var i=0; inode_xml.childNodes.length; i++) {
 // movieclip for each menu item
 curr_item =
curr_menu.attachMovie(menuitem,item+i+_mc,
 i);
 curr_item._x = x + i*curr_item._width;
 curr_item._y = y;
 curr_item.trackAsMenu = true;

 // item properties assigned from XML
 curr_node = node_xml.childNodes[i];
 curr_item.link = curr_node.attributes.link;
 curr_item.name.text = curr_node.attributes.name;

 // item submenu behavior for rollover event
 if (node_xml.childNodes[i].nodeName == menu){
 // open a submenu
 curr_item.node_xml = curr_node;
 curr_item.onRollOver = curr_item.onDragOver =
 function

Re: [Flashcoders] Help Getting Size of Text Dynamically

2006-08-17 Thread Aaron Roberson

Elena,

Option 2 is exactly the track I am currently taking!

I am having a hard time adjusting the width of the movie clip based on
the length of the text after setting it to auto size. Can you help?

Here is my code:

for (var i=0; inode_xml.childNodes.length; i++) {
// movieclip for each menu item
curr_item = curr_menu.attachMovie(menuitem,item+i+_mc, i);
curr_item.name.autoSize = left;
curr_item._width = curr_item.name.textWidth;
curr_item._x = x + i*curr_item._width;
curr_item._y = y;
curr_item.trackAsMenu = true;
// truncated

Thanks,
Aaron

P.S. Option #2 is:

quoteYou could set autosize = true for the dynamic text field, then retrieve
the length of the text field once populated with the text, the adjust the
width of the movie clip based on it.. all on the fly./quote

On 8/17/06, Elena Blanco [EMAIL PROTECTED] wrote:

A couple of ideas that pop in my mind

1. You can store the name in a temporary string and get the length of it
with string.length - then change the width of the movie clip accordingly
2. You could set autosize = true for the dynamic text field, then retrieve
the length of the text field once populated with the text, the adjust the
width of the movie clip based on it.. all on the fly.

Let me know if any helps!

ELENA BLANCO
Blancomedia
WEB APPLICATION ARCHITECT
920 HULL STREET
HOOD RIVER, OR 97031
p: 541.490.4993
e: [EMAIL PROTECTED]
w: http://www.blancomedia.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] Help Getting Size of Text Dynamically

2006-08-17 Thread John VanHorn

there are many ways to do the spacing. if your mc is sized after the width
of the textfield, just add the witdh of the mc to its _x plus the 15px for
spacing to get the _x of the next mc.

On 8/17/06, Aaron Roberson [EMAIL PROTECTED] wrote:


I'm half way there...

I figured out how to resize the movie clip based on the length of the
text being loaded from the name attribute of the xml node. I added the
following line to my code:

curr_item.name.autoSize = left;

Now I need to figure out how to make the spacing between each menu
item 15px. Sounds simple, and is for others, but now that each movie
clip is a different size I'm not sure how to do that. Any help on that
would be appreciated!

-Aaron

On 8/17/06, Elena Blanco [EMAIL PROTECTED] wrote:
 By size, are you referring to the length of the text (in this case the
 name?)

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Aaron
 Roberson
 Sent: Thursday, August 17, 2006 1:55 PM
 To: flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] Help Getting Size of Text Dynamically

 I am creating a dynamic drop down menu using XML and I am having
 trouble spacing out each menu item.

 Is there a way of determing the size of the text in each xml node?

 Thanks for your help,
 Aaron

 P.S. This menu is based on a tutorial at kirupa.com.

 Here is the XML:

 ?xml version=1.0 encoding=iso-8859-1?
 menu name=navigation
 item name=Home link=http://whitehorsemedia.com; /
 menu name=About Us
 link=http://whitehorsemedia.com/about/index.cfm;
 item name=Our Name
 link=http://whitehorsemedia.com/about/name.cfm; /
 item name=News
 link=http://whitehorsemedia.com/about/news.cfm; /
 item name=We Believe
 link=http://whitehorsemedia.com/about/believe.cfm; /
 item name=Staff
 link=http://whitehorsemedia.com/about/staff.cfm; /
 item name=Projects
 link=http://whitehorsemedia.com/about/projects.cfm; /
 /menu
 /menu

 Here is the ActionScript:


 // generates a list of menu items (effectively one menu)
 // given the inputted parameters.  This makes the main menu
 // as well as any of the submenus
 GenerateMenu = function(container, name, x, y, depth, node_xml) {
 // variable declarations
 var curr_node;
 var curr_item;
 var curr_menu = container.createEmptyMovieClip(name, depth);

 // for all items or XML nodes (items and menus)
 // within this node_xml passed for this menu
 for (var i=0; inode_xml.childNodes.length; i++) {
 // movieclip for each menu item
 curr_item =
curr_menu.attachMovie(menuitem,item+i+_mc,
 i);
 curr_item._x = x + i*curr_item._width;
 curr_item._y = y;
 curr_item.trackAsMenu = true;

 // item properties assigned from XML
 curr_node = node_xml.childNodes[i];
 curr_item.link = curr_node.attributes.link;
 curr_item.name.text = curr_node.attributes.name;

 // item submenu behavior for rollover event
 if (node_xml.childNodes[i].nodeName == menu){
 // open a submenu
 curr_item.node_xml = curr_node;
 curr_item.onRollOver = curr_item.onDragOver =
 function(){
 var x = 200;
 var y = this._y + this._height;
 GenerateMenu(curr_menu, submenu_mc, x,
y,
 1000, this.node_xml);
 // show a hover color
 var col = new Color(this.background);
 col.setRGB(0xf4faff);
 };
 }else{ // nodeName == item
 curr_item.arrow._visible = false;
 // close existing submenu
 curr_item.onRollOver = curr_item.onDragOver =
 function(){
 curr_menu.submenu_mc.removeMovieClip();
 // show a hover color
 var col = new Color(this.background);
 col.setRGB(0xf4faff);
 };
 }

 curr_item.onRollOut = curr_item.onDragOut = function(){
 // restore color
 var col = new Color(this.background);

 col.setTransform({ra:100,rb:0,ga:100,gb:0,ba:100,bb:0});
 };

 // any item, menu opening or not can have actions
 curr_item.onRelease = function(){
 Actions[goToURL](this.link);
 CloseSubmenus();
 };
 } // end for loop
 };

 // create the main menu, this will be constantly visible
 CreateMainMenu = function(x, y, depth, menu_xml

Re: [Flashcoders] Help Getting Size of Text Dynamically

2006-08-17 Thread Aaron Roberson

John,

That is what I am trying to do but it's not working for some reason.
Can you detect any problem or give me a suggestion with the following
code:

for (var i=0; inode_xml.childNodes.length; i++) {
  // movieclip for each menu item
  curr_item = curr_menu.attachMovie(menuitem,item+i+_mc, i);
  //set text field to auto size with left alignment
  curr_item.name.autoSize = left;
  curr_item.trackAsMenu = true;

  // item properties assigned from XML
  curr_node = node_xml.childNodes[i];
  curr_item.link = curr_node.attributes.link;
  curr_item.name.text = curr_node.attributes.name;

  // set movie clip width to the width of the text loaded from xml
  curr_item._width = curr_item.name.textWidth;
  // set x coordinate to the coordinate passed in times
the width of the movie clip
  curr_item._x = x + i*curr_item._width;
  curr_item._y = y;

Thanks,
Aaron

On 8/17/06, John VanHorn [EMAIL PROTECTED] wrote:

there are many ways to do the spacing. if your mc is sized after the width
of the textfield, just add the witdh of the mc to its _x plus the 15px for
spacing to get the _x of the next mc.

On 8/17/06, Aaron Roberson [EMAIL PROTECTED] wrote:

 I'm half way there...

 I figured out how to resize the movie clip based on the length of the
 text being loaded from the name attribute of the xml node. I added the
 following line to my code:

 curr_item.name.autoSize = left;

 Now I need to figure out how to make the spacing between each menu
 item 15px. Sounds simple, and is for others, but now that each movie
 clip is a different size I'm not sure how to do that. Any help on that
 would be appreciated!

 -Aaron

 On 8/17/06, Elena Blanco [EMAIL PROTECTED] wrote:
  By size, are you referring to the length of the text (in this case the
  name?)
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Aaron
  Roberson
  Sent: Thursday, August 17, 2006 1:55 PM
  To: flashcoders@chattyfig.figleaf.com
  Subject: [Flashcoders] Help Getting Size of Text Dynamically
 
  I am creating a dynamic drop down menu using XML and I am having
  trouble spacing out each menu item.
 
  Is there a way of determing the size of the text in each xml node?
 
  Thanks for your help,
  Aaron
 
  P.S. This menu is based on a tutorial at kirupa.com.
 
  Here is the XML:
 
  ?xml version=1.0 encoding=iso-8859-1?
  menu name=navigation
  item name=Home link=http://whitehorsemedia.com; /
  menu name=About Us
  link=http://whitehorsemedia.com/about/index.cfm;
  item name=Our Name
  link=http://whitehorsemedia.com/about/name.cfm; /
  item name=News
  link=http://whitehorsemedia.com/about/news.cfm; /
  item name=We Believe
  link=http://whitehorsemedia.com/about/believe.cfm; /
  item name=Staff
  link=http://whitehorsemedia.com/about/staff.cfm; /
  item name=Projects
  link=http://whitehorsemedia.com/about/projects.cfm; /
  /menu
  /menu
 
  Here is the ActionScript:
 
 
  // generates a list of menu items (effectively one menu)
  // given the inputted parameters.  This makes the main menu
  // as well as any of the submenus
  GenerateMenu = function(container, name, x, y, depth, node_xml) {
  // variable declarations
  var curr_node;
  var curr_item;
  var curr_menu = container.createEmptyMovieClip(name, depth);
 
  // for all items or XML nodes (items and menus)
  // within this node_xml passed for this menu
  for (var i=0; inode_xml.childNodes.length; i++) {
  // movieclip for each menu item
  curr_item =
 curr_menu.attachMovie(menuitem,item+i+_mc,
  i);
  curr_item._x = x + i*curr_item._width;
  curr_item._y = y;
  curr_item.trackAsMenu = true;
 
  // item properties assigned from XML
  curr_node = node_xml.childNodes[i];
  curr_item.link = curr_node.attributes.link;
  curr_item.name.text = curr_node.attributes.name;
 
  // item submenu behavior for rollover event
  if (node_xml.childNodes[i].nodeName == menu){
  // open a submenu
  curr_item.node_xml = curr_node;
  curr_item.onRollOver = curr_item.onDragOver =
  function(){
  var x = 200;
  var y = this._y + this._height;
  GenerateMenu(curr_menu, submenu_mc, x,
 y,
  1000, this.node_xml);
  // show a hover color
  var col = new Color(this.background);
  col.setRGB(0xf4faff

RE: [Flashcoders] Help Getting Size of Text Dynamically

2006-08-17 Thread Ryan Potter
Hey Aaron.  The problem that I can see is that you are setting the x to
the x of the current item, hence you are setting it to its own width.
If you are trying to space them across the screen horizontally you need
to get the x and width of the last clip.  Another way to do it is to get
the width of the container clip and use that.  This only works if the
container only contains the nav items.  

Option 1:

// get the last clip (i-1)
last_item = curr_menu[item+i-1+_mc];
last_x = last_item._x;
last_width = ast_item._width;

// set the x to the last item x plus the last item width
curr_item._x = last_x + last_width;


Option 2:
// set the x to the width of the container
curr_item._x = curr_menu._width;


Option 3:

// Set a fixed width
curr_item._x = i*100;


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aaron
Roberson
Sent: Thursday, August 17, 2006 4:23 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Help Getting Size of Text Dynamically

John,

That is what I am trying to do but it's not working for some reason.
Can you detect any problem or give me a suggestion with the following
code:

for (var i=0; inode_xml.childNodes.length; i++) {
   // movieclip for each menu item
   curr_item =
curr_menu.attachMovie(menuitem,item+i+_mc, i);
   //set text field to auto size with left alignment
   curr_item.name.autoSize = left;
   curr_item.trackAsMenu = true;

   // item properties assigned from XML
   curr_node = node_xml.childNodes[i];
   curr_item.link = curr_node.attributes.link;
   curr_item.name.text = curr_node.attributes.name;

   // set movie clip width to the width of the text loaded
from xml
   curr_item._width = curr_item.name.textWidth;
   // set x coordinate to the coordinate passed in times
the width of the movie clip
   curr_item._x = x + i*curr_item._width;
   curr_item._y = y;

Thanks,
Aaron

On 8/17/06, John VanHorn [EMAIL PROTECTED] wrote:
 there are many ways to do the spacing. if your mc is sized after the
width
 of the textfield, just add the witdh of the mc to its _x plus the 15px
for
 spacing to get the _x of the next mc.

 On 8/17/06, Aaron Roberson [EMAIL PROTECTED] wrote:
 
  I'm half way there...
 
  I figured out how to resize the movie clip based on the length of
the
  text being loaded from the name attribute of the xml node. I added
the
  following line to my code:
 
  curr_item.name.autoSize = left;
 
  Now I need to figure out how to make the spacing between each menu
  item 15px. Sounds simple, and is for others, but now that each movie
  clip is a different size I'm not sure how to do that. Any help on
that
  would be appreciated!
 
  -Aaron
 
  On 8/17/06, Elena Blanco [EMAIL PROTECTED] wrote:
   By size, are you referring to the length of the text (in this case
the
   name?)
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] On Behalf Of
Aaron
   Roberson
   Sent: Thursday, August 17, 2006 1:55 PM
   To: flashcoders@chattyfig.figleaf.com
   Subject: [Flashcoders] Help Getting Size of Text Dynamically
  
   I am creating a dynamic drop down menu using XML and I am having
   trouble spacing out each menu item.
  
   Is there a way of determing the size of the text in each xml node?
  
   Thanks for your help,
   Aaron
  
   P.S. This menu is based on a tutorial at kirupa.com.
  
   Here is the XML:
  
   ?xml version=1.0 encoding=iso-8859-1?
   menu name=navigation
   item name=Home link=http://whitehorsemedia.com; /
   menu name=About Us
   link=http://whitehorsemedia.com/about/index.cfm;
   item name=Our Name
   link=http://whitehorsemedia.com/about/name.cfm; /
   item name=News
   link=http://whitehorsemedia.com/about/news.cfm; /
   item name=We Believe
   link=http://whitehorsemedia.com/about/believe.cfm; /
   item name=Staff
   link=http://whitehorsemedia.com/about/staff.cfm; /
   item name=Projects
   link=http://whitehorsemedia.com/about/projects.cfm; /
   /menu
   /menu
  
   Here is the ActionScript:
  
  
   // generates a list of menu items (effectively one menu)
   // given the inputted parameters.  This makes the main menu
   // as well as any of the submenus
   GenerateMenu = function(container, name, x, y, depth, node_xml) {
   // variable declarations
   var curr_node;
   var curr_item;
   var curr_menu = container.createEmptyMovieClip(name,
depth);
  
   // for all items or XML nodes (items and menus)
   // within this node_xml passed for this menu
   for (var i=0; inode_xml.childNodes.length; i++) {
   // movieclip for each menu item
   curr_item =
  curr_menu.attachMovie(menuitem,item+i+_mc,
   i

Re: [Flashcoders] Help Getting Size of Text Dynamically

2006-08-17 Thread Aaron Roberson

Ryan,

I went with option number 1 and it is working like a champ. I did
change one little thing:

last_item = curr_menu[item+i-1+_mc];

to

last_item = curr_menu[item+(i-1)+_mc];

But it works wonderfully now. Thank you all for your help!

-Aaron

On 8/17/06, Ryan Potter [EMAIL PROTECTED] wrote:

Hey Aaron.  The problem that I can see is that you are setting the x to
the x of the current item, hence you are setting it to its own width.
If you are trying to space them across the screen horizontally you need
to get the x and width of the last clip.  Another way to do it is to get
the width of the container clip and use that.  This only works if the
container only contains the nav items.

Option 1:

// get the last clip (i-1)
last_item = curr_menu[item+i-1+_mc];
last_x = last_item._x;
last_width = ast_item._width;

// set the x to the last item x plus the last item width
curr_item._x = last_x + last_width;


Option 2:
// set the x to the width of the container
curr_item._x = curr_menu._width;


Option 3:

// Set a fixed width
curr_item._x = i*100;


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aaron
Roberson
Sent: Thursday, August 17, 2006 4:23 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Help Getting Size of Text Dynamically

John,

That is what I am trying to do but it's not working for some reason.
Can you detect any problem or give me a suggestion with the following
code:

for (var i=0; inode_xml.childNodes.length; i++) {
   // movieclip for each menu item
   curr_item =
curr_menu.attachMovie(menuitem,item+i+_mc, i);
   //set text field to auto size with left alignment
   curr_item.name.autoSize = left;
   curr_item.trackAsMenu = true;

   // item properties assigned from XML
   curr_node = node_xml.childNodes[i];
   curr_item.link = curr_node.attributes.link;
   curr_item.name.text = curr_node.attributes.name;

   // set movie clip width to the width of the text loaded
from xml
   curr_item._width = curr_item.name.textWidth;
   // set x coordinate to the coordinate passed in times
the width of the movie clip
   curr_item._x = x + i*curr_item._width;
   curr_item._y = y;

Thanks,
Aaron

On 8/17/06, John VanHorn [EMAIL PROTECTED] wrote:
 there are many ways to do the spacing. if your mc is sized after the
width
 of the textfield, just add the witdh of the mc to its _x plus the 15px
for
 spacing to get the _x of the next mc.

 On 8/17/06, Aaron Roberson [EMAIL PROTECTED] wrote:
 
  I'm half way there...
 
  I figured out how to resize the movie clip based on the length of
the
  text being loaded from the name attribute of the xml node. I added
the
  following line to my code:
 
  curr_item.name.autoSize = left;
 
  Now I need to figure out how to make the spacing between each menu
  item 15px. Sounds simple, and is for others, but now that each movie
  clip is a different size I'm not sure how to do that. Any help on
that
  would be appreciated!
 
  -Aaron
 
  On 8/17/06, Elena Blanco [EMAIL PROTECTED] wrote:
   By size, are you referring to the length of the text (in this case
the
   name?)
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] On Behalf Of
Aaron
   Roberson
   Sent: Thursday, August 17, 2006 1:55 PM
   To: flashcoders@chattyfig.figleaf.com
   Subject: [Flashcoders] Help Getting Size of Text Dynamically
  
   I am creating a dynamic drop down menu using XML and I am having
   trouble spacing out each menu item.
  
   Is there a way of determing the size of the text in each xml node?
  
   Thanks for your help,
   Aaron
  
   P.S. This menu is based on a tutorial at kirupa.com.
  
   Here is the XML:
  
   ?xml version=1.0 encoding=iso-8859-1?
   menu name=navigation
   item name=Home link=http://whitehorsemedia.com; /
   menu name=About Us
   link=http://whitehorsemedia.com/about/index.cfm;
   item name=Our Name
   link=http://whitehorsemedia.com/about/name.cfm; /
   item name=News
   link=http://whitehorsemedia.com/about/news.cfm; /
   item name=We Believe
   link=http://whitehorsemedia.com/about/believe.cfm; /
   item name=Staff
   link=http://whitehorsemedia.com/about/staff.cfm; /
   item name=Projects
   link=http://whitehorsemedia.com/about/projects.cfm; /
   /menu
   /menu
  
   Here is the ActionScript:
  
  
   // generates a list of menu items (effectively one menu)
   // given the inputted parameters.  This makes the main menu
   // as well as any of the submenus
   GenerateMenu = function(container, name, x, y, depth, node_xml) {
   // variable declarations
   var curr_node;
   var curr_item;
   var curr_menu = container.createEmptyMovieClip(name,
depth);
  
   // for all items

Re: [Flashcoders] Help...cant unload the xml menu...!!

2006-08-09 Thread Jose Maria Barros

Ok...ive found the source of the problem...the xml file must be in the same
floder as the swf..cant reside inside a folder...maybe because of
permissions...

Thanks

On 8/1/06, Jose Maria Barros [EMAIL PROTECTED] wrote:


Hi Arul,
Well...i tested..and the problem still there...maybe its because the xml
object is not in the root?its inside a movieclip, then inside other
movieclip.

I case you dont understand what i mean is the code that ive put here...is
in a frame that is not in the root, but inside a movieclip(that is in the
root) and in other movieclip...maybe is that the problem?

thanks.


On 8/1/06, Arul Prasad M L [EMAIL PROTECTED] wrote:

 might be a problem with the URL.
 1. Make sure that the ../xml folder is in the WWW folder of ur server,
 not
 above it.

 or

 2. Try doing this:

 var urlString:String = _root._url;
 urlString = urlString.substr (0,urlString.lastIndexOf(/));
 urlString = urlString.substr(0,urlString.lastIndexOf(/) + 1);
 urlString = urlString.concat(xml/menu.xml)
 menuInfoXML = urlString;

 If it works, you may want to refactor all the statements above and make
 the
 code optimal.

 ~Arul Prasad.

 I've just elaborated in soo many statements, just in case you dont
 understand.

 On 8/1/06, Jose Maria Barros [EMAIL PROTECTED]  wrote:
 
  can anyone help me?
 
  On 7/31/06, Jose Maria Barros [EMAIL PROTECTED] wrote:
  
   i singed too soon...when i test locally everything works great...but

  when
   i try it in internet..it doesnt..he doestn load the xml file
  
   why...?
  
   The code is the same...but i did alter the url..like you said..:
  
   //EDIT XML PATH
   menuInfoXML = ./xml/menu.xml;
   // DO NOT EDIT BELOW..
  
   System.useCodepage = true;
  
   import mx.xpath.XPathAPI ;
   var infoHolder:XML = new XML();
   infoHolder.load(menuInfoXML);
   infoHolder.ignoreWhite = true;
   var titlePath:String = /root;
   //main menu array.
   var mainMenus:Array;
   //sub menu array.
   var subMenus:Array;
  
   infoHolder.onLoad = function(ok) {
   if (ok) {
   mainMenus = mx.xpath.XPathAPI.selectNodeList (
  infoHolder.firstChild,
   titlePath+/menu);
   createTreeMenu();
   }
   };
  
  
   MovieClip.prototype.getPos = function(target:Number) {
   this.onEnterFrame = function() {
   this._y -= (this._y-target)/6;
   if (Math.abs(this._y-target)0.3) {
   delete this.onEnterFrame;
   _root.newsMC.showNews.appear();
   }
   };
   };
  
  
   function createTreeMenu():Void {
   for (i=0; imainMenus.length; i++) {
   newBut = _root.conteudos_mc.portfolio_mc.attachMovie(but,
   but+i, 999+i);
  
   newBut.arrow._alpha = 0;
   newBut.shine._alpha = 0;
   newBut._x = 18;
   newBut._y = 93+(newBut._height+5)*i;
  
   newBut.txt.text = mainMenus[i].attributes.txt;
   newBut.link2 = mainMenus[i].attributes.url;
   newBut.submenuCnt = mainMenus[i].childNodes.length;
   newBut.y = newBut._y;
   newBut.onRollOver = function() {
   _root.conteudos_mc.portfolio_mc.tween(this, 16, 18);
  
   this.arrow.appear ();
   this.shine.appear();
   var textCol = new Color(this.txt);
   textCol.setRGB(0xff);
  
   };
   newBut.onRollOut = function() {
   _root.conteudos_mc.portfolio_mc.tween(this, 18, 16);
  
   this.arrow.disappear();
   this.shine.disappear();
   var textCol = new Color( this.txt);
   textCol.setRGB(0x6F6A63);
   };
   newBut.onRelease = function() {
   if (this.submenuCnt0) {
   var butNum:Number = new Number(this._name.substr(3,
 1));
   this.createSubMenu(butNum);
   for (i=0; imainMenus.length; i++) {
   if (ibutNum+1) {
  
  
 
 
_root.conteudos_mc.portfolio_mc[but+i].getPos(_root.conteudos_mc.portfolio_mc[but+i].y);

  
   } else {
  
  
 
 
_root.conteudos_mc.portfolio_mc[but+i].getPos(_root.conteudos_mc.portfolio_mc[but+i].y+this.submenuCnt*22);

  
   }
   }
   }
   else {
   _root.conteudos_mc.portfolio_mc.clearSubMenus();
   for (i=0; i mainMenus.length; i++) {
  
  
 
 
_root.conteudos_mc.portfolio_mc[but+i].getPos(_root.conteudos_mc.portfolio_mc[but+i].y);
  
   }
   //getURL( this.link);
  
   }
   };
   }
   }
  
  
   MovieClip.prototype.createSubMenu =
  function(buttonNumber:Number):Void  {
   clearSubMenus();
   subMenus = mx.xpath.XPathAPI.selectNodeList
 (mainMenus[buttonNumber],
   /menu/submenu);
   var butNum:Number = new Number(this._name.substr(3, 1));
   for (i=0; isubMenus.length; i++) {
   subBut =
 _root.conteudos_mc.portfolio_mc.attachMovie(submenu,
   subMenu+i, 

Re: [Flashcoders] Help...cant unload the xml menu...!!

2006-08-01 Thread Jose Maria Barros

can anyone help me?

On 7/31/06, Jose Maria Barros [EMAIL PROTECTED] wrote:


i singed too soon...when i test locally everything works great...but when
i try it in internet..it doesnt..he doestn load the xml file

why...?

The code is the same...but i did alter the url..like you said..:

//EDIT XML PATH
menuInfoXML = ./xml/menu.xml;
// DO NOT EDIT BELOW..

System.useCodepage = true;

import mx.xpath.XPathAPI;
var infoHolder:XML = new XML();
infoHolder.load(menuInfoXML);
infoHolder.ignoreWhite = true;
var titlePath:String = /root;
//main menu array.
var mainMenus:Array;
//sub menu array.
var subMenus:Array;

infoHolder.onLoad = function(ok) {
if (ok) {
mainMenus = mx.xpath.XPathAPI.selectNodeList(infoHolder.firstChild,
titlePath+/menu);
createTreeMenu();
}
};


MovieClip.prototype.getPos = function(target:Number) {
this.onEnterFrame = function() {
this._y -= (this._y-target)/6;
if (Math.abs(this._y-target)0.3) {
delete this.onEnterFrame;
_root.newsMC.showNews.appear();
}
};
};


function createTreeMenu():Void {
for (i=0; imainMenus.length; i++) {
newBut = _root.conteudos_mc.portfolio_mc.attachMovie(but,
but+i, 999+i);

newBut.arrow._alpha = 0;
newBut.shine._alpha = 0;
newBut._x = 18;
newBut._y = 93+(newBut._height+5)*i;

newBut.txt.text = mainMenus[i].attributes.txt;
newBut.link2 = mainMenus[i].attributes.url;
newBut.submenuCnt = mainMenus[i].childNodes.length;
newBut.y = newBut._y;
newBut.onRollOver = function() {
_root.conteudos_mc.portfolio_mc.tween(this, 16, 18);

this.arrow.appear();
this.shine.appear();
var textCol = new Color(this.txt);
textCol.setRGB(0xff);

};
newBut.onRollOut = function() {
_root.conteudos_mc.portfolio_mc.tween(this, 18, 16);

this.arrow.disappear();
this.shine.disappear();
var textCol = new Color(this.txt);
textCol.setRGB(0x6F6A63);
};
newBut.onRelease = function() {
if (this.submenuCnt0) {
var butNum:Number = new Number(this._name.substr(3, 1));
this.createSubMenu(butNum);
for (i=0; imainMenus.length; i++) {
if (ibutNum+1) {

_root.conteudos_mc.portfolio_mc[but+i].getPos(_root.conteudos_mc.portfolio_mc[but+i].y);

} else {

_root.conteudos_mc.portfolio_mc[but+i].getPos(_root.conteudos_mc.portfolio_mc[but+i].y+this.submenuCnt*22);

}
}
}
else {
_root.conteudos_mc.portfolio_mc.clearSubMenus();
for (i=0; imainMenus.length; i++) {

_root.conteudos_mc.portfolio_mc[but+i].getPos(_root.conteudos_mc.portfolio_mc[but+i].y);

}
//getURL(this.link);

}
};
}
}


MovieClip.prototype.createSubMenu = function(buttonNumber:Number):Void  {
clearSubMenus();
subMenus = mx.xpath.XPathAPI.selectNodeList(mainMenus[buttonNumber],
/menu/submenu);
var butNum:Number = new Number(this._name.substr(3, 1));
for (i=0; isubMenus.length; i++) {
subBut = _root.conteudos_mc.portfolio_mc.attachMovie(submenu,
subMenu+i, Math.random()*99);

subBut._alpha = 0;
subBut._x -= i;
subAppear(subBut, (i+3), 30);

subBut._y = this.y+this._height+(subBut._height+5)*i;
subBut.txt.text = subMenus[i].attributes.txt;
subBut.link2 = subMenus[i].attributes.url;
subBut.but.onRollOver = function(){
var textSubCol = new Color(this._parent.txt);
textSubCol.setRGB(0xff);
}
subBut.but.onRollOut = function(){
var textSubCol = new Color(this._parent.txt);
textSubCol.setRGB(0x6F6A63);
}
subBut.but.onRelease = function() {
loadMovie(this._parent.link2, _root.conteudos_mc.vazio4_mc);

trace(this._parent.link2);

};
}
};


function clearSubMenus() {
for (k=0; ksubMenus.length; k++) {
_root.conteudos_mc.portfolio_mc[subMenu+k].removeMovieClip();

}
}


function clearAllMenus() {
for (i=0; imainMenus.length; i++) {
_root.conteudos_mc.portfolio_mc[but+i].removeMovieClip();
}
}


Thanks...once again..xml drives me nuts..





On 7/31/06, Jose Maria Barros [EMAIL PROTECTED] wrote:

 Oh manthank you so much..i was getting so frustrated...well..i am
 ...but at least..the problem is solved..



 On 7/31/06, eric dolecki  [EMAIL PROTECTED] wrote:
 
  You are attaching everything to the _root, so you need to clean up the
  clips
  one by one, unless you decide to better nest your menu  submenu items
  in
  one movieclip. You could then remove it much easier, etc.
 
  On 7/31/06, Jose Maria Barros  [EMAIL PROTECTED] wrote:
  
   Hello, i have a xml 

Re: [Flashcoders] Help...cant unload the xml menu...!!

2006-08-01 Thread Arul Prasad M L

might be a problem with the URL.
1. Make sure that the ../xml folder is in the WWW folder of ur server, not
above it.

or

2. Try doing this:

var urlString:String = _root._url;
urlString = urlString.substr(0,urlString.lastIndexOf(/));
urlString = urlString.substr(0,urlString.lastIndexOf(/) + 1);
urlString = urlString.concat(xml/menu.xml)
menuInfoXML = urlString;

If it works, you may want to refactor all the statements above and make the
code optimal.

~Arul Prasad.

I've just elaborated in soo many statements, just in case you dont
understand.

On 8/1/06, Jose Maria Barros [EMAIL PROTECTED] wrote:


can anyone help me?

On 7/31/06, Jose Maria Barros [EMAIL PROTECTED] wrote:

 i singed too soon...when i test locally everything works great...but
when
 i try it in internet..it doesnt..he doestn load the xml file

 why...?

 The code is the same...but i did alter the url..like you said..:

 //EDIT XML PATH
 menuInfoXML = ./xml/menu.xml;
 // DO NOT EDIT BELOW..

 System.useCodepage = true;

 import mx.xpath.XPathAPI;
 var infoHolder:XML = new XML();
 infoHolder.load(menuInfoXML);
 infoHolder.ignoreWhite = true;
 var titlePath:String = /root;
 //main menu array.
 var mainMenus:Array;
 //sub menu array.
 var subMenus:Array;

 infoHolder.onLoad = function(ok) {
 if (ok) {
 mainMenus = mx.xpath.XPathAPI.selectNodeList(
infoHolder.firstChild,
 titlePath+/menu);
 createTreeMenu();
 }
 };


 MovieClip.prototype.getPos = function(target:Number) {
 this.onEnterFrame = function() {
 this._y -= (this._y-target)/6;
 if (Math.abs(this._y-target)0.3) {
 delete this.onEnterFrame;
 _root.newsMC.showNews.appear();
 }
 };
 };


 function createTreeMenu():Void {
 for (i=0; imainMenus.length; i++) {
 newBut = _root.conteudos_mc.portfolio_mc.attachMovie(but,
 but+i, 999+i);

 newBut.arrow._alpha = 0;
 newBut.shine._alpha = 0;
 newBut._x = 18;
 newBut._y = 93+(newBut._height+5)*i;

 newBut.txt.text = mainMenus[i].attributes.txt;
 newBut.link2 = mainMenus[i].attributes.url;
 newBut.submenuCnt = mainMenus[i].childNodes.length;
 newBut.y = newBut._y;
 newBut.onRollOver = function() {
 _root.conteudos_mc.portfolio_mc.tween(this, 16, 18);

 this.arrow.appear();
 this.shine.appear();
 var textCol = new Color(this.txt);
 textCol.setRGB(0xff);

 };
 newBut.onRollOut = function() {
 _root.conteudos_mc.portfolio_mc.tween(this, 18, 16);

 this.arrow.disappear();
 this.shine.disappear();
 var textCol = new Color(this.txt);
 textCol.setRGB(0x6F6A63);
 };
 newBut.onRelease = function() {
 if (this.submenuCnt0) {
 var butNum:Number = new Number(this._name.substr(3, 1));
 this.createSubMenu(butNum);
 for (i=0; imainMenus.length; i++) {
 if (ibutNum+1) {


_root.conteudos_mc.portfolio_mc[but+i].getPos(_root.conteudos_mc.portfolio_mc[but+i].y);

 } else {


_root.conteudos_mc.portfolio_mc[but+i].getPos(_root.conteudos_mc.portfolio_mc[but+i].y+this.submenuCnt*22);

 }
 }
 }
 else {
 _root.conteudos_mc.portfolio_mc.clearSubMenus();
 for (i=0; imainMenus.length; i++) {


_root.conteudos_mc.portfolio_mc[but+i].getPos(_root.conteudos_mc.portfolio_mc[but+i].y);

 }
 //getURL(this.link);

 }
 };
 }
 }


 MovieClip.prototype.createSubMenu =
function(buttonNumber:Number):Void  {
 clearSubMenus();
 subMenus = mx.xpath.XPathAPI.selectNodeList(mainMenus[buttonNumber],
 /menu/submenu);
 var butNum:Number = new Number(this._name.substr(3, 1));
 for (i=0; isubMenus.length; i++) {
 subBut = _root.conteudos_mc.portfolio_mc.attachMovie(submenu,
 subMenu+i, Math.random()*99);

 subBut._alpha = 0;
 subBut._x -= i;
 subAppear(subBut, (i+3), 30);

 subBut._y = this.y+this._height+(subBut._height+5)*i;
 subBut.txt.text = subMenus[i].attributes.txt;
 subBut.link2 = subMenus[i].attributes.url;
 subBut.but.onRollOver = function(){
 var textSubCol = new Color(this._parent.txt);
 textSubCol.setRGB(0xff);
 }
 subBut.but.onRollOut = function(){
 var textSubCol = new Color(this._parent.txt);
 textSubCol.setRGB(0x6F6A63);
 }
 subBut.but.onRelease = function() {
 loadMovie(this._parent.link2,
_root.conteudos_mc.vazio4_mc);

 trace(this._parent.link2);

 };
 }
 };


 function clearSubMenus() {
 for (k=0; ksubMenus.length; k++) {
 _root.conteudos_mc.portfolio_mc[subMenu+k].removeMovieClip();

 }
 }



Re: [Flashcoders] Help...cant unload the xml menu...!!

2006-08-01 Thread Jose Maria Barros

Hi Arul,
Well...i tested..and the problem still there...maybe its because the xml
object is not in the root?its inside a movieclip, then inside other
movieclip.

I case you dont understand what i mean is the code that ive put here...is in
a frame that is not in the root, but inside a movieclip(that is in the root)
and in other movieclip...maybe is that the problem?

thanks.

On 8/1/06, Arul Prasad M L [EMAIL PROTECTED] wrote:


might be a problem with the URL.
1. Make sure that the ../xml folder is in the WWW folder of ur server, not
above it.

or

2. Try doing this:

var urlString:String = _root._url;
urlString = urlString.substr(0,urlString.lastIndexOf(/));
urlString = urlString.substr(0,urlString.lastIndexOf(/) + 1);
urlString = urlString.concat(xml/menu.xml)
menuInfoXML = urlString;

If it works, you may want to refactor all the statements above and make
the
code optimal.

~Arul Prasad.

I've just elaborated in soo many statements, just in case you dont
understand.

On 8/1/06, Jose Maria Barros [EMAIL PROTECTED] wrote:

 can anyone help me?

 On 7/31/06, Jose Maria Barros [EMAIL PROTECTED] wrote:
 
  i singed too soon...when i test locally everything works great...but
 when
  i try it in internet..it doesnt..he doestn load the xml file
 
  why...?
 
  The code is the same...but i did alter the url..like you said..:
 
  //EDIT XML PATH
  menuInfoXML = ./xml/menu.xml;
  // DO NOT EDIT BELOW..
 
  System.useCodepage = true;
 
  import mx.xpath.XPathAPI;
  var infoHolder:XML = new XML();
  infoHolder.load(menuInfoXML);
  infoHolder.ignoreWhite = true;
  var titlePath:String = /root;
  //main menu array.
  var mainMenus:Array;
  //sub menu array.
  var subMenus:Array;
 
  infoHolder.onLoad = function(ok) {
  if (ok) {
  mainMenus = mx.xpath.XPathAPI.selectNodeList(
 infoHolder.firstChild,
  titlePath+/menu);
  createTreeMenu();
  }
  };
 
 
  MovieClip.prototype.getPos = function(target:Number) {
  this.onEnterFrame = function() {
  this._y -= (this._y-target)/6;
  if (Math.abs(this._y-target)0.3) {
  delete this.onEnterFrame;
  _root.newsMC.showNews.appear();
  }
  };
  };
 
 
  function createTreeMenu():Void {
  for (i=0; imainMenus.length; i++) {
  newBut = _root.conteudos_mc.portfolio_mc.attachMovie(but,
  but+i, 999+i);
 
  newBut.arrow._alpha = 0;
  newBut.shine._alpha = 0;
  newBut._x = 18;
  newBut._y = 93+(newBut._height+5)*i;
 
  newBut.txt.text = mainMenus[i].attributes.txt;
  newBut.link2 = mainMenus[i].attributes.url;
  newBut.submenuCnt = mainMenus[i].childNodes.length;
  newBut.y = newBut._y;
  newBut.onRollOver = function() {
  _root.conteudos_mc.portfolio_mc.tween(this, 16, 18);
 
  this.arrow.appear();
  this.shine.appear();
  var textCol = new Color(this.txt);
  textCol.setRGB(0xff);
 
  };
  newBut.onRollOut = function() {
  _root.conteudos_mc.portfolio_mc.tween(this, 18, 16);
 
  this.arrow.disappear();
  this.shine.disappear();
  var textCol = new Color(this.txt);
  textCol.setRGB(0x6F6A63);
  };
  newBut.onRelease = function() {
  if (this.submenuCnt0) {
  var butNum:Number = new Number(this._name.substr(3,
1));
  this.createSubMenu(butNum);
  for (i=0; imainMenus.length; i++) {
  if (ibutNum+1) {
 
 

_root.conteudos_mc.portfolio_mc[but+i].getPos(_root.conteudos_mc.portfolio_mc[but+i].y);
 
  } else {
 
 

_root.conteudos_mc.portfolio_mc[but+i].getPos(_root.conteudos_mc.portfolio_mc[but+i].y+this.submenuCnt*22);
 
  }
  }
  }
  else {
  _root.conteudos_mc.portfolio_mc.clearSubMenus();
  for (i=0; imainMenus.length; i++) {
 
 

_root.conteudos_mc.portfolio_mc[but+i].getPos(_root.conteudos_mc.portfolio_mc[but+i].y);
 
  }
  //getURL(this.link);
 
  }
  };
  }
  }
 
 
  MovieClip.prototype.createSubMenu =
 function(buttonNumber:Number):Void  {
  clearSubMenus();
  subMenus = mx.xpath.XPathAPI.selectNodeList
(mainMenus[buttonNumber],
  /menu/submenu);
  var butNum:Number = new Number(this._name.substr(3, 1));
  for (i=0; isubMenus.length; i++) {
  subBut =
_root.conteudos_mc.portfolio_mc.attachMovie(submenu,
  subMenu+i, Math.random()*99);
 
  subBut._alpha = 0;
  subBut._x -= i;
  subAppear(subBut, (i+3), 30);
 
  subBut._y = this.y+this._height+(subBut._height+5)*i;
  subBut.txt.text = subMenus[i].attributes.txt;
  subBut.link2 = subMenus[i].attributes.url;
  subBut.but.onRollOver = function(){
  var textSubCol = new 

[Flashcoders] Help...cant unload the xml menu...!!

2006-07-31 Thread Jose Maria Barros

Hello, i have a xml menu and when i go to other frame my menu doenst
unload...
i tried with the functions clearMenu and clearSubMenu but they dont
work..please help..i will send the code:



import mx.xpath.XPathAPI;
var infoHolder:XML = new XML();
infoHolder.load(menuInfoXML);
infoHolder.ignoreWhite = true;
var titlePath:String = /root;
//main menu array.
var mainMenus:Array;
//sub menu array.
var subMenus:Array;


//load the xml with xpath
infoHolder.onLoad = function(ok) {
   if (ok) {
   mainMenus = mx.xpath.XPathAPI.selectNodeList(infoHolder.firstChild,
titlePath+/menu);
   createTreeMenu();
   }
};


MovieClip.prototype.getPos = function(target:Number) {
   this.onEnterFrame = function() {
   this._y -= (this._y-target)/6;
   if (Math.abs(this._y-target)0.3) {
   delete this.onEnterFrame;
   _root.newsMC.showNews.appear();
   }
   };
};


function createTreeMenu():Void {
   for (i=0; imainMenus.length; i++) {
   newBut = _root.attachMovie(but, but+i, 999+i);
   newBut.arrow._alpha = 0;
   newBut.shine._alpha = 0;
   newBut._x = 105;
   newBut._y = 180+(newBut._height+5)*i;
   newBut.txt.text = mainMenus[i].attributes.txt;
   newBut.link2 = mainMenus[i].attributes.url;
   newBut.submenuCnt = mainMenus[i].childNodes.length;
   newBut.y = newBut._y;
   newBut.onRollOver = function() {
   _root.tween(this, 10, 13);
   this.arrow.appear();
   this.shine.appear();
   var textCol = new Color(this.txt);
   textCol.setRGB(0xff);

   };
   newBut.onRollOut = function() {
   _root.tween(this, 15, 10);
   this.arrow.disappear();
   this.shine.disappear();
   var textCol = new Color(this.txt);
   textCol.setRGB(0x6F6A63);
   };
   newBut.onRelease = function() {
   if (this.submenuCnt0) {
   var butNum:Number = new Number(this._name.substr(3, 1));
   this.createSubMenu(butNum);
   for (i=0; imainMenus.length; i++) {
   if (ibutNum+1) {
   _root[but+i].getPos(_root[but+i].y);
   } else {

_root[but+i].getPos(_root[but+i].y+this.submenuCnt*22);
   }
   }
   }
   else {
   _root.conteudos_mc.portfolio_mc.clearSubMenus();
   for (i=0; imainMenus.length; i++) {
   _root[but+i].getPos(_root[but+i].y);
   }

   }
   };
   }
}


MovieClip.prototype.createSubMenu = function(buttonNumber:Number):Void  {
   clearSubMenus();
   subMenus = mx.xpath.XPathAPI.selectNodeList(mainMenus[buttonNumber],
/menu/submenu);
   var butNum:Number = new Number(this._name.substr(3, 1));
   for (i=0; isubMenus.length; i++) {
   subBut = _root.attachMovie(submenu, subMenu+i, Math.random
()*99);
   subBut._alpha = 0;
   subBut._x -= i;
   subAppear(subBut, (i+3), 130);
   subBut._y = this.y+this._height+(subBut._height+5)*i;
   subBut.txt.text = subMenus[i].attributes.txt;
   subBut.link2 = subMenus[i].attributes.url;
   subBut.but.onRollOver = function(){
   var textSubCol = new Color(this._parent.txt);
   textSubCol.setRGB(0xff);
   }
   subBut.but.onRollOut = function(){
   var textSubCol = new Color(this._parent.txt);
   textSubCol.setRGB(0x6F6A63);
   }
   subBut.but.onRelease = function() {
   loadMovie(this._parent.link2, _root.conteudos_mc.vazio4_mc);
//this doesnt disapear either...
   //trace(this._parent);
   };
   }
};



function clearSubMenus() {
   for (k=0; ksubMenus.length; k++) {
   _root[subMenu+k].removeMovieClip();
   }
}

function clearAllMenus() {
   for (i=0; imainMenus.length; i++) {
   _root[but+i].removeMovieClip();
   }
}


Sorry..but im really desperate with this...i tried with unloadMovie, and
...nothing happens...
Many thanks.

Jose Maria
___
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] Help...cant unload the xml menu...!!

2006-07-31 Thread eric dolecki

You are attaching everything to the _root, so you need to clean up the clips
one by one, unless you decide to better nest your menu  submenu items in
one movieclip. You could then remove it much easier, etc.

On 7/31/06, Jose Maria Barros [EMAIL PROTECTED] wrote:


Hello, i have a xml menu and when i go to other frame my menu doenst
unload...
i tried with the functions clearMenu and clearSubMenu but they dont
work..please help..i will send the code:



import mx.xpath.XPathAPI;
var infoHolder:XML = new XML();
infoHolder.load(menuInfoXML);
infoHolder.ignoreWhite = true;
var titlePath:String = /root;
//main menu array.
var mainMenus:Array;
//sub menu array.
var subMenus:Array;


//load the xml with xpath
infoHolder.onLoad = function(ok) {
if (ok) {
mainMenus = mx.xpath.XPathAPI.selectNodeList(infoHolder.firstChild
,
titlePath+/menu);
createTreeMenu();
}
};


MovieClip.prototype.getPos = function(target:Number) {
this.onEnterFrame = function() {
this._y -= (this._y-target)/6;
if (Math.abs(this._y-target)0.3) {
delete this.onEnterFrame;
_root.newsMC.showNews.appear();
}
};
};


function createTreeMenu():Void {
for (i=0; imainMenus.length; i++) {
newBut = _root.attachMovie(but, but+i, 999+i);
newBut.arrow._alpha = 0;
newBut.shine._alpha = 0;
newBut._x = 105;
newBut._y = 180+(newBut._height+5)*i;
newBut.txt.text = mainMenus[i].attributes.txt;
newBut.link2 = mainMenus[i].attributes.url;
newBut.submenuCnt = mainMenus[i].childNodes.length;
newBut.y = newBut._y;
newBut.onRollOver = function() {
_root.tween(this, 10, 13);
this.arrow.appear();
this.shine.appear();
var textCol = new Color(this.txt);
textCol.setRGB(0xff);

};
newBut.onRollOut = function() {
_root.tween(this, 15, 10);
this.arrow.disappear();
this.shine.disappear();
var textCol = new Color(this.txt);
textCol.setRGB(0x6F6A63);
};
newBut.onRelease = function() {
if (this.submenuCnt0) {
var butNum:Number = new Number(this._name.substr(3, 1));
this.createSubMenu(butNum);
for (i=0; imainMenus.length; i++) {
if (ibutNum+1) {
_root[but+i].getPos(_root[but+i].y);
} else {

_root[but+i].getPos(_root[but+i].y+this.submenuCnt*22);
}
}
}
else {
_root.conteudos_mc.portfolio_mc.clearSubMenus();
for (i=0; imainMenus.length; i++) {
_root[but+i].getPos(_root[but+i].y);
}

}
};
}
}


MovieClip.prototype.createSubMenu = function(buttonNumber:Number):Void  {
clearSubMenus();
subMenus = mx.xpath.XPathAPI.selectNodeList(mainMenus[buttonNumber],
/menu/submenu);
var butNum:Number = new Number(this._name.substr(3, 1));
for (i=0; isubMenus.length; i++) {
subBut = _root.attachMovie(submenu, subMenu+i, Math.random
()*99);
subBut._alpha = 0;
subBut._x -= i;
subAppear(subBut, (i+3), 130);
subBut._y = this.y+this._height+(subBut._height+5)*i;
subBut.txt.text = subMenus[i].attributes.txt;
subBut.link2 = subMenus[i].attributes.url;
subBut.but.onRollOver = function(){
var textSubCol = new Color(this._parent.txt);
textSubCol.setRGB(0xff);
}
subBut.but.onRollOut = function(){
var textSubCol = new Color(this._parent.txt);
textSubCol.setRGB(0x6F6A63);
}
subBut.but.onRelease = function() {
loadMovie(this._parent.link2, _root.conteudos_mc.vazio4_mc);
//this doesnt disapear either...
//trace(this._parent);
};
}
};



function clearSubMenus() {
for (k=0; ksubMenus.length; k++) {
_root[subMenu+k].removeMovieClip();
}
}

function clearAllMenus() {
for (i=0; imainMenus.length; i++) {
_root[but+i].removeMovieClip();
}
}


Sorry..but im really desperate with this...i tried with unloadMovie, and
...nothing happens...
Many thanks.

Jose Maria
___
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] Help...cant unload the xml menu...!!

2006-07-31 Thread Jose Maria Barros

Oh manthank you so much..i was getting so frustrated...well..i am ...but
at least..the problem is solved..


On 7/31/06, eric dolecki [EMAIL PROTECTED] wrote:


You are attaching everything to the _root, so you need to clean up the
clips
one by one, unless you decide to better nest your menu  submenu items in
one movieclip. You could then remove it much easier, etc.

On 7/31/06, Jose Maria Barros [EMAIL PROTECTED] wrote:

 Hello, i have a xml menu and when i go to other frame my menu doenst
 unload...
 i tried with the functions clearMenu and clearSubMenu but they dont
 work..please help..i will send the code:



 import mx.xpath.XPathAPI;
 var infoHolder:XML = new XML();
 infoHolder.load(menuInfoXML);
 infoHolder.ignoreWhite = true;
 var titlePath:String = /root;
 //main menu array.
 var mainMenus:Array;
 //sub menu array.
 var subMenus:Array;


 //load the xml with xpath
 infoHolder.onLoad = function(ok) {
 if (ok) {
 mainMenus = mx.xpath.XPathAPI.selectNodeList(
infoHolder.firstChild
 ,
 titlePath+/menu);
 createTreeMenu();
 }
 };


 MovieClip.prototype.getPos = function(target:Number) {
 this.onEnterFrame = function() {
 this._y -= (this._y-target)/6;
 if (Math.abs(this._y-target)0.3) {
 delete this.onEnterFrame;
 _root.newsMC.showNews.appear();
 }
 };
 };


 function createTreeMenu():Void {
 for (i=0; imainMenus.length; i++) {
 newBut = _root.attachMovie(but, but+i, 999+i);
 newBut.arrow._alpha = 0;
 newBut.shine._alpha = 0;
 newBut._x = 105;
 newBut._y = 180+(newBut._height+5)*i;
 newBut.txt.text = mainMenus[i].attributes.txt;
 newBut.link2 = mainMenus[i].attributes.url;
 newBut.submenuCnt = mainMenus[i].childNodes.length;
 newBut.y = newBut._y;
 newBut.onRollOver = function() {
 _root.tween(this, 10, 13);
 this.arrow.appear();
 this.shine.appear();
 var textCol = new Color(this.txt);
 textCol.setRGB(0xff);

 };
 newBut.onRollOut = function() {
 _root.tween(this, 15, 10);
 this.arrow.disappear();
 this.shine.disappear();
 var textCol = new Color(this.txt);
 textCol.setRGB(0x6F6A63);
 };
 newBut.onRelease = function() {
 if (this.submenuCnt0) {
 var butNum:Number = new Number(this._name.substr(3, 1));
 this.createSubMenu(butNum);
 for (i=0; imainMenus.length; i++) {
 if (ibutNum+1) {
 _root[but+i].getPos(_root[but+i].y);
 } else {

 _root[but+i].getPos(_root[but+i].y+this.submenuCnt*22);
 }
 }
 }
 else {
 _root.conteudos_mc.portfolio_mc.clearSubMenus();
 for (i=0; imainMenus.length; i++) {
 _root[but+i].getPos(_root[but+i].y);
 }

 }
 };
 }
 }


 MovieClip.prototype.createSubMenu =
function(buttonNumber:Number):Void  {
 clearSubMenus();
 subMenus = mx.xpath.XPathAPI.selectNodeList(mainMenus[buttonNumber],
 /menu/submenu);
 var butNum:Number = new Number(this._name.substr(3, 1));
 for (i=0; isubMenus.length; i++) {
 subBut = _root.attachMovie(submenu, subMenu+i, Math.random
 ()*99);
 subBut._alpha = 0;
 subBut._x -= i;
 subAppear(subBut, (i+3), 130);
 subBut._y = this.y+this._height+(subBut._height+5)*i;
 subBut.txt.text = subMenus[i].attributes.txt;
 subBut.link2 = subMenus[i].attributes.url;
 subBut.but.onRollOver = function(){
 var textSubCol = new Color(this._parent.txt);
 textSubCol.setRGB(0xff);
 }
 subBut.but.onRollOut = function(){
 var textSubCol = new Color(this._parent.txt);
 textSubCol.setRGB(0x6F6A63);
 }
 subBut.but.onRelease = function() {
 loadMovie(this._parent.link2,
_root.conteudos_mc.vazio4_mc);
 //this doesnt disapear either...
 //trace(this._parent);
 };
 }
 };



 function clearSubMenus() {
 for (k=0; ksubMenus.length; k++) {
 _root[subMenu+k].removeMovieClip();
 }
 }

 function clearAllMenus() {
 for (i=0; imainMenus.length; i++) {
 _root[but+i].removeMovieClip();
 }
 }


 Sorry..but im really desperate with this...i tried with unloadMovie, and
 ...nothing happens...
 Many thanks.

 Jose Maria
 ___
 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] Help...cant unload the xml menu...!!

2006-07-31 Thread Jose Maria Barros

i singed too soon...when i test locally everything works great...but when i
try it in internet..it doesnt..he doestn load the xml file

why...?

The code is the same...but i did alter the url..like you said..:

//EDIT XML PATH
menuInfoXML = ./xml/menu.xml;
// DO NOT EDIT BELOW..

System.useCodepage = true;
import mx.xpath.XPathAPI;
var infoHolder:XML = new XML();
infoHolder.load(menuInfoXML);
infoHolder.ignoreWhite = true;
var titlePath:String = /root;
//main menu array.
var mainMenus:Array;
//sub menu array.
var subMenus:Array;

infoHolder.onLoad = function(ok) {
   if (ok) {
   mainMenus = mx.xpath.XPathAPI.selectNodeList(infoHolder.firstChild,
titlePath+/menu);
   createTreeMenu();
   }
};


MovieClip.prototype.getPos = function(target:Number) {
   this.onEnterFrame = function() {
   this._y -= (this._y-target)/6;
   if (Math.abs(this._y-target)0.3) {
   delete this.onEnterFrame;
   _root.newsMC.showNews.appear();
   }
   };
};


function createTreeMenu():Void {
   for (i=0; imainMenus.length; i++) {
   newBut = _root.conteudos_mc.portfolio_mc.attachMovie(but, but+i,
999+i);
   newBut.arrow._alpha = 0;
   newBut.shine._alpha = 0;
   newBut._x = 18;
   newBut._y = 93+(newBut._height+5)*i;
   newBut.txt.text = mainMenus[i].attributes.txt;
   newBut.link2 = mainMenus[i].attributes.url;
   newBut.submenuCnt = mainMenus[i].childNodes.length;
   newBut.y = newBut._y;
   newBut.onRollOver = function() {
   _root.conteudos_mc.portfolio_mc.tween(this, 16, 18);
   this.arrow.appear();
   this.shine.appear();
   var textCol = new Color(this.txt);
   textCol.setRGB(0xff);

   };
   newBut.onRollOut = function() {
   _root.conteudos_mc.portfolio_mc.tween(this, 18, 16);
   this.arrow.disappear();
   this.shine.disappear();
   var textCol = new Color(this.txt);
   textCol.setRGB(0x6F6A63);
   };
   newBut.onRelease = function() {
   if (this.submenuCnt0) {
   var butNum:Number = new Number(this._name.substr(3, 1));
   this.createSubMenu(butNum);
   for (i=0; imainMenus.length; i++) {
   if (ibutNum+1) {

_root.conteudos_mc.portfolio_mc[but+i].getPos(_root.conteudos_mc.portfolio_mc[but+i].y);
   } else {

_root.conteudos_mc.portfolio_mc[but+i].getPos(_root.conteudos_mc.portfolio_mc[but+i].y+this.submenuCnt*22);
   }
   }
   }
   else {
   _root.conteudos_mc.portfolio_mc.clearSubMenus();
   for (i=0; imainMenus.length; i++) {

_root.conteudos_mc.portfolio_mc[but+i].getPos(_root.conteudos_mc.portfolio_mc[but+i].y);
   }
   //getURL(this.link);
   }
   };
   }
}


MovieClip.prototype.createSubMenu = function(buttonNumber:Number):Void  {
   clearSubMenus();
   subMenus = mx.xpath.XPathAPI.selectNodeList(mainMenus[buttonNumber],
/menu/submenu);
   var butNum:Number = new Number(this._name.substr(3, 1));
   for (i=0; isubMenus.length; i++) {
   subBut = _root.conteudos_mc.portfolio_mc.attachMovie(submenu,
subMenu+i, Math.random()*99);
   subBut._alpha = 0;
   subBut._x -= i;
   subAppear(subBut, (i+3), 30);
   subBut._y = this.y+this._height+(subBut._height+5)*i;
   subBut.txt.text = subMenus[i].attributes.txt;
   subBut.link2 = subMenus[i].attributes.url;
   subBut.but.onRollOver = function(){
   var textSubCol = new Color(this._parent.txt);
   textSubCol.setRGB(0xff);
   }
   subBut.but.onRollOut = function(){
   var textSubCol = new Color(this._parent.txt);
   textSubCol.setRGB(0x6F6A63);
   }
   subBut.but.onRelease = function() {
   loadMovie(this._parent.link2, _root.conteudos_mc.vazio4_mc);
   trace(this._parent.link2);
   };
   }
};


function clearSubMenus() {
   for (k=0; ksubMenus.length; k++) {
   _root.conteudos_mc.portfolio_mc[subMenu+k].removeMovieClip();
   }
}


function clearAllMenus() {
   for (i=0; imainMenus.length; i++) {
   _root.conteudos_mc.portfolio_mc[but+i].removeMovieClip();
   }
}


Thanks...once again..xml drives me nuts..




On 7/31/06, Jose Maria Barros [EMAIL PROTECTED] wrote:


Oh manthank you so much..i was getting so frustrated...well..i am
...but at least..the problem is solved..



On 7/31/06, eric dolecki  [EMAIL PROTECTED] wrote:

 You are attaching everything to the _root, so you need to clean up the
 clips
 one by one, unless you decide to better nest your menu  submenu items
 in
 one movieclip. You could then remove it much easier, etc.

 On 7/31/06, Jose Maria Barros  [EMAIL PROTECTED] wrote:
 
  Hello, i have a xml menu and when i go to other frame my menu doenst
  unload...
  i tried with the functions clearMenu and clearSubMenu but they dont
  work..please help..i will send the code:
 
 
 
  import 

Re: [Flashcoders] Help: Confusion and Blue with Components

2006-07-14 Thread elibol

When you call gotoAndStop(), the player needs to first enter the frame where
mcParent is, this is why it works when you use onEnterFrame.

My technique for this has been to add a function call on the frame that the
clip resides in. I may call a function like Parent.init() on frame label
'TestFrame', or just init() and delegate the init function to a more
appropriate location:

import mx.utils.Delegate;

TestMC.init = Delegate.create(this, initTestMC);

function initTestMC(){
//this will be called when init() is called from within the movieclip
}

I hope this helps,

M

On 7/12/06, Tan [EMAIL PROTECTED] wrote:


Dear list,

I have been trying to solve this problem for a good while, but I wonder if
anyone has a good way to get around it. Here is the problem (you can
download the related Flash at: http://www.acts.net/Flash/ComponentBlue.zip

I have created a component called Parent, inside Parent timeline I have my
designer to layout components Child1 and Child2, so I only have to do the
wiring.

So now I have put Parent in the movie timeline at a frame labeled
TestFrame,
so we have a structure liked followed,

TestFrame
+ Parent
  - Child1
  - Child2


For the ease of description, I have classes with the same name as Parent,
Child1 and Child2. In the timeline, the Parent instance is named as
mcParent.


So somewhere in a function I will write like:

function myFunction():Void
{
  gotoAndStop(TestFrame);

  trace( this[mcParent] ); // it returns _level0.mcParent
  trace( Parent( this[mcParent] ); // the movieclip is there, but it
returns null }


Somehow I cannot get Parent as the Parent class. If I revise logic like:

function myFunction():Void
{
  gotoAndStop(TestFrame);

  trace( this[mcParent] ); // it returns _level0.mcParent
  trace( Parent( this[mcParent] ); // the movieclip is there, but it
returns null

  this.onEnterFrame = laterFunction;
}

function laterFunction():Void
{
  this.onEnterFrame = null;
  trace( this[mcParent] ); // it returns _level0.mcParent
  trace( Parent( this[mcParent] ); // now it returns _level0.mcParent
correctly }



The similar problem exists in Child1 and Child2 inside Parent timeline. It
seems to me that the MovieClip is not converted to its associated class
until later time, so I have to split my logic into two different
functions,
whic makes the code look cumbersome and hard to manage.

A more detailed example of the problem above can be downloaded at,
http://www.acts.net/Flash/ComponentBlue.zip

Although putting components on the stage using attachMovie might solve the
problem, but I would like the designer to have the freedom to arrange the
components on the stage the way he likes, and attachMovie would take away
this freedom. I wonder if anyone has a cleaner way around this problem.

TIA!

- Tangent

___
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] Help: Confusion and Blue with Components

2006-07-12 Thread Tan
Dear list,

I have been trying to solve this problem for a good while, but I wonder if
anyone has a good way to get around it. Here is the problem (you can
download the related Flash at: http://www.acts.net/Flash/ComponentBlue.zip

I have created a component called Parent, inside Parent timeline I have my
designer to layout components Child1 and Child2, so I only have to do the
wiring. 

So now I have put Parent in the movie timeline at a frame labeled TestFrame,
so we have a structure liked followed, 

TestFrame
 + Parent
  - Child1
  - Child2 


For the ease of description, I have classes with the same name as Parent,
Child1 and Child2. In the timeline, the Parent instance is named as
mcParent. 


So somewhere in a function I will write like:

function myFunction():Void
{
  gotoAndStop(TestFrame); 
  
  trace( this[mcParent] ); // it returns _level0.mcParent
  trace( Parent( this[mcParent] ); // the movieclip is there, but it
returns null } 


Somehow I cannot get Parent as the Parent class. If I revise logic like:

function myFunction():Void
{
  gotoAndStop(TestFrame); 
  
  trace( this[mcParent] ); // it returns _level0.mcParent
  trace( Parent( this[mcParent] ); // the movieclip is there, but it
returns null 

  this.onEnterFrame = laterFunction;
} 

function laterFunction():Void
{
  this.onEnterFrame = null;
  trace( this[mcParent] ); // it returns _level0.mcParent
  trace( Parent( this[mcParent] ); // now it returns _level0.mcParent
correctly } 



The similar problem exists in Child1 and Child2 inside Parent timeline. It
seems to me that the MovieClip is not converted to its associated class
until later time, so I have to split my logic into two different functions,
whic makes the code look cumbersome and hard to manage. 

A more detailed example of the problem above can be downloaded at,
http://www.acts.net/Flash/ComponentBlue.zip 

Although putting components on the stage using attachMovie might solve the
problem, but I would like the designer to have the freedom to arrange the
components on the stage the way he likes, and attachMovie would take away
this freedom. I wonder if anyone has a cleaner way around this problem. 

TIA!

- Tangent

___
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] help with embedded fonts...

2006-07-11 Thread grimmwerks

It's got to be something stupid.

I'm using the textformatter from netdrims -- I've got an input
TextField that I only want Baskerville to be used - but the ability to
set the bold or italic is needed.

I've embedded the font in the field but when I set text as bold or
italic, it disappears.

What stupidity am I missing?
___
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] help with embedded fonts...

2006-07-11 Thread Ian Thomas

Hi grimm,
 You need to embed the italic and bold versions of the font, too.
Best bet is to stick all three in off-screen dynamic textfields
somewhere (or exported in your library).

HTH,
 Ian

On 7/11/06, grimmwerks [EMAIL PROTECTED] wrote:

It's got to be something stupid.

I'm using the textformatter from netdrims -- I've got an input
TextField that I only want Baskerville to be used - but the ability to
set the bold or italic is needed.

I've embedded the font in the field but when I set text as bold or
italic, it disappears.

What stupidity am I missing?
___
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] help with embedded fonts...

2006-07-11 Thread Steven Sacks | BLITZ
 Hi grimm,
   You need to embed the italic and bold versions of the font, too.
 Best bet is to stick all three in off-screen dynamic textfields
 somewhere (or exported in your library).

Old school Flasher trick - works like a charm.  Nice suggestion for all
these code monkeys who forget (or never learned) Flash stuff and for
all the newbies who are still learning.  :)

___
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] help with embedded fonts...

2006-07-11 Thread Weyert de Boer

Steven Sacks | BLITZ wrote:

Old school Flasher trick - works like a charm.  Nice suggestion for all
these code monkeys who forget (or never learned) Flash stuff and for
all the newbies who are still learning.  :)
  
I just go nuts with all the font issues I have with Flash on the Mac. 
It's not fun anymore.

___
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] help with embedded fonts...

2006-07-11 Thread Palmer, Jim
On a side note, use setNewTextFormat() as well as setTextFormat() seeing as
it's an input field...

TextField.setTextFormat(TextFormat);
TextField.setNewTextFormat(TextFormat);

and yes you need to embed all the font glyphs, bold and italic.

--
Jim Palmer ! Mammoth Web Operations

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Danny
 Kodicek
 Sent: Tuesday, July 11, 2006 2:51 AM
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] help with embedded fonts...
 
 
  Hi grimm,
You need to embed the italic and bold versions of the font, too.
  Best bet is to stick all three in off-screen dynamic textfields
  somewhere (or exported in your library).
 
 Alternatively, enable the textField's HTML property and embed 
 all the font
 styles in the same field.
 
 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
 
___
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] help with embedded fonts...

2006-07-11 Thread Iv
Hello grimmwerks,

http://www.sharedfonts.com/eng/faq.html#include


-- 
Ivan Dembicki

[EMAIL PROTECTED] || 
http://www.design.ru

___
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] Help anyone?

2006-07-10 Thread John Hart

Hi to all



I am ready to pay anyone that can solve the following problem!





Here is the dilemma:



Note: for a better understanding of what I am seeking here, I am including a 
link to a diagram that you can download in a zip format.




http://www.usedextruders.com/flashproblem.zip





Ok in Visual Basic you put on a simple form a ShockwaveFlash control that 
has its window mode properties set to Window as show in Fig.1   this work 
just fine and it show the Flash movie as it should.




Next you do the same thing again but this time you set the window mode 
properties to Transparent as show in Fig.2 now the background of the Flash 
movie is gone and only the content of the movie is revealed.  Up to this 
point everything is perfect.




Same form again but this time you ad a webbrowser control and make it 
navigate to say adobe.com and move the browser control to the back of the 
form in order to have the Flash movie show above it with the window mode 
properties set to Window as show in Fig.3 now no problem here, everything 
works just fine.




Next same form again but this time you set the window mode properties to 
Transparent and the Flash movie becomes no longer visible!!! No matter 
what you do to have that movie showing above the webbrowser control, it does 
not work.. The movie set to transparent, automatically get send to the back 
of the form and no known programming trick can bring it back to the front 
above the webbrowser control as show in Fig.4.




What I would like to do is a way to keep that Flash movie above the 
webbrowser control but keep the transparent property of the movie so that 
animation is possible above the webbrowser control as show in Fig.5.




If you think that you can solve this problem then contact me at the 
following address: [EMAIL PROTECTED]




Thanks to all



John

___
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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-08 Thread Bernard Poulin

Alternative way of instanciating a class without a library and without the
__Package hack either.

Create a class with this function:
function attachClassMovie(parentmc:MovieClip, className:Function,
instanceName:String, depth:Number, argv:Array):MovieClip
{
// Create emptyMovieClip
var new_mc:MovieClip = parentmc.createEmptyMovieClip(instanceName, depth);

// Save classe prototype
new_mc.__proto__ = className.prototype;

// apply the constructor
className.apply(new_mc, argv);

// return new clip
return new_mc;
}

var mc = attachClassMovie(parent_mc, com.Class, child, 10, [param1,
param2]);


2006/7/7, Julian Bleecker [EMAIL PROTECTED]:


Ian,

Those casting gymnastics definitely help — thanks a lot.

Julian

On Jul 7, 2006, at 9:27 PDT, Ian Thomas wrote:

 On 7/7/06, Julian Bleecker [EMAIL PROTECTED] wrote:
 One other thing occurred to me on this topic, that might actually
 save the trouble of using a hash table, which AS direly needs.

 Is there a way to summon forth a class that's been instantiated in
 any of the ways described below, by name?

 In other words, if I've done this:

 for(var i:Number = 0; i  12; i++) {
   Object.registerClass(symbolName,FooA);
   var clip:FooA=FooA(myMovie.attachMovie
 (symbolName,anInstanceName_+i,depth));
 }

 And elsewhere, I want to summon forth these dynamically in another
 loop or otherwise (something I might normally do by stuffing the
 instances in a hash or map somewhere and using the name as the key) -
 can I do that in some fashion? Is there an AS idiom for obtaining a
 reference to a MovieClip (or other runtime object) by name?

 Julian

 Firstly, Actionscript does have the equivalent of a HashMap.
 Everything derived from Object can be treated like so:

 var obj:Object=new Object();
 obj[someKey]=Hello;
 trace(obj[someKey]); // traces Hello

 The bracket access on an object actually accesses the properties and
 methods of that object.
 Hence:
 var myClip:MovieClip = ...some movieclip...
 trace(myClip._visible);
 trace(myClip[_visible]); // equivalent to the last line
 myClip.doSomething(1,2,3);
 myClip[doSomething](1,2,3); // equivalent to last line.
 myClip._y=20;
 myClip[_y]=20; // again, equivalent

 When you create/attach an instance of a MovieClip to a parent
 movieclip, you are actually creating new properties on that parent
 clip.

 So:
 var myClip:MovieClip=someClip.attachMovie(Symbol,aNewClip,1);
 trace(myClip==this[aNewClip); // traces 'true'

 To get back to your original question, this means you can type:
 var myClip:MovieClip=myMovie[anInstanceName_0];

 to retrieve your clip.

 HTH,
  Ian
 ___
 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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-07 Thread Ian Thomas

Hi Julian,
 They do return references.

 You just have to cast them to the correct type.

 e.g. var clip:MyClip=MyClip(attachMovie(SymbolName,instanceName,depth));

HTH,
 Ian

On 7/7/06, Julian Bleecker [EMAIL PROTECTED] wrote:

Yeah, I think it gets worse. I'm used to a pattern where you create a
whole bunch of something — so, back to the problem I originally
asked, if I want have my mainClip create a dozen subClip instances
and tuck each one of those instances in an Array for later use,
especially calling that useful method. I guess I'm asking how one can
call a method on an instance where the instance's name is derived at
runtime.

For instance, in this example you provided, which works for the
single subClip00 instance variable, how would I do the same thing,
only with a runtime derived name?

class mainClip extends MovieClip
{
public var subClip00:subClip;

function mainClip() {
trace(new mainClip!);

init();
}

function init():Void {
for(int i=0; i12; i++) {
attachMovie(subClip, subClip_+i, 
this.getNextHighestDepth());
//this.subClip00.usefulMethod(); this won't work..how 
to call a
method with no reference — only a name?
}
}
}

But, the bigger question is: why don't things like attachMovie or
such return references to the things they're attaching?

Julian

On Jul 6, 2006, at 20:50 PDT, Mike Britton wrote:

 Perhaps, but you never know: someone on this list may have a better
 solution for your problem.

 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

___
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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-07 Thread Julian Bleecker
Ah, slowly getting it..I've dug in so deeply with Java idioms that  
it's almost like being Charleton Heston in Planet of the Apes..


.julian.

Julian Bleecker, Ph.D.
http://research.techkwondo.com
[EMAIL PROTECTED]



On Jul 6, 2006, at 23:28 PDT, Ian Thomas wrote:


Hi Julian,
 They do return references.

 You just have to cast them to the correct type.

 e.g. var clip:MyClip=MyClip(attachMovie 
(SymbolName,instanceName,depth));


HTH,
 Ian

On 7/7/06, Julian Bleecker [EMAIL PROTECTED] wrote:

Yeah, I think it gets worse. I'm used to a pattern where you create a
whole bunch of something — so, back to the problem I originally
asked, if I want have my mainClip create a dozen subClip instances
and tuck each one of those instances in an Array for later use,
especially calling that useful method. I guess I'm asking how one can
call a method on an instance where the instance's name is derived at
runtime.

For instance, in this example you provided, which works for the
single subClip00 instance variable, how would I do the same thing,
only with a runtime derived name?

class mainClip extends MovieClip
{
public var subClip00:subClip;

function mainClip() {
trace(new mainClip!);

init();
}

function init():Void {
for(int i=0; i12; i++) {
attachMovie(subClip, subClip_+i,  
this.getNextHighestDepth());
//this.subClip00.usefulMethod(); this  
won't work..how to call a

method with no reference — only a name?
}
}
}

But, the bigger question is: why don't things like attachMovie or
such return references to the things they're attaching?

Julian

On Jul 6, 2006, at 20:50 PDT, Mike Britton wrote:

 Perhaps, but you never know: someone on this list may have a better
 solution for your problem.

 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

___
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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-07 Thread Ian Thomas

Hi Julian,
 Now I've had my first cup of coffee I'll try to explain it more clearly. :-)

 In most cases AS2 works very similarly to Java in terms of
inheritance, instantiation and casting and the like - the only main
gotcha is that the class casting operator is MyClass(x) rather than
(MyClass)x - which looks suspiciously like a constructor and can
confuse the issue.

 The major difference is when we come to MovieClips, or
MovieClip-a-likes (TextField, for example). For historical reasons an
object which is of class MovieClip or an object which derives from
class MovieClip can't be instantiated directly via new - so new
MovieClip() or new FooA() (which extends MovieClip) will not work.
(Roll on AS3!)

 You can create a new, plain, vanilla MovieClip like so:

var clip:MovieClip=myMovie.createEmptyMovieClip(instanceName,depth);

 You can create a MovieClip which represents a symbol in the library like so:
var clip:MovieClip=myMovie.attachMovie(symbolName,instanceName,depth);

Both of these operations dynamically create a new property,
'instanceName', on myMovie. If myMovie were a plain MovieClip (and
thus dynamically typed), you could type:

myMovie.createEmptyMovieClip(fred,depth);
myMovie.fred._visible=false; // do something to the clip
var clip:MovieClip=myMovie.fred; // grab a reference to the clip

(As an aside, if you're working with a non-dynamic class as the parent
movie clip i.e. something derived from MovieClip, the compiler
complains because it doesn't know about the variable fred - you can
type:
var clip:MovieClip=myMovie[fred];
to get around this.)

To create an object associated with a symbol that is of a type derived
from MovieClip (e.g. FooA extends MovieClip) you can either:

 Set the class name in the linkage dialog of the library symbol.
 var clip:FooA=FooA(myMovie.attachMovie(symbolName,instanceName,depth));
 (or
 var clip:MovieClip=myMovie.attachMovie(symbolName,instanceName,depth);
 var foo:FooA=FooA(clip);
 It's the same thing)

or purely by code:

 Object.registerClass(symbolName,FooA);
 var clip:FooA=FooA(myMovie.attachMovie(symbolName,instanceName,depth));

If you want to create an object which is derived from MovieClip that
is _not_ associated with a symbol instance (i.e. effectively an
emptyMovieClip with an associated class), you can do this arcane hack:

(For arguments sake, let's say FooA is actually com.misc.FooA which
extends MovieClip)
var symbolName:String=__Packages.com.misc.FooA;
Object.registerClass(symbolName,FooA);
var clip:FooA=FooA(myMovie.attachMovie(symbolName,instanceName,depth));

(The trick here is that for each class, Flash registers an 'invisible'
symbol with the name __Packages.full class and package)

I think that covers almost all you need to know about instantiating
MovieClips. :-)

I came from a Java background too (amongst other things), and it does
all sort of make logical sense, if you think of createEmptyMovieClip
and attachMovie as being object factories. But like I say, roll on
AS3, which gets rid of a lot of these historical peculiarities.

Hope that's more help,
 Ian


On 7/7/06, Julian Bleecker [EMAIL PROTECTED] wrote:

Ah, slowly getting it..I've dug in so deeply with Java idioms that
it's almost like being Charleton Heston in Planet of the Apes..

.julian.

Julian Bleecker, Ph.D.
http://research.techkwondo.com
[EMAIL PROTECTED]



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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-07 Thread Julian Bleecker
That's great Ian — thanks for the help! Each of those little idioms  
makes sense when described — I never would've figured these out just  
whacking at various permutations, particularly the very baroque  
incantation leveraging the invisible symbol names.


I guess I should be looking forward to AS3, too — presumably it is  
more strongly typed and gets rid of the dusty historical legacies.


Julian

On Jul 7, 2006, at 0:25 PDT, Ian Thomas wrote:


Hi Julian,
 Now I've had my first cup of coffee I'll try to explain it more  
clearly. :-)


 In most cases AS2 works very similarly to Java in terms of
inheritance, instantiation and casting and the like - the only main
gotcha is that the class casting operator is MyClass(x) rather than
(MyClass)x - which looks suspiciously like a constructor and can
confuse the issue.

 The major difference is when we come to MovieClips, or
MovieClip-a-likes (TextField, for example). For historical reasons an
object which is of class MovieClip or an object which derives from
class MovieClip can't be instantiated directly via new - so new
MovieClip() or new FooA() (which extends MovieClip) will not work.
(Roll on AS3!)

 You can create a new, plain, vanilla MovieClip like so:

var clip:MovieClip=myMovie.createEmptyMovieClip(instanceName,depth);

 You can create a MovieClip which represents a symbol in the  
library like so:

var clip:MovieClip=myMovie.attachMovie(symbolName,instanceName,depth);

Both of these operations dynamically create a new property,
'instanceName', on myMovie. If myMovie were a plain MovieClip (and
thus dynamically typed), you could type:

myMovie.createEmptyMovieClip(fred,depth);
myMovie.fred._visible=false; // do something to the clip
var clip:MovieClip=myMovie.fred; // grab a reference to the clip

(As an aside, if you're working with a non-dynamic class as the parent
movie clip i.e. something derived from MovieClip, the compiler
complains because it doesn't know about the variable fred - you can
type:
var clip:MovieClip=myMovie[fred];
to get around this.)

To create an object associated with a symbol that is of a type derived
from MovieClip (e.g. FooA extends MovieClip) you can either:

 Set the class name in the linkage dialog of the library symbol.
 var clip:FooA=FooA(myMovie.attachMovie 
(symbolName,instanceName,depth));

 (or
 var clip:MovieClip=myMovie.attachMovie 
(symbolName,instanceName,depth);

 var foo:FooA=FooA(clip);
 It's the same thing)

or purely by code:

 Object.registerClass(symbolName,FooA);
 var clip:FooA=FooA(myMovie.attachMovie 
(symbolName,instanceName,depth));


If you want to create an object which is derived from MovieClip that
is _not_ associated with a symbol instance (i.e. effectively an
emptyMovieClip with an associated class), you can do this arcane hack:

(For arguments sake, let's say FooA is actually com.misc.FooA which
extends MovieClip)
var symbolName:String=__Packages.com.misc.FooA;
Object.registerClass(symbolName,FooA);
var clip:FooA=FooA(myMovie.attachMovie 
(symbolName,instanceName,depth));


(The trick here is that for each class, Flash registers an 'invisible'
symbol with the name __Packages.full class and package)

I think that covers almost all you need to know about instantiating
MovieClips. :-)

I came from a Java background too (amongst other things), and it does
all sort of make logical sense, if you think of createEmptyMovieClip
and attachMovie as being object factories. But like I say, roll on
AS3, which gets rid of a lot of these historical peculiarities.

Hope that's more help,
 Ian


On 7/7/06, Julian Bleecker [EMAIL PROTECTED] wrote:

Ah, slowly getting it..I've dug in so deeply with Java idioms that
it's almost like being Charleton Heston in Planet of the Apes..

.julian.

Julian Bleecker, Ph.D.
http://research.techkwondo.com
[EMAIL PROTECTED]



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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-07 Thread Alan MacDougall

Julian Bleecker wrote:

That's great Ian — thanks for the help! Each of those little idioms  
makes sense when described — I never would've figured these out just  
whacking at various permutations, particularly the very baroque  
incantation leveraging the invisible symbol names.


You may find it more convenient to consider MovieClip items as 
primitives -- or at least not worth your time to extend -- and create 
classes which wrap them. If you just want MovieClips to do particular 
things, or exhibit polymorphic behavior, you can probably get away with 
this:


class Foo
{
   private var myClip:MovieClip;

   public function Foo()
   {
  // create the MovieClip, possibly by
  // creating a new instance from the library
   }

   public function doThing()
   {
  myClip.doSomething();
  myClip.doSomethingElse();
  var tween:Tween = new Tween(some properties, myClip);
  trace(And so on);
   }
}

I find this approach easier to work with and, since you could have more 
than one MovieClip in your custom object, more flexible. (Sure, Flash 
also lets you nest MovieClips ad infinitum, but moving away from 
parent.child.child.child is another benefit of going Java style.)


___
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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-07 Thread Julian Bleecker
One other thing occurred to me on this topic, that might actually  
save the trouble of using a hash table, which AS direly needs.


Is there a way to summon forth a class that's been instantiated in  
any of the ways described below, by name?


In other words, if I've done this:

for(var i:Number = 0; i  12; i++) {
 Object.registerClass(symbolName,FooA);
 var clip:FooA=FooA(myMovie.attachMovie 
(symbolName,anInstanceName_+i,depth));

}

And elsewhere, I want to summon forth these dynamically in another  
loop or otherwise (something I might normally do by stuffing the  
instances in a hash or map somewhere and using the name as the key) -  
can I do that in some fashion? Is there an AS idiom for obtaining a  
reference to a MovieClip (or other runtime object) by name?


Julian

On Jul 7, 2006, at 0:25 PDT, Ian Thomas wrote:


Hi Julian,
 Now I've had my first cup of coffee I'll try to explain it more  
clearly. :-)


 In most cases AS2 works very similarly to Java in terms of
inheritance, instantiation and casting and the like - the only main
gotcha is that the class casting operator is MyClass(x) rather than
(MyClass)x - which looks suspiciously like a constructor and can
confuse the issue.

 The major difference is when we come to MovieClips, or
MovieClip-a-likes (TextField, for example). For historical reasons an
object which is of class MovieClip or an object which derives from
class MovieClip can't be instantiated directly via new - so new
MovieClip() or new FooA() (which extends MovieClip) will not work.
(Roll on AS3!)

 You can create a new, plain, vanilla MovieClip like so:

var clip:MovieClip=myMovie.createEmptyMovieClip(instanceName,depth);

 You can create a MovieClip which represents a symbol in the  
library like so:

var clip:MovieClip=myMovie.attachMovie(symbolName,instanceName,depth);

Both of these operations dynamically create a new property,
'instanceName', on myMovie. If myMovie were a plain MovieClip (and
thus dynamically typed), you could type:

myMovie.createEmptyMovieClip(fred,depth);
myMovie.fred._visible=false; // do something to the clip
var clip:MovieClip=myMovie.fred; // grab a reference to the clip

(As an aside, if you're working with a non-dynamic class as the parent
movie clip i.e. something derived from MovieClip, the compiler
complains because it doesn't know about the variable fred - you can
type:
var clip:MovieClip=myMovie[fred];
to get around this.)

To create an object associated with a symbol that is of a type derived
from MovieClip (e.g. FooA extends MovieClip) you can either:

 Set the class name in the linkage dialog of the library symbol.
 var clip:FooA=FooA(myMovie.attachMovie 
(symbolName,instanceName,depth));

 (or
 var clip:MovieClip=myMovie.attachMovie 
(symbolName,instanceName,depth);

 var foo:FooA=FooA(clip);
 It's the same thing)

or purely by code:

 Object.registerClass(symbolName,FooA);
 var clip:FooA=FooA(myMovie.attachMovie 
(symbolName,instanceName,depth));


If you want to create an object which is derived from MovieClip that
is _not_ associated with a symbol instance (i.e. effectively an
emptyMovieClip with an associated class), you can do this arcane hack:

(For arguments sake, let's say FooA is actually com.misc.FooA which
extends MovieClip)
var symbolName:String=__Packages.com.misc.FooA;
Object.registerClass(symbolName,FooA);
var clip:FooA=FooA(myMovie.attachMovie 
(symbolName,instanceName,depth));


(The trick here is that for each class, Flash registers an 'invisible'
symbol with the name __Packages.full class and package)

I think that covers almost all you need to know about instantiating
MovieClips. :-)

I came from a Java background too (amongst other things), and it does
all sort of make logical sense, if you think of createEmptyMovieClip
and attachMovie as being object factories. But like I say, roll on
AS3, which gets rid of a lot of these historical peculiarities.

Hope that's more help,
 Ian


On 7/7/06, Julian Bleecker [EMAIL PROTECTED] wrote:

Ah, slowly getting it..I've dug in so deeply with Java idioms that
it's almost like being Charleton Heston in Planet of the Apes..

.julian.

Julian Bleecker, Ph.D.
http://research.techkwondo.com
[EMAIL PROTECTED]



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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-07 Thread Ian Thomas

On 7/7/06, Julian Bleecker [EMAIL PROTECTED] wrote:

One other thing occurred to me on this topic, that might actually
save the trouble of using a hash table, which AS direly needs.

Is there a way to summon forth a class that's been instantiated in
any of the ways described below, by name?

In other words, if I've done this:

for(var i:Number = 0; i  12; i++) {
  Object.registerClass(symbolName,FooA);
  var clip:FooA=FooA(myMovie.attachMovie
(symbolName,anInstanceName_+i,depth));
}

And elsewhere, I want to summon forth these dynamically in another
loop or otherwise (something I might normally do by stuffing the
instances in a hash or map somewhere and using the name as the key) -
can I do that in some fashion? Is there an AS idiom for obtaining a
reference to a MovieClip (or other runtime object) by name?

Julian


Firstly, Actionscript does have the equivalent of a HashMap.
Everything derived from Object can be treated like so:

var obj:Object=new Object();
obj[someKey]=Hello;
trace(obj[someKey]); // traces Hello

The bracket access on an object actually accesses the properties and
methods of that object.
Hence:
var myClip:MovieClip = ...some movieclip...
trace(myClip._visible);
trace(myClip[_visible]); // equivalent to the last line
myClip.doSomething(1,2,3);
myClip[doSomething](1,2,3); // equivalent to last line.
myClip._y=20;
myClip[_y]=20; // again, equivalent

When you create/attach an instance of a MovieClip to a parent
movieclip, you are actually creating new properties on that parent
clip.

So:
var myClip:MovieClip=someClip.attachMovie(Symbol,aNewClip,1);
trace(myClip==this[aNewClip); // traces 'true'

To get back to your original question, this means you can type:
var myClip:MovieClip=myMovie[anInstanceName_0];

to retrieve your clip.

HTH,
 Ian
___
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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-07 Thread Ian Thomas

(To be clear - Object isn't quite the equivalent of HashMap, as you
can't natively specify hash codes etc. etc. But for many purposes, it
serves the same uses.)

Ian

On 7/7/06, Ian Thomas [EMAIL PROTECTED] wrote:



Firstly, Actionscript does have the equivalent of a HashMap.
Everything derived from Object can be treated like so:

___
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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-07 Thread Julian Bleecker

Alan,

Thanks - that gives me a different approach to try out that sounds  
very promising.


Julian

On Jul 7, 2006, at 8:59 PDT, Alan MacDougall wrote:


Julian Bleecker wrote:

That's great Ian — thanks for the help! Each of those little  
idioms  makes sense when described — I never would've figured  
these out just  whacking at various permutations, particularly the  
very baroque  incantation leveraging the invisible symbol names.


You may find it more convenient to consider MovieClip items as  
primitives -- or at least not worth your time to extend -- and  
create classes which wrap them. If you just want MovieClips to do  
particular things, or exhibit polymorphic behavior, you can  
probably get away with this:


class Foo
{
   private var myClip:MovieClip;

   public function Foo()
   {
  // create the MovieClip, possibly by
  // creating a new instance from the library
   }

   public function doThing()
   {
  myClip.doSomething();
  myClip.doSomethingElse();
  var tween:Tween = new Tween(some properties, myClip);
  trace(And so on);
   }
}

I find this approach easier to work with and, since you could have  
more than one MovieClip in your custom object, more flexible.  
(Sure, Flash also lets you nest MovieClips ad infinitum, but moving  
away from parent.child.child.child is another benefit of going Java  
style.)


___
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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-07 Thread Julian Bleecker

Ian,

Those casting gymnastics definitely help — thanks a lot.

Julian

On Jul 7, 2006, at 9:27 PDT, Ian Thomas wrote:


On 7/7/06, Julian Bleecker [EMAIL PROTECTED] wrote:

One other thing occurred to me on this topic, that might actually
save the trouble of using a hash table, which AS direly needs.

Is there a way to summon forth a class that's been instantiated in
any of the ways described below, by name?

In other words, if I've done this:

for(var i:Number = 0; i  12; i++) {
  Object.registerClass(symbolName,FooA);
  var clip:FooA=FooA(myMovie.attachMovie
(symbolName,anInstanceName_+i,depth));
}

And elsewhere, I want to summon forth these dynamically in another
loop or otherwise (something I might normally do by stuffing the
instances in a hash or map somewhere and using the name as the key) -
can I do that in some fashion? Is there an AS idiom for obtaining a
reference to a MovieClip (or other runtime object) by name?

Julian


Firstly, Actionscript does have the equivalent of a HashMap.
Everything derived from Object can be treated like so:

var obj:Object=new Object();
obj[someKey]=Hello;
trace(obj[someKey]); // traces Hello

The bracket access on an object actually accesses the properties and
methods of that object.
Hence:
var myClip:MovieClip = ...some movieclip...
trace(myClip._visible);
trace(myClip[_visible]); // equivalent to the last line
myClip.doSomething(1,2,3);
myClip[doSomething](1,2,3); // equivalent to last line.
myClip._y=20;
myClip[_y]=20; // again, equivalent

When you create/attach an instance of a MovieClip to a parent
movieclip, you are actually creating new properties on that parent
clip.

So:
var myClip:MovieClip=someClip.attachMovie(Symbol,aNewClip,1);
trace(myClip==this[aNewClip); // traces 'true'

To get back to your original question, this means you can type:
var myClip:MovieClip=myMovie[anInstanceName_0];

to retrieve your clip.

HTH,
 Ian
___
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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-06 Thread Julian Bleecker

Okay, here's the drill.

I have a MovieClip — call it FooA — that's been linked to an AS2  
class — call it FooA_Class — (that extends MovieClip and does lots of  
other useful things.)


In that MovieClip, I have another MovieClip — SubFooA — that's been  
exported and given a proper instance name. In FooA_Class there's an  
instance variable that has the same name as the instance name for  
SubFooA (that idiom is weird, but okay..)


I would like to, in ActionScript, dynamically instantiate and render  
onto the stage several instances of FooA — it's a MovieClip, after  
all — it has some visual things in itself, like colored blocks and  
stuff.


Now, I want to also, in ActionScript, call a bunch of the useful  
methods that FooA_Class has.


What's the idiom for doing such a thing??

I've tried what the Java guy in me says to, like instantiate FooA and  
do things with it:


var mFooA:FooA = new FooA();
mFooA.doSomeMethod();

But, now I can't get it on the stage properly, even with various  
incarnations of attachMovie in either the constructor of FooA, or  
right there after the constructor (registerClass/attachMovie)


Then I try this confusing idiom:

Object.registerClass(mFooA, FooA);
_root.attachMovie(FooA, FooA, 1);

The MovieClip FooA appears on the stage, but that's it — I can't call  
useful methods on it as I have no proper handle to the instance.


If I do this:

Object.registerClass(mFooA, FooA);
var aObject:Object = _root.attachMovie(FooA, FooA, 1);

what is returned from attachMovie isn't properly cast to my class  
type — which is a bit odd. I mean, if I do this:


Object.registerClass(mFooA, FooA);
var aObject:FooA_Class = _root.attachMovie(FooA, FooA, 1);

Flash complains — whatever the equivalent of a class cast error it  
spouts..type mismatch or something?


So, the basic question is this: how can I programmatically  
instantiate and deliver to the stage a movie clip linked to my own  
custom class (which extends MovieClip) and then actually call the  
useful methods contained within that linked custom class?


This _has_ to be easy, no?

Julian


Julian Bleecker, Ph.D.
http://research.techkwondo.com
[EMAIL PROTECTED]



___
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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-06 Thread Mike Britton

Hey Julian,

I feel your pain.  Take a look at this example:
http://www.randomusa.com/flash/downloads/tojulian.zip

Mike Britton
___
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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-06 Thread Julian Bleecker

Cripes.

Thanks Mike! So, this magic of turning a named instance into the name  
of the instance variable gets carried to its logical, but somewhat  
weird, conclusion.


Julian

On Jul 6, 2006, at 19:30 PDT, Mike Britton wrote:


Hey Julian,

I feel your pain.  Take a look at this example:
http://www.randomusa.com/flash/downloads/tojulian.zip

Mike Britton
___
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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-06 Thread Mike Britton

Perhaps, but you never know: someone on this list may have a better
solution for your problem.

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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-06 Thread Ian Thomas

Hi Julian,
 You were nearly there with:
Object.registerClass(mFooA, FooA);
var aObject:FooA_Class = _root.attachMovie(FooA, FooA, 1);

Just change it to:
Object.registerClass(mFooA, FooA);
var aObject:FooA_Class = FooA_Class(_root.attachMovie(FooA, FooA, 1));

(as Class(x) is the equivalent of the Java class cast operator (Class)x)

HTH,
 Ian

On 7/7/06, Mike Britton [EMAIL PROTECTED] wrote:

Perhaps, but you never know: someone on this list may have a better
solution for your problem.

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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-06 Thread Ian Thomas

Whoops, sorry, missed your extra 'm' on 'mFooA' (not sure why that
crept in there?):
Object.registerClass(FooA, FooA);
var aObject:FooA_Class = _root.attachMovie(FooA, FooA, 1);

Ian

On 7/7/06, Ian Thomas [EMAIL PROTECTED] wrote:

Hi Julian,
  You were nearly there with:
Object.registerClass(mFooA, FooA);
var aObject:FooA_Class = _root.attachMovie(FooA, FooA, 1);

Just change it to:
Object.registerClass(mFooA, FooA);
var aObject:FooA_Class = FooA_Class(_root.attachMovie(FooA, FooA, 1));

(as Class(x) is the equivalent of the Java class cast operator (Class)x)

HTH,
  Ian

On 7/7/06, Mike Britton [EMAIL PROTECTED] wrote:
 Perhaps, but you never know: someone on this list may have a better
 solution for your problem.

 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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-06 Thread Ian Thomas

*sigh* Having a bad morning and copying the wrong line. Third time lucky:

Object.registerClass(FooA, FooA_Class);
var aObject:FooA_Class = FooA_Class(_root.attachMovie(FooA, FooA, 1));


Ian

On 7/7/06, Ian Thomas [EMAIL PROTECTED] wrote:

Whoops, sorry, missed your extra 'm' on 'mFooA' (not sure why that
crept in there?):
Object.registerClass(FooA, FooA);
var aObject:FooA_Class = _root.attachMovie(FooA, FooA, 1);

Ian

On 7/7/06, Ian Thomas [EMAIL PROTECTED] wrote:
 Hi Julian,
   You were nearly there with:
 Object.registerClass(mFooA, FooA);
 var aObject:FooA_Class = _root.attachMovie(FooA, FooA, 1);

 Just change it to:
 Object.registerClass(mFooA, FooA);
 var aObject:FooA_Class = FooA_Class(_root.attachMovie(FooA, FooA, 1));

 (as Class(x) is the equivalent of the Java class cast operator (Class)x)

 HTH,
   Ian

 On 7/7/06, Mike Britton [EMAIL PROTECTED] wrote:
  Perhaps, but you never know: someone on this list may have a better
  solution for your problem.
 
  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] Help for a Java Guy: Instantiating a MovieClip with a linked class and calling class methods

2006-07-06 Thread Julian Bleecker
Yeah, I think it gets worse. I'm used to a pattern where you create a  
whole bunch of something — so, back to the problem I originally  
asked, if I want have my mainClip create a dozen subClip instances  
and tuck each one of those instances in an Array for later use,  
especially calling that useful method. I guess I'm asking how one can  
call a method on an instance where the instance's name is derived at  
runtime.


For instance, in this example you provided, which works for the  
single subClip00 instance variable, how would I do the same thing,  
only with a runtime derived name?


class mainClip extends MovieClip
{
public var subClip00:subClip;

function mainClip() {
trace(new mainClip!);

init();
}

function init():Void {
for(int i=0; i12; i++) {
attachMovie(subClip, subClip_+i, 
this.getNextHighestDepth());
			//this.subClip00.usefulMethod(); this won't work..how to call a  
method with no reference — only a name?

}
}
}

But, the bigger question is: why don't things like attachMovie or  
such return references to the things they're attaching?


Julian

On Jul 6, 2006, at 20:50 PDT, Mike Britton wrote:


Perhaps, but you never know: someone on this list may have a better
solution for your problem.

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


___
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] Help needed

2006-06-29 Thread Roliks Long

Hey guys I have a questionn.

   My client wants to have flash display a spectrum wave graph. I am using 
Swift and I know it examines the MP3 during the conversion process and 
generates spectrum values that can be used to create the spectrum analyzer 
animation. Wouldnt it be possible to take this information for all 17 values 
per frame and plot a graphic of the wave (EX: like a sin, cos wave or wav 
editor). I have tried a couple things and I havent been able to get it to work 
at all. 

Any help would be appreciated as I am at a loss and getting frustrated now.
Thanks
-Ski





 Subject: RE: [Flashcoders] li color
 Date: Thu, 29 Jun 2006 10:19:42 -0400
 From: [EMAIL PROTECTED]
 To: flashcoders@chattyfig.figleaf.com
 
 Jason/Adrian,
 
 I am running a SWF and it displays the li text and bullet in the color
 from the CSS.
 
 Here is a sample:
 
 function loadCSS() {
   setupCSS = new TextField.StyleSheet();
   setupCSS.onLoad = function(success) {
   if (success) {
   trace(CSS Loaded)
   }
   };
   setupCSS.load(template.css);
 }
 
 function displayText(currentText) {
   interfaceSWF.mainTxt.styleSheet = setupCSS;
   interfaceSWF.mainTxt.html = true;
   interfaceSWF.mainTxt.multiline = true;
   interfaceSWF.mainTxt.selectable = false;
   interfaceSWF.mainTxt.wordWrap = true;
   interfaceSWF.mainTxt.htmlText = currentText;
 }
 
 CSS - li {color: #C1A9C3;font-weight: 900;font-family: Arial;font-size:
 16px;display: block}
 
 Not sure if placing the li inside the ul is causing the issue for
 you.
 
 -- Chuck
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
 Jason
 Sent: Thursday, June 29, 2006 9:54 AM
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] li color
 
 Also, be sure you are testing the .swf in HTML a browser.  If you just
 double-click the .swf file on your hard drive, the bullet does not get
 colored (not sure why that is the case)
 
 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@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

_
Try Live.com - your fast, personalized homepage with all the things you care 
about in one place.
http://www.live.com/getstarted___
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] Help needed

2006-06-29 Thread Tom Rhodes
you can draw a best fit curve through points created from the data to 
get what you want, have a look on google for a class to do the best fit 
stuff, i've seen one but don't remember where. shouldn't be too tricky...


Roliks Long wrote:

Hey guys I have a questionn.

   My client wants to have flash display a spectrum wave graph. I am using Swift and I know it examines the MP3 during the conversion process and generates spectrum values that can be used to create the spectrum analyzer animation. Wouldnt it be possible to take this information for all 17 values per frame and plot a graphic of the wave (EX: like a sin, cos wave or wav editor). I have tried a couple things and I havent been able to get it to work at all. 


Any help would be appreciated as I am at a loss and getting frustrated now.
Thanks
-Ski





  

Subject: RE: [Flashcoders] li color
Date: Thu, 29 Jun 2006 10:19:42 -0400
From: [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com

Jason/Adrian,

I am running a SWF and it displays the li text and bullet in the color
from the CSS.

Here is a sample:

function loadCSS() {
setupCSS = new TextField.StyleSheet();
setupCSS.onLoad = function(success) {
if (success) {
trace(CSS Loaded)
}
};
setupCSS.load(template.css);
}

function displayText(currentText) {
interfaceSWF.mainTxt.styleSheet = setupCSS;
interfaceSWF.mainTxt.html = true;
interfaceSWF.mainTxt.multiline = true;
interfaceSWF.mainTxt.selectable = false;
interfaceSWF.mainTxt.wordWrap = true;
interfaceSWF.mainTxt.htmlText = currentText;
}

CSS - li {color: #C1A9C3;font-weight: 900;font-family: Arial;font-size:
16px;display: block}

Not sure if placing the li inside the ul is causing the issue for
you.

-- Chuck

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: Thursday, June 29, 2006 9:54 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] li color

Also, be sure you are testing the .swf in HTML a browser.  If you just
double-click the .swf file on your hard drive, the bullet does not get
colored (not sure why that is the case)

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@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



_
Try Live.com - your fast, personalized homepage with all the things you care 
about in one place.
http://www.live.com/getstarted___
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


  



--

__

Tom Rhodes - Developer / Composer
Wheelhouse Creative Ltd, 2 Albion Place,
Hammersmith, London. W6 0QT
Tel: 020 8748 4466  Fax: 020 8748 4850
www.wheelhousecreative.co.uk
__

___
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] Help with ClassFile, referencing functions within an imported ClassFile

2006-06-29 Thread Mike Anderson
Hello All,
 
I am using Robert Penners updated AS 2.0 ClassFile, which is being brought in 
via an import statement, into my own Extended MovieClip ClassFile.
 
I have a list of Icons that are dynamically being brought in (through a SQL 
Remoting Call), and each Icon has it's own Shape and Size.  Since Flash STILL 
DOES NOT have it's own Dynamic Registration that developers have been begging 
for, I had to use a 3rd party solution.  These Icons must scale from the Center 
Out, so a solution like this is absolutely required.
 
If I try to access the new properties (some of those being _x2 and _y2) from 
within my ClassFile, they are unknown to the Class.  If I try to access the 
properties from OUTSIDE of the Class, I am able to do so.
 
Is there anything I need to do, in order to access these newly created 
Properties and Methods from within the ClassFile that imported the Dynamic 
Registration ClassFile??
 
Thanks in advance for any information you can offer,
 
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


[Flashcoders] HELP : File Access in FLASH

2006-06-26 Thread julian atienza

Hi everybody.

I know that subject appears in a lot of messages in forum, but i have
a related problem.

I'm finishing one project. Only SAVE/LOAD Operations and another
issues like Full-Screen with a fixed resolution to 1024zx768 are
pending.

This project is one complex kiosk-type application for MAC osX and
Windows (Both systems)


Now i have to buy one third party app like mdm zinc or mProjector.

mProjector - it appears to be old fashioned. F.e. the screen
resolution - it only let me 800x600.

Zinc - it appears like a bug-montain-code-software. I'm using last
version in trial mode and things like opening a Dialog box for choose
a file contains a bug (press cancel button and crashes). Forum of MDM
is one kind of hell and somebody said that this bug was fixed in new
version and it's not true. People in forum are lost and ask for
questions with weak answers.

And it's strange... my app is created with multiple swf's loaded in
several levels... where i have to put the mdminit() command ? in every
swf? and more: why when i compile swf  that uses mdm sentences it
compiles with error? :'( i will cry!

I'm desperate. What i have to do? some ideas?
___
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] HELP : File Access in FLASH

2006-06-26 Thread julian atienza

Hi everybody.

I know that subject appears in a lot of messages in forum, but i have
a related problem.

I'm finishing one project. Only SAVE/LOAD Operations and another
issues like Full-Screen with a fixed resolution to 1024zx768 are
pending.

This project is one complex kiosk-type application for MAC osX and
Windows (Both systems)


Now i have to buy one third party app like mdm zinc or mProjector.

mProjector - it appears to be old fashioned. F.e. the screen
resolution - it only let me 800x600.

Zinc - it appears like a bug-montain-code-software. I'm using last
version in trial mode and things like opening a Dialog box for choose
a file contains a bug (press cancel button and crashes). Forum of MDM
is one kind of hell and somebody said that this bug was fixed in new
version and it's not true. People in forum are lost and ask for
questions with weak answers.

And it's strange... my app is created with multiple swf's loaded in
several levels... where i have to put the mdminit() command ? in every
swf? and more: why when i compile swf  that uses mdm sentences it
compiles with error? :'( i will cry!

I'm desperate. What i have to do? some ideas?
___
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] HELP : File Access in FLASH

2006-06-26 Thread Jim Tann
1: Take a look at SWFStudio as an alternative projector creation
software.

www.northcode.com 

2: As for the different levels. Using levels makes the flash player
treat each movie in a different level as separate movies. They cannot
access each others libraries or code. I had to use levels as a
workaround in the past for using assets in the libraries of dynamically
loaded swf's but this led to more issues. Best thing is to not use
levels for loading movies  if you need to share assets from loaded
libraries (I am assuming this is why you are using levels) you should
look into using shared libraries. 

If you import one movieclip from a shared library into the host library
 include that shared movieclip on the timeline it will force all other
available assets in that library to become available in the host movie.

3: are you including the path to the mdm intrinsic classes in the
publish settings for your movie? The only reason I can think that the
movie will not compile on the lines you use the mdm classes is that It
cannot see them.

Hth
Jim

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of julian
atienza
Sent: 26 June 2006 12:18
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] HELP : File Access in FLASH

Hi everybody.

I know that subject appears in a lot of messages in forum, but i have
a related problem.

I'm finishing one project. Only SAVE/LOAD Operations and another
issues like Full-Screen with a fixed resolution to 1024zx768 are
pending.

This project is one complex kiosk-type application for MAC osX and
Windows (Both systems)


Now i have to buy one third party app like mdm zinc or mProjector.

mProjector - it appears to be old fashioned. F.e. the screen
resolution - it only let me 800x600.

Zinc - it appears like a bug-montain-code-software. I'm using last
version in trial mode and things like opening a Dialog box for choose
a file contains a bug (press cancel button and crashes). Forum of MDM
is one kind of hell and somebody said that this bug was fixed in new
version and it's not true. People in forum are lost and ask for
questions with weak answers.

And it's strange... my app is created with multiple swf's loaded in
several levels... where i have to put the mdminit() command ? in every
swf? and more: why when i compile swf  that uses mdm sentences it
compiles with error? :'( i will cry!

I'm desperate. What i have to do? some ideas?
___
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] HELP : File Access in FLASH

2006-06-26 Thread sam rolfe

Not sure that I understand your poblem. I have used these apps, and SWFKit
and they open dialogue boxes etc without any problems. Make sure that you
are prolperly including any files to be used into your .exe files.


On 6/26/06, julian atienza [EMAIL PROTECTED] wrote:


Hi everybody.

I know that subject appears in a lot of messages in forum, but i have
a related problem.

I'm finishing one project. Only SAVE/LOAD Operations and another
issues like Full-Screen with a fixed resolution to 1024zx768 are
pending.

This project is one complex kiosk-type application for MAC osX and
Windows (Both systems)


Now i have to buy one third party app like mdm zinc or mProjector.

mProjector - it appears to be old fashioned. F.e. the screen
resolution - it only let me 800x600.

Zinc - it appears like a bug-montain-code-software. I'm using last
version in trial mode and things like opening a Dialog box for choose
a file contains a bug (press cancel button and crashes). Forum of MDM
is one kind of hell and somebody said that this bug was fixed in new
version and it's not true. People in forum are lost and ask for
questions with weak answers.

And it's strange... my app is created with multiple swf's loaded in
several levels... where i have to put the mdminit() command ? in every
swf? and more: why when i compile swf  that uses mdm sentences it
compiles with error? :'( i will cry!

I'm desperate. What i have to do? some ideas?
___
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] HELP : File Access in FLASH

2006-06-26 Thread Nicolas Cannasse
 And it's strange... my app is created with multiple swf's loaded in
 several levels... where i have to put the mdminit() command ? in every
 swf? and more: why when i compile swf  that uses mdm sentences it
 compiles with error? :'( i will cry!
 
 I'm desperate. What i have to do? some ideas?

Screenweaver HX is still at Beta stage (http://haxe.org/swhx) but might
be enough for what you need to do. There is not yet fullscreen support
but it will be part of 1.0 in a few weeks.

Nicolas
___
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] HELP : File Access in FLASH

2006-06-26 Thread David Thompson
Hi,

why when i compile swf  that uses mdm sentences it
compiles with error? :'( i will cry!

Try following the instructions on this forum post:
http://www.mdmforum.com/forum/index.php?showtopic=11941

It shows you how to install the mdm class package - this should get rid of
any compilation errors from mdm code.

For whatever reason Zinc doesn't install these classes to your classpath as
part of its own install - so your compiler will naturally complain.
Hopefully that'll stop some of the tears :)

David Thompson
Lightmaker

_
 
The information transmitted in this email is intended only for the person or
entity
to which it is addressed and may contain confidential and/or privileged
material.
Any review, retransmission, dissemination or other use of, or taking of any
action
in reliance upon, this information by persons or entities other than the
intended
recipient is prohibited.  If you received this in error, please contact the
sender
and delete the material from any computer.

_
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of julian
atienza
Sent: 26 June 2006 12:29
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] HELP : File Access in FLASH

Hi everybody.

I know that subject appears in a lot of messages in forum, but i have
a related problem.

I'm finishing one project. Only SAVE/LOAD Operations and another
issues like Full-Screen with a fixed resolution to 1024zx768 are
pending.

This project is one complex kiosk-type application for MAC osX and
Windows (Both systems)


Now i have to buy one third party app like mdm zinc or mProjector.

mProjector - it appears to be old fashioned. F.e. the screen
resolution - it only let me 800x600.

Zinc - it appears like a bug-montain-code-software. I'm using last
version in trial mode and things like opening a Dialog box for choose
a file contains a bug (press cancel button and crashes). Forum of MDM
is one kind of hell and somebody said that this bug was fixed in new
version and it's not true. People in forum are lost and ask for
questions with weak answers.

And it's strange... my app is created with multiple swf's loaded in
several levels... where i have to put the mdminit() command ? in every
swf? and more: why when i compile swf  that uses mdm sentences it
compiles with error? :'( i will cry!

I'm desperate. What i have to do? some ideas?
___
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] help

2006-06-22 Thread Gustavo Duenas
well Richard as far as I know, the code involved in the flash site  
you've mentioned before is kind of regular code not too brainy, I  
guess your very brave challenge to faced into is the animations and  
the quality of the photos, and also the kind of design involved.

I hope to be helpful for you


regards.

Gus

On Jun 20, 2006, at 10:19 AM, John Mark Hawley wrote:

Sorry Richard, but you probably won't get much help with a non- 
question phrased like that. You're better off picking a small  
portion of the site that you'd like to replicate, making an attempt  
at it, doing some research, and then coming back with a specific  
question about how to accomplish  the part that is giving you the  
most problems. Repeat. A more specific subject line is usually  
required as well.


-mark hawley



From: Bachman, Richard [EMAIL PROTECTED]
Date: 2006/06/20 Tue AM 09:11:32 CDT
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] help


I need help with creating a site somewhat like this onehttp:// 
www.samsung.com/se/current/campaign/slim/site/index.htm


I'm trying to figure out the coding involved in this site. Thanks!

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


Gustavo Duenas
Creative Director
LEFT AND RIGHT SOLUTIONS LLC
1225 w. Beaver St. suite 119
Jacksonville, FL 32204
904 . 2650330
www.leftandrightsolutions.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] help

2006-06-20 Thread Bachman, Richard

I need help with creating a site somewhat like this 
onehttp://www.samsung.com/se/current/campaign/slim/site/index.htm

I'm trying to figure out the coding involved in this site. Thanks!

Rich
___
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] help

2006-06-20 Thread Merrill, Jason
I need help with creating a site somewhat like this
onehttp://www.samsung.com/se/current/campaign/slim/site/index.htm

I'm trying to figure out the coding involved in this site. Thanks!

I need web site.  Please send source code.  LOL.

(Richard, I think you'll need to be just a tad more specific - there is
a lot going on on that site - I will say, it's really slow to load - UI
needs some work - and the black phone against the black background makes
it almost invisible - not that impressive in my opinion really.  Sure
the 3-D rotation is nice, but anybody can do that with some software.)

Jason Merrill
Bank of America 
Learning 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


Re: [Flashcoders] help

2006-06-20 Thread Ron Wheeler



Bachman, Richard wrote:

I need help with creating a site somewhat like this 
onehttp://www.samsung.com/se/current/campaign/slim/site/index.htm

I'm trying to figure out the coding involved in this site. Thanks!

  

There could be quite a bit.
I did not try the game but the phone exploration part has a fair amount 
of action in it.


There are probably many ways to do this. It is not too complex to handle 
as a set of timeline animations but might be easier with some 
Actionscript framework to orchestrate the animations.


What are you trying to do? What Flash or Actionscript technologies are 
you most comfortable with?
Have you got a design of what you want your application to do? Once you 
know all of the states that your user can get into and what they can see 
and do in each state, you will have a better guess about how much code 
you will need.


Ron


Rich
___
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] help

2006-06-20 Thread Danny Kodicek


Sorry Richard, but you probably won't get much help with a non-question 
phrased like that. You're better off picking a small portion of the site 
that you'd like to replicate, making an attempt at it, doing some 
research, and then coming back with a specific question about how to 
accomplish  the part that is giving you the most problems. Repeat. A more 
specific subject line is usually required as well.


Plus, is your name *really* Richard Bachman? I know of at least one person 
that uses that alias...


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


RE: [Flashcoders] help

2006-06-20 Thread Bachman, Richard
Thanks for the reply Ron...

Right now I'm just trying to recreate the 3-D Camera rotation after
you select a different phone to explore. Is this done is some video
software or can it be done with flash? 

Any ideas would be very helpful. Thanks.

Richard Bachman
Assistant Art Director | 316.828.6279 | www.kochcreativegroup.com





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron
Wheeler
Sent: Tuesday,June 20,2006 9:28 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] help



Bachman, Richard wrote:
 I need help with creating a site somewhat like this 
 onehttp://www.samsung.com/se/current/campaign/slim/site/index.htm

 I'm trying to figure out the coding involved in this site. Thanks!

   
There could be quite a bit.
I did not try the game but the phone exploration part has a fair amount
of action in it.

There are probably many ways to do this. It is not too complex to handle
as a set of timeline animations but might be easier with some
Actionscript framework to orchestrate the animations.

What are you trying to do? What Flash or Actionscript technologies are
you most comfortable with?
Have you got a design of what you want your application to do? Once you
know all of the states that your user can get into and what they can see
and do in each state, you will have a better guess about how much code
you will need.

Ron

 Rich
 ___
 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] help

2006-06-20 Thread Kevin Mulvihill
I would echo Jason's comments. It's not really an impressive site: hard to
see, gratuitous music, UI needs some work, and even the 3D rotation is
jerky. I really hope you're just referring to this site because you plan to
do better.

BTW, I really hate the arrogance of programmers who presume to resize my
browser window to full screen without my permission. It's my browser and I'd
like to control it if you don't mind. If I can't see everything, I'll resize
the window if it needs to be done.

Kevin


 I need help with creating a site somewhat like this 
 onehttp://www.samsung.com/se/current/campaign/slim/site/
 index.htm
 
 I'm trying to figure out the coding involved in this site. Thanks!
 
 I need web site.  Please send source code.  LOL.
 
 (Richard, I think you'll need to be just a tad more specific 
 - there is a lot going on on that site - I will say, it's 
 really slow to load - UI needs some work - and the black 
 phone against the black background makes it almost invisible 
 - not that impressive in my opinion really.  Sure the 3-D 
 rotation is nice, but anybody can do that with some software.)


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

2006-06-20 Thread Merrill, Jason
A 3-D rotation like that is done with a 3-D app like Maya or Studio Max.
Or possibly Swift 3D, but you're going to run into some modeling and
rendering limitations with Swift 3D (though to be fair, you can do some
neat stuff with it). Then the animation is exported from the 3-D app as
.swf file or bitmap sequence and then controlled as a timeline in Flash
with gotoAndStop(theframenumber) based on what they do with the mouse.
The Flash part is really simple actually. Notice it's not real 3-D -
you can only rotate it on one plane.  To add another plane of rotation,
would require another animation sequence.  Like scrubbing through a
movie - same concept.  To rotate dynamically in any direction in 3D just
isn't possible in Flash. Some people have written some dynamic 3-D
rendering engines in Flash, but it's very complicated and nothing that
can handle textures and lighting like you see in that sequence.  Mostly
they are limited to very simple vector shapes.  Do do real 3-D on the
web, look to Director.  However, if you just want to do what this site
does, an animated sequence of the rotation is all you need. 

Jason Merrill
Bank of America 
Learning Technology Solutions
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Bachman, Richard
Sent: Tuesday, June 20, 2006 10:46 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] help

Thanks for the reply Ron...

Right now I'm just trying to recreate the 3-D Camera rotation after
you select a different phone to explore. Is this done is some video
software or can it be done with flash?

Any ideas would be very helpful. Thanks.

Richard Bachman
Assistant Art Director | 316.828.6279 | www.kochcreativegroup.com





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron
Wheeler
Sent: Tuesday,June 20,2006 9:28 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] help



Bachman, Richard wrote:
 I need help with creating a site somewhat like this

onehttp://www.samsung.com/se/current/campaign/slim/site/index.htm

 I'm trying to figure out the coding involved in this site. Thanks!


There could be quite a bit.
I did not try the game but the phone exploration part has a fair
amount
of action in it.

There are probably many ways to do this. It is not too complex to
handle
as a set of timeline animations but might be easier with some
Actionscript framework to orchestrate the animations.

What are you trying to do? What Flash or Actionscript technologies are
you most comfortable with?
Have you got a design of what you want your application to do? Once
you
know all of the states that your user can get into and what they can
see
and do in each state, you will have a better guess about how much code
you will need.

Ron

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

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




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

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


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

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

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


RE: [Flashcoders] help

2006-06-20 Thread Bachman, Richard
Thanks for the helpful info...The site I am working on will actually be
a movie...shot green screen and then edited with aftereffects. Do you
know if after effects can export a swf file that can be controled
through flash the same way as you explain below?


Richard Bachman
Assistant Art Director | 316.828.6279 | www.kochcreativegroup.com





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: Tuesday,June 20,2006 10:00 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] help

A 3-D rotation like that is done with a 3-D app like Maya or Studio Max.
Or possibly Swift 3D, but you're going to run into some modeling and
rendering limitations with Swift 3D (though to be fair, you can do some
neat stuff with it). Then the animation is exported from the 3-D app as
.swf file or bitmap sequence and then controlled as a timeline in Flash
with gotoAndStop(theframenumber) based on what they do with the mouse.
The Flash part is really simple actually. Notice it's not real 3-D -
you can only rotate it on one plane.  To add another plane of rotation,
would require another animation sequence.  Like scrubbing through a
movie - same concept.  To rotate dynamically in any direction in 3D just
isn't possible in Flash. Some people have written some dynamic 3-D
rendering engines in Flash, but it's very complicated and nothing that
can handle textures and lighting like you see in that sequence.  Mostly
they are limited to very simple vector shapes.  Do do real 3-D on the
web, look to Director.  However, if you just want to do what this site
does, an animated sequence of the rotation is all you need. 

Jason Merrill
Bank of America
Learning Technology Solutions
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders- 
[EMAIL PROTECTED] On Behalf Of Bachman, Richard
Sent: Tuesday, June 20, 2006 10:46 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] help

Thanks for the reply Ron...

Right now I'm just trying to recreate the 3-D Camera rotation after 
you select a different phone to explore. Is this done is some video 
software or can it be done with flash?

Any ideas would be very helpful. Thanks.

Richard Bachman
Assistant Art Director | 316.828.6279 | www.kochcreativegroup.com





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron 
Wheeler
Sent: Tuesday,June 20,2006 9:28 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] help



Bachman, Richard wrote:
 I need help with creating a site somewhat like this

onehttp://www.samsung.com/se/current/campaign/slim/site/index.htm

 I'm trying to figure out the coding involved in this site. Thanks!


There could be quite a bit.
I did not try the game but the phone exploration part has a fair
amount
of action in it.

There are probably many ways to do this. It is not too complex to
handle
as a set of timeline animations but might be easier with some 
Actionscript framework to orchestrate the animations.

What are you trying to do? What Flash or Actionscript technologies are

you most comfortable with?
Have you got a design of what you want your application to do? Once
you
know all of the states that your user can get into and what they can
see
and do in each state, you will have a better guess about how much code

you will need.

Ron

 Rich
 ___
 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@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

RE: [Flashcoders] help

2006-06-20 Thread Merrill, Jason
I think if you want to see some great Flash sites with 3-D rotation and
rendering then look to the auto manufacturers web sites.  The're some
really good stuff out there and they usually pay the big bucks to get
good designers and programmers involved. 

Jason Merrill
Bank of America 
Learning Technology Solutions
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Kevin Mulvihill
Sent: Tuesday, June 20, 2006 10:55 AM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] help

I would echo Jason's comments. It's not really an impressive site:
hard to
see, gratuitous music, UI needs some work, and even the 3D rotation is
jerky. I really hope you're just referring to this site because you
plan to
do better.

BTW, I really hate the arrogance of programmers who presume to resize
my
browser window to full screen without my permission. It's my browser
and I'd
like to control it if you don't mind. If I can't see everything, I'll
resize
the window if it needs to be done.

Kevin


 I need help with creating a site somewhat like this
 onehttp://www.samsung.com/se/current/campaign/slim/site/
 index.htm
 
 I'm trying to figure out the coding involved in this site. Thanks!

 I need web site.  Please send source code.  LOL.

 (Richard, I think you'll need to be just a tad more specific
 - there is a lot going on on that site - I will say, it's
 really slow to load - UI needs some work - and the black
 phone against the black background makes it almost invisible
 - not that impressive in my opinion really.  Sure the 3-D
 rotation is nice, but anybody can do that with some software.)


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

2006-06-20 Thread Tom Lee
Richard,

You may find this devnet article on AfterEffects and Flash integration
helpful:

http://www.adobe.com/devnet/flash/articles/3d_in_flash.html

-tom


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bachman,
Richard
Sent: Tuesday, June 20, 2006 11:06 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] help

Thanks for the helpful info...The site I am working on will actually be
a movie...shot green screen and then edited with aftereffects. Do you
know if after effects can export a swf file that can be controled
through flash the same way as you explain below?


Richard Bachman
Assistant Art Director | 316.828.6279 | www.kochcreativegroup.com





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: Tuesday,June 20,2006 10:00 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] help

A 3-D rotation like that is done with a 3-D app like Maya or Studio Max.
Or possibly Swift 3D, but you're going to run into some modeling and
rendering limitations with Swift 3D (though to be fair, you can do some
neat stuff with it). Then the animation is exported from the 3-D app as
.swf file or bitmap sequence and then controlled as a timeline in Flash
with gotoAndStop(theframenumber) based on what they do with the mouse.
The Flash part is really simple actually. Notice it's not real 3-D -
you can only rotate it on one plane.  To add another plane of rotation,
would require another animation sequence.  Like scrubbing through a
movie - same concept.  To rotate dynamically in any direction in 3D just
isn't possible in Flash. Some people have written some dynamic 3-D
rendering engines in Flash, but it's very complicated and nothing that
can handle textures and lighting like you see in that sequence.  Mostly
they are limited to very simple vector shapes.  Do do real 3-D on the
web, look to Director.  However, if you just want to do what this site
does, an animated sequence of the rotation is all you need. 

Jason Merrill
Bank of America
Learning Technology Solutions
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders- 
[EMAIL PROTECTED] On Behalf Of Bachman, Richard
Sent: Tuesday, June 20, 2006 10:46 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] help

Thanks for the reply Ron...

Right now I'm just trying to recreate the 3-D Camera rotation after 
you select a different phone to explore. Is this done is some video 
software or can it be done with flash?

Any ideas would be very helpful. Thanks.

Richard Bachman
Assistant Art Director | 316.828.6279 | www.kochcreativegroup.com





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron 
Wheeler
Sent: Tuesday,June 20,2006 9:28 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] help



Bachman, Richard wrote:
 I need help with creating a site somewhat like this

onehttp://www.samsung.com/se/current/campaign/slim/site/index.htm

 I'm trying to figure out the coding involved in this site. Thanks!


There could be quite a bit.
I did not try the game but the phone exploration part has a fair
amount
of action in it.

There are probably many ways to do this. It is not too complex to
handle
as a set of timeline animations but might be easier with some 
Actionscript framework to orchestrate the animations.

What are you trying to do? What Flash or Actionscript technologies are

you most comfortable with?
Have you got a design of what you want your application to do? Once
you
know all of the states that your user can get into and what they can
see
and do in each state, you will have a better guess about how much code

you will need.

Ron

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

RE: [Flashcoders] help

2006-06-20 Thread Merrill, Jason
Yes, I mean you can at least export a movie clip or bitmap sequence - as
far as .swf,  - I have aftereffects on my machine at home - I'll try and
check tonight if I remember.  But you could also look on Adobe's site to
check the specs.  

Jason Merrill
Bank of America 
Learning Technology Solutions
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Bachman, Richard
Sent: Tuesday, June 20, 2006 11:06 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] help

Thanks for the helpful info...The site I am working on will actually
be
a movie...shot green screen and then edited with aftereffects. Do you
know if after effects can export a swf file that can be controled
through flash the same way as you explain below?


Richard Bachman
Assistant Art Director | 316.828.6279 | www.kochcreativegroup.com





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Merrill,
Jason
Sent: Tuesday,June 20,2006 10:00 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] help

A 3-D rotation like that is done with a 3-D app like Maya or Studio
Max.
Or possibly Swift 3D, but you're going to run into some modeling and
rendering limitations with Swift 3D (though to be fair, you can do
some
neat stuff with it). Then the animation is exported from the 3-D app
as
.swf file or bitmap sequence and then controlled as a timeline in
Flash
with gotoAndStop(theframenumber) based on what they do with the mouse.
The Flash part is really simple actually. Notice it's not real 3-D -
you can only rotate it on one plane.  To add another plane of
rotation,
would require another animation sequence.  Like scrubbing through a
movie - same concept.  To rotate dynamically in any direction in 3D
just
isn't possible in Flash. Some people have written some dynamic 3-D
rendering engines in Flash, but it's very complicated and nothing that
can handle textures and lighting like you see in that sequence.
Mostly
they are limited to very simple vector shapes.  Do do real 3-D on the
web, look to Director.  However, if you just want to do what this site
does, an animated sequence of the rotation is all you need.

Jason Merrill
Bank of America
Learning Technology Solutions







-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Bachman, Richard
Sent: Tuesday, June 20, 2006 10:46 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] help

Thanks for the reply Ron...

Right now I'm just trying to recreate the 3-D Camera rotation
after
you select a different phone to explore. Is this done is some video
software or can it be done with flash?

Any ideas would be very helpful. Thanks.

Richard Bachman
Assistant Art Director | 316.828.6279 | www.kochcreativegroup.com





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron
Wheeler
Sent: Tuesday,June 20,2006 9:28 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] help



Bachman, Richard wrote:
 I need help with creating a site somewhat like this

onehttp://www.samsung.com/se/current/campaign/slim/site/index.htm

 I'm trying to figure out the coding involved in this site. Thanks!


There could be quite a bit.
I did not try the game but the phone exploration part has a fair
amount
of action in it.

There are probably many ways to do this. It is not too complex to
handle
as a set of timeline animations but might be easier with some
Actionscript framework to orchestrate the animations.

What are you trying to do? What Flash or Actionscript technologies
are

you most comfortable with?
Have you got a design of what you want your application to do? Once
you
know all of the states that your user can get into and what they can
see
and do in each state, you will have a better guess about how much
code

you will need.

Ron

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

Re: [Flashcoders] Help loading xml in html embed tag

2006-06-12 Thread Abdul Qabiz

Why don't you pass the path of XML to SWF using FlashVars. When SWF loads,
it would have variable available, you dont need to detect or do anything
else.

Yeah, you need to make sure you pass the path.

-abdul


On 6/12/06, Matt Mc [EMAIL PROTECTED] wrote:


Loading XML in the HTML Embed Tag

What I am doing:
I have a dynamic MP3 player that I need to play a single MP3 per swf. I
need to load XML file from a link in the html embed tag, this way I can use
the same player for different XML files that call out each MP3 from dynamic
locations.

How it works now:
Right now I am loading the XML with the path coded into an action script
file.

// playlist variables
 private var playlistURL:String = playlist.xml;
 private var playlistObj:jwPlaylist;
 private var playlistArray:Array;

What I need help with:

I need to create a flashvar that will load in the XML dynamically from a
link in the Embed tag.

How do I get the action script to detect and load the variable in the
Embed tag?

I am looking for the code that you put in the ebed tag and the code that
accepts it in the actionscript file.


I just need a small push in the right direction.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.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] Help loading xml in html embed tag

2006-06-12 Thread Matt Mc
Thanks Abdul But I am not sure I know how to do that. Can you give me an idea 
of what that would look like. Sorry I am a total noob and I am treading water 
if you know what I mean. 
   
  I really appreciate any help you can give me in solving this dynamic linking 
problem.
   
  Matt

Abdul Qabiz [EMAIL PROTECTED] wrote:
  Why don't you pass the path of XML to SWF using FlashVars. When SWF loads,
it would have variable available, you dont need to detect or do anything
else.

Yeah, you need to make sure you pass the path.

-abdul


On 6/12/06, Matt Mc wrote:

 Loading XML in the HTML Embed Tag

 What I am doing:
 I have a dynamic MP3 player that I need to play a single MP3 per swf. I
 need to load XML file from a link in the html embed tag, this way I can use
 the same player for different XML files that call out each MP3 from dynamic
 locations.

 How it works now:
 Right now I am loading the XML with the path coded into an action script
 file.

 // playlist variables
 private var playlistURL:String = playlist.xml;
 private var playlistObj:jwPlaylist;
 private var playlistArray:Array;

 What I need help with:

 I need to create a flashvar that will load in the XML dynamically from a
 link in the Embed tag.

 How do I get the action script to detect and load the variable in the
 Embed tag?

 I am looking for the code that you put in the ebed tag and the code that
 accepts it in the actionscript file.


 I just need a small push in the right direction.


 __
 Do You Yahoo!?
 Tired of spam? Yahoo! Mail has the best spam protection around
 http://mail.yahoo.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


 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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] Help loading xml in html embed tag

2006-06-12 Thread Merrill, Jason
Thanks Abdul But I am not sure I know how to do that. Can you give me
an idea of
what that would look like. Sorry I am a total noob and I am treading
water if you
know what I mean.

Using Flashvars is extremely easy - all you have to do is add a PARAM to
the object tag, or a Flashvars to the Embed tag.  Then that variable is
already created and available in the Flash file when it loads.  You just
reference it like any other variable at that point.  See this technote:

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16417


Jason Merrill
Bank of America 
Learning 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


RE: [Flashcoders] Help loading xml in html embed tag

2006-06-12 Thread Matt Mc
All the resources I get tell me how to put a flashvar into an embed tag but not 
the syntax for bringing the variable into my Action Script Document.

I have been working on this for almost a week now and I know it is simple 
because everyone keeps telling me so.

If I can't get this I am dead.

here is my embed tag:
object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354 
codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0;
 width=300 height=46 id=NoxPlayer align=middle
param name=allowScriptAccess value=sameDomain /
param name=movie value=NoxPlayer.swf /
param name=FlashVars value=xmlURL=playlist.xml
param name=quality value=high /
param name=wmode value=transparent /
param name=devicefont value=true /
param name=bgcolor value=#00 /
embed src=NoxPlayer.swf FlashVars=xmlURL=playlist.xml quality=high 
wmode=transparent devicefont=true bgcolor=#00 width=300 height=46 
name=NoxPlayer align=middle allowScriptAccess=sameDomain 
type=application/x-shockwave-flash 
pluginspage=http://www.macromedia.com/go/getflashplayer; /
/object


here is how they get the xml document now.

private var playlistURL:String = playlist.xml;
private var playlistObj:jwPlaylist;
private var playlistArray:Array;

How do I make this get the playlist.xml link from the embed tag.

I can't seem to get the syntax right or something because I can't get this to 
work.

If anyone can give me a detaild response or steer me to a tutorial that will 
show me the syntax to use in the action script document. Not the first frame of 
the FLA

Thanks

If you want to look at the files let me know I will post them. It is an mp3 
player but my boss wants to add the xml with dynamic links




 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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] Help loading xml in html embed tag

2006-06-12 Thread Geoffrey Holland
How about:

private var playlistURL:String = _root.xmlURL
private var playlistObj:jwPlaylist;
private var playlistArray:Array;

give that one a whirl!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Matt Mc
Sent: Monday, June 12, 2006 3:20 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Help loading xml in html embed tag

All the resources I get tell me how to put a flashvar into an embed tag but
not the syntax for bringing the variable into my Action Script Document.

I have been working on this for almost a week now and I know it is simple
because everyone keeps telling me so.

If I can't get this I am dead.

here is my embed tag:
object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354
codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.
cab#version=7,0,0,0 width=300 height=46 id=NoxPlayer align=middle
param name=allowScriptAccess value=sameDomain /
param name=movie value=NoxPlayer.swf /
param name=FlashVars value=xmlURL=playlist.xml
param name=quality value=high /
param name=wmode value=transparent /
param name=devicefont value=true /
param name=bgcolor value=#00 /
embed src=NoxPlayer.swf FlashVars=xmlURL=playlist.xml quality=high
wmode=transparent devicefont=true bgcolor=#00 width=300
height=46 name=NoxPlayer align=middle allowScriptAccess=sameDomain
type=application/x-shockwave-flash
pluginspage=http://www.macromedia.com/go/getflashplayer; /
/object


here is how they get the xml document now.

private var playlistURL:String = playlist.xml;
private var playlistObj:jwPlaylist;
private var playlistArray:Array;


How do I make this get the playlist.xml link from the embed tag.

I can't seem to get the syntax right or something because I can't get this
to work.

If anyone can give me a detaild response or steer me to a tutorial that will
show me the syntax to use in the action script document. Not the first frame
of the FLA

Thanks

If you want to look at the files let me know I will post them. It is an mp3
player but my boss wants to add the xml with dynamic links




 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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] Help loading xml in html embed tag

2006-06-12 Thread Merrill, Jason
On the Flash end, there is no syntax - as I mentioned, you just call
it like any other variable - it should already exist if you have
Flashvars right in the HTML.  It's suppose to be inserted even before
frame 1 initializes.  

Really, just in Flash:

trace(myVariable)

Jason Merrill
Bank of America 
Learning Technology Solutions
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Matt Mc
Sent: Monday, June 12, 2006 4:20 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Help loading xml in html embed tag

All the resources I get tell me how to put a flashvar into an embed
tag but not the
syntax for bringing the variable into my Action Script Document.

I have been working on this for almost a week now and I know it is
simple because
everyone keeps telling me so.

If I can't get this I am dead.

here is my embed tag:
object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354
codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/sw
fl
ash.cab#version=7,0,0,0 width=300 height=46 id=NoxPlayer
align=middle
param name=allowScriptAccess value=sameDomain /
param name=movie value=NoxPlayer.swf /
param name=FlashVars value=xmlURL=playlist.xml
param name=quality value=high /
param name=wmode value=transparent /
param name=devicefont value=true /
param name=bgcolor value=#00 /
embed src=NoxPlayer.swf FlashVars=xmlURL=playlist.xml
quality=high
wmode=transparent devicefont=true bgcolor=#00 width=300
height=46 name=NoxPlayer align=middle
allowScriptAccess=sameDomain
type=application/x-shockwave-flash
pluginspage=http://www.macromedia.com/go/getflashplayer; /
/object


here is how they get the xml document now.

private var playlistURL:String = playlist.xml;
private var playlistObj:jwPlaylist;
private var playlistArray:Array;

How do I make this get the playlist.xml link from the embed tag.

I can't seem to get the syntax right or something because I can't get
this to work.

If anyone can give me a detaild response or steer me to a tutorial
that will show
me the syntax to use in the action script document. Not the first
frame of the FLA

Thanks

If you want to look at the files let me know I will post them. It is
an mp3 player
but my boss wants to add the xml with dynamic links




 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.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] Help loading xml in html embed tag

2006-06-12 Thread elibol

Hey man,

Another way to do this is to add a query string to the swf you're embedding.

In HTML you do:

object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354 codebase=
http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0;
width=300 height=46 id=NoxPlayer align=middle
param name=allowScriptAccess value=sameDomain /
param name=movie value=NoxPlayer.swf?xmlURL=playlist.xml /
param name=quality value=high /
param name=wmode value=transparent /
param name=devicefont value=true /
param name=bgcolor value=#00 /
embed src=NoxPlayer.swf?xmlURL=playlist.xml quality=high
wmode=transparent devicefont=true bgcolor=#00 width=300
height=46 name=NoxPlayer align=middle allowScriptAccess=sameDomain
type=application/x-shockwave-flash pluginspage=
http://www.macromedia.com/go/getflashplayer; /
/object

In AS you do:

  private var playlistURL:String = _root.xmlURL;
  private var playlistObj:jwPlaylist;
  private var playlistArray:Array;

The main idea is that when you pass variables in from an embed tag, the
variables will be properties of the _root object.

So calling _root then the name of your variable, like _root.xmlURL, will
give you your value.

M.



On 6/12/06, Merrill, Jason [EMAIL PROTECTED] wrote:


On the Flash end, there is no syntax - as I mentioned, you just call
it like any other variable - it should already exist if you have
Flashvars right in the HTML.  It's suppose to be inserted even before
frame 1 initializes.

Really, just in Flash:

trace(myVariable)

Jason Merrill
Bank of America
Learning Technology Solutions







-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Matt Mc
Sent: Monday, June 12, 2006 4:20 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Help loading xml in html embed tag

All the resources I get tell me how to put a flashvar into an embed
tag but not the
syntax for bringing the variable into my Action Script Document.

I have been working on this for almost a week now and I know it is
simple because
everyone keeps telling me so.

If I can't get this I am dead.

here is my embed tag:
object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354
codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/sw
fl
ash.cab#version=7,0,0,0 width=300 height=46 id=NoxPlayer
align=middle
param name=allowScriptAccess value=sameDomain /
param name=movie value=NoxPlayer.swf /
param name=FlashVars value=xmlURL=playlist.xml
param name=quality value=high /
param name=wmode value=transparent /
param name=devicefont value=true /
param name=bgcolor value=#00 /
embed src=NoxPlayer.swf FlashVars=xmlURL=playlist.xml
quality=high
wmode=transparent devicefont=true bgcolor=#00 width=300
height=46 name=NoxPlayer align=middle
allowScriptAccess=sameDomain
type=application/x-shockwave-flash
pluginspage=http://www.macromedia.com/go/getflashplayer; /
/object


here is how they get the xml document now.

private var playlistURL:String = playlist.xml;
private var playlistObj:jwPlaylist;
private var playlistArray:Array;

How do I make this get the playlist.xml link from the embed tag.

I can't seem to get the syntax right or something because I can't get
this to work.

If anyone can give me a detaild response or steer me to a tutorial
that will show
me the syntax to use in the action script document. Not the first
frame of the FLA

Thanks

If you want to look at the files let me know I will post them. It is
an mp3 player
but my boss wants to add the xml with dynamic links




 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

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


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

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


Re: [Flashcoders] Help loading xml in html embed tag

2006-06-12 Thread Matt Mc


elibol [EMAIL PROTECTED] 

I really appreciate you guys helping. For some reason it is still not working. 
I am going to load a zip file of the project. I just need this playlist to be 
dynamic to make my boss happy before I get canned. he knows I am not an 
actionscripter but he seems to think this is easy.

Perhaps it has something to do with the way the files are set up. It works just 
fine untill I try to load a variable. I know it is their because I tested it in 
a text box. 

If anyone can help That would be great. I have a feeling I will be up all night 
again.

Matthew McLemore

 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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] Help loading xml in html embed tag

2006-06-12 Thread elibol

Maybe you're loading the xml file relative to the swf?

If you define the xml files location relative to the swf file and the html
document you're embedding the swf file into is located in different
directory then the xml location will be incorrect.

example:

Lets say that these are the paths:

./player/player.swf
./player/playlist.xml
./index.html

If you pass './playlist.xml' as the path from where index.html is located
(as it would be the correct location relative from player.swf) and run the
index.html you should get null for your playlist.xml.

I'm doubting it's the playlist.xml path that is incorrect since you
mentioned that you've seen it work in the textfield, but maybe the paths to
the mp3s should be tested...

In the end, all paths must be defined relative to the swf.

You can email me the files if it becomes really critical: [EMAIL PROTECTED]

M.

On 6/12/06, Matt Mc [EMAIL PROTECTED] wrote:




elibol [EMAIL PROTECTED]

I really appreciate you guys helping. For some reason it is still not
working. I am going to load a zip file of the project. I just need this
playlist to be dynamic to make my boss happy before I get canned. he knows I
am not an actionscripter but he seems to think this is easy.

Perhaps it has something to do with the way the files are set up. It works
just fine untill I try to load a variable. I know it is their because I
tested it in a text box.

If anyone can help That would be great. I have a feeling I will be up all
night again.

Matthew McLemore

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.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] Help loading xml in html embed tag

2006-06-12 Thread Matt Mc
Right now the file is relative to the swf. The problem is i need it to link to 
files that may not be relative. The actuall xml doc will be on a completely 
difference server.

So The MP3 player which is now relative to the files needs to accept the 
Flashvar so it does not need to be relative.

I have made sure the links are correct that is not the problem. Also the SWF 
accepts the Flashvar so this is not the problem.

It is getting this to work. (Or it may be something else in the document that I 
have completely overlooked. My day is almost done and I have read every 
tutorial I can find and still have made no headway. I feel like pulling my hair 
out.LOL

private var playlistURL:String = _root.xmlURL;

 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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] Help loading xml in html embed tag

2006-06-11 Thread Matt Mc
Loading XML in the HTML Embed Tag
   
  What I am doing: 
  I have a dynamic MP3 player that I need to play a single MP3 per swf. I need 
to load XML file from a link in the html embed tag, this way I can use the same 
player for different XML files that call out each MP3 from dynamic locations.
   
  How it works now: 
  Right now I am loading the XML with the path coded into an action script file.
   
  // playlist variables
  private var playlistURL:String = playlist.xml;
  private var playlistObj:jwPlaylist;
  private var playlistArray:Array;
   
  What I need help with: 
   
  I need to create a flashvar that will load in the XML dynamically from a link 
in the Embed tag. 
   
  How do I get the action script to detect and load the variable in the Embed 
tag?
   
  I am looking for the code that you put in the ebed tag and the code that 
accepts it in the actionscript file. 
   
   
  I just need a small push in the right direction. 
   

 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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] Help

2006-05-26 Thread Loren R. Elks
Thanks for everyone's help on my Slides/Screen/External SWF issue!  :-)


Sincerely,
Loren

___
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] HELP STILL NEEDED, PLEASE!

2006-05-24 Thread Loren R. Elks

Folks:

I still need help on this.  I know there are some really, really smart
folks on this list (smarter than me).  Can you please help me?

I am beginning to work with screens and slides.  I understand how to
load external swfs into my slides or screens.
 
Here's the question:  How do I write code such that when my external swf
that is loaded into the current slide or screen finishes playing, the
application will automatically move to the next slide (or another slide
or screen)?
 
 
 
Sincerely,
 
Loren
___
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] HELP STILL NEEDED, PLEASE!

2006-05-24 Thread Tor.Kristensen

var isFinishedPlaying:Boolean =
targetSlide.targetExternalSwf._currentframe==
targetSlide.targetExternalSwf._totalframes;


___
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] HELP STILL NEEDED, PLEASE!

2006-05-24 Thread Craig Stanford

HI Loren,

You can do it the cheap and nasty way, which I like to employ as often as
possible :)

Simpy put a stop(); frame on the frame on the main timeline where the swf is
loaded, and at the end of your loaded swf put the action _parent.play();

This means that the main timeline is stopped, whilst your movie loads in and
plays. Then when the loaded swf gets to the end of its timeline, it tells
the main timeline (its parent) to play.

Hope that helps!

Cheers,
Craig.

On 5/24/06, Loren R. Elks [EMAIL PROTECTED] wrote:



Folks:

I still need help on this.  I know there are some really, really smart
folks on this list (smarter than me).  Can you please help me?

I am beginning to work with screens and slides.  I understand how to
load external swfs into my slides or screens.

Here's the question:  How do I write code such that when my external swf
that is loaded into the current slide or screen finishes playing, the
application will automatically move to the next slide (or another slide
or screen)?



Sincerely,

Loren
___
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] HELP STILL NEEDED, PLEASE!

2006-05-24 Thread Tom Lee
Wow, that IS cheap and nasty! ;)  Just wanted to point out that if you
intend to use the external swfs in any other project, this is a bad way to
go, since the _parent.play() will cause the parent movie to play regardless
of what the parent movie is.

A more future-proof approach would be to call a custom function, which would
be defined in your parent movie.  So, you would say
_parent.myPlayFunction(); instead of _parent.play();.  In the parent movie,
define the function like this:

function myPlayFunction(){
this.play();
}

This way, if another movie loads your external swfs, it will not be affected
unless it defines myPlayFunction.  Also, this approach allows you to do more
than one thing when the swf stops playing.

function myPlayFunction(){
this.play();
this.doSomethingElse();
}

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Craig
Stanford
Sent: Wednesday, May 24, 2006 8:47 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] HELP STILL NEEDED, PLEASE!

HI Loren,

You can do it the cheap and nasty way, which I like to employ as often as
possible :)

Simpy put a stop(); frame on the frame on the main timeline where the swf is
loaded, and at the end of your loaded swf put the action _parent.play();

This means that the main timeline is stopped, whilst your movie loads in and
plays. Then when the loaded swf gets to the end of its timeline, it tells
the main timeline (its parent) to play.

Hope that helps!

Cheers,
Craig.

On 5/24/06, Loren R. Elks [EMAIL PROTECTED] wrote:


 Folks:

 I still need help on this.  I know there are some really, really smart
 folks on this list (smarter than me).  Can you please help me?

 I am beginning to work with screens and slides.  I understand how to
 load external swfs into my slides or screens.

 Here's the question:  How do I write code such that when my external swf
 that is loaded into the current slide or screen finishes playing, the
 application will automatically move to the next slide (or another slide
 or screen)?



 Sincerely,

 Loren
 ___
 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] help: XfactorStudio XPATH

2006-05-24 Thread Joeri van Oostveen

The Xfactor XPath classes can even be compiled with mtasc (not in
strict setting), it was a newer release, so it could be you are using
an older release.
I did not encounter any problems with XPath when compiling with the Flash IDE.

--
Joeri

On 5/23/06, Merrill, Jason [EMAIL PROTECTED] wrote:

I found out a few weeks ago that the Xfactor Studio XPATH classes were
broken when compiling to Flash 8. Compiling to flash 6 and 7 was ok, but
not 8.

Works just for me.  Are you using an older version of the classes?


Jason Merrill
Bank of America  |  www.bankofamerica.com
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@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] help: XfactorStudio XPATH

2006-05-23 Thread julian atienza

I'm using basic XPATH4AS2 of XFactor Studio.

I have an XPATH Query like:

var strXPATH:String = //Localidades/Localidad
[contains(label, '')];

And it's Ok. Search for '' into the field 'label' and founds
several results.

I have seen into class code that there is an upper-case function that
i can use to make more useful searchs...

i tried:
var strXPATH:String =
//Localidades/Localidad[contains(upper-case[label],
mySearchTerm.toUpperCase ())];

NO RESULTS...

somebody knows how to use the upper-case function in the example?

I'm implementing in Flash 8 Pro and AS2.0.

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

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

RE: [Flashcoders] help: XfactorStudio XPATH

2006-05-23 Thread Bernard Visscher
var  mySearchTerm:String = HeLlO;
var strXPATH:String = //Localidades/Localidad[contains(upper-case[label],'
+  mySearchTerm.toUpperCase () + ')];

This maybe?

 -Oorspronkelijk bericht-
 Van: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] Namens 
 julian atienza
 Verzonden: dinsdag 23 mei 2006 10:06
 Aan: [EMAIL PROTECTED]; 
 flashcoders@chattyfig.figleaf.com
 Onderwerp: [Flashcoders] help: XfactorStudio XPATH
 
 I'm using basic XPATH4AS2 of XFactor Studio.
 
 I have an XPATH Query like:
 
 var strXPATH:String = //Localidades/Localidad 
 [contains(label, '')];
 
 And it's Ok. Search for '' into the field 'label' and 
 founds several results.
 
 I have seen into class code that there is an upper-case 
 function that i can use to make more useful searchs...
 
 i tried:
 var strXPATH:String =
 //Localidades/Localidad[contains(upper-case[label],
 mySearchTerm.toUpperCase ())];
 
 NO RESULTS...
 
 somebody knows how to use the upper-case function in the example?
 
 I'm implementing in Flash 8 Pro and AS2.0.
 
 Thanks in advance
 

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

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


Re: [Flashcoders] help: XfactorStudio XPATH

2006-05-23 Thread Joeri van Oostveen

In a recent project, I used the Macromedia implementation of XPath
instead of the Xfactor XPath.
I can't say which one is better (or faster)...
Although I did have to double check everything because of some small
(syntax) differences..

See the documentation:
http://download.macromedia.com/pub/documentation/en/flash/fl8/XpathAPI.pdf

I didn't miss any functionality not present in one of the
implementations, but that could be because I just do simple extraction
of the xml nodes.

greetings
Joeri

On 5/23/06, Bernard Visscher [EMAIL PROTECTED] wrote:

var  mySearchTerm:String = HeLlO;
var strXPATH:String = //Localidades/Localidad[contains(upper-case[label],'
+  mySearchTerm.toUpperCase () + ')];

This maybe?

 -Oorspronkelijk bericht-
 Van: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Namens
 julian atienza
 Verzonden: dinsdag 23 mei 2006 10:06
 Aan: [EMAIL PROTECTED];
 flashcoders@chattyfig.figleaf.com
 Onderwerp: [Flashcoders] help: XfactorStudio XPATH

 I'm using basic XPATH4AS2 of XFactor Studio.

 I have an XPATH Query like:

 var strXPATH:String = //Localidades/Localidad
 [contains(label, '')];

 And it's Ok. Search for '' into the field 'label' and
 founds several results.

 I have seen into class code that there is an upper-case
 function that i can use to make more useful searchs...

 i tried:
 var strXPATH:String =
 //Localidades/Localidad[contains(upper-case[label],
 mySearchTerm.toUpperCase ())];

 NO RESULTS...

 somebody knows how to use the upper-case function in the example?

 I'm implementing in Flash 8 Pro and AS2.0.

 Thanks in advance


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

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


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

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


RE: [Flashcoders] help: XfactorStudio XPATH

2006-05-23 Thread Merrill, Jason
In a recent project, I used the Macromedia implementation of XPath
instead of the Xfactor XPath.

If I could jump in with a side question, I thought I had heard something
about that - can that be published down to the Flash 7 player? I would
assume so if it's just As 2.0 classes, but just thought I would check.


Jason Merrill
Bank of America  |  www.bankofamerica.com
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


RE: [Flashcoders] help: XfactorStudio XPATH

2006-05-23 Thread julian atienza

:(

Sorry. About replies...

1) Bernard Visscher. I posted the sentence bad. I didn't toUpperCase
like literal.

take this literal example if u prefer:
var strXPATH:String =
//Localidades/Localidad[contains(upper-case(fichaLocalidad),' +
TESTING PHRASE + ')];

But no good results anyway...

2)Joeri van Oostveen. Macromedia implementation of XPath have less
functions and functionally. That's because
I'm using XFactor Studio implementation. No contains function. f.e.

3)Merrill, Jason. I didn't understood your mssage.

Thanks anyway :(

Nobody knows the upper-case of XPATH for Xfactor Studio and how can i
use it 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] help: XfactorStudio XPATH

2006-05-23 Thread Mark Llobrera
Julian-

I found out a few weeks ago that the Xfactor Studio XPATH classes were
broken when compiling to Flash 8. Compiling to flash 6 and 7 was ok, but not
8.

-Mark

On 5/23/06 11:23 AM, julian atienza [EMAIL PROTECTED] wrote:

 :(

Sorry. About replies...

1) Bernard Visscher. I posted the sentence bad. I
 didn't toUpperCase
like literal.

take this literal example if u prefer:
  var
 strXPATH:String 
 =
//Localidades/Localidad[contains(upper-case(fichaLocalidad),' +
TESTING
 PHRASE + ')];

But no good results anyway...
  
2)Joeri van Oostveen.
 Macromedia implementation of XPath have less
functions and functionally.
 That's because
I'm using XFactor Studio implementation. No contains
 function. f.e.

3)Merrill, Jason. I didn't understood your mssage.

Thanks
 anyway :(

Nobody knows the upper-case of XPATH for Xfactor Studio and how can
 i
use it Thanks

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

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

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


RE: [Flashcoders] help: XfactorStudio XPATH

2006-05-23 Thread Merrill, Jason
I found out a few weeks ago that the Xfactor Studio XPATH classes were
broken when compiling to Flash 8. Compiling to flash 6 and 7 was ok, but
not 8.

Works just for me.  Are you using an older version of the classes?


Jason Merrill
Bank of America  |  www.bankofamerica.com
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] help: ScrollPane Issue

2006-05-17 Thread julian atienza

Hi.

I've developed a swf that dynamically create a serie of typical components
of forms (inputText, TextArea, labels, etc) during the user-entries in
certain cases.

I tried to create an external swf with a scrollPane with the contentPath of
this swf so , i thought, if during the dynamic creation of controls i'm
above the height of scrollPane, a ScrollBar could appear.

Nothing more far of reality: the scrollPane doesn't create ScrollBars if swf
dynamically changes height or contents...

HAve i made something wrong, or this is like is it?

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] Help needed for Novice

2006-05-04 Thread Jim Robson
Loren,

The stop() command is commented out on frame 5 (Start). That would explain
why the movie blows by that frame. If I am reading it correctly, this is
what is happening: When the movie gets to frame 5, it loads start.swf and
keeps playing until it gets to frame 15, where it loads objectives.swf into
the same movie clip (screen), thereby replacing start.swf.

By the same token, it looks as though the stop() command on frame 15
(Objectives) will prevent the movie from progressing to the Introduction
frame, and therefore the code to load intro.swf is never reached - unless
you have some code inside objectives.swf that instructs the main timeline to
resume playing when objectives.swf is finished, which of course I can't see.

Regarding your play control buttons, they are not addressing the movie clip
that you are trying to control. You are trying to control start.swf,
objectives.swf, and intro.swf. However, your control buttons are all
addressing _root.screen, which is the container into which you load the
others. To fix this, you could assign an instance name for the loaded movie
clips, and use the same name for each clip, and change the code in the
control buttons to address it. For example, if you assigned them all the
instance name foo you could change the code in the playme.onRelease
function to _root.screen.foo.play();

HTH

Jim

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Loren R.
Elks
Sent: Wednesday, May 03, 2006 3:36 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Help needed for Novice

Hi:
I need to load external swfs into a mc.  They will play in sequence, as soon
as one ends, the next one will start.  When running it blows by the first
external swf (start.swf) and the rest of the external swfs will not continue
to load and play after the objectives.swf.  Could someone take a look at my
code and tell me what I'm doing wrong?

I've created controls that will allow me to play, pause and stop the
external swfs while they're playing (however, these buttons do not seem to
have any effect on the external swf when it is playing).  I think it is a
scope issue, but I am not sure.  

Also, there's a combo box at the bottom, which allows the user to jump to
any external swf (it actually jumps to certain labels on the main timeline)
at any time.  The combo box appears to work OK.

The FLA is located at:  www.digitalhorizonstudios.com/exstream/newplayer.fla


By the way, this presentation is a fullscreen .exe file when in use, not a
swf played in an html file.

Thanks SO MUCH for any help on this one.

Please reply to the list AND email me directly if you have a solution.


Loren Elks
 The only real mistake is the one from which we learn nothing. - John
Powell
 
___
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] Help needed for Novice

2006-05-04 Thread Francesco

Hi Loren,

   Jim is right. Remove comment from the stop() command on f5 to have 
your movie paly entirely start.swf before advancing.
The onEnterFrame function in frame 1provides automatic advancing when 
the current screen mc is completely played.


As for buttons, 1 of them already work (playme), 1 has a misspelled 
instance name (exit for exitme, correct according to the onRelease 
function) and the last (pauseme) isn't defined in the onRollOver 
position (you might want to swap it with the gel Pause symbol in the 
library)


HTH
Good luck,
francesco


Jim Robson wrote:

Loren,

The stop() command is commented out on frame 5 (Start). That would explain
why the movie blows by that frame. If I am reading it correctly, this is
what is happening: When the movie gets to frame 5, it loads start.swf and
keeps playing until it gets to frame 15, where it loads objectives.swf into
the same movie clip (screen), thereby replacing start.swf.

By the same token, it looks as though the stop() command on frame 15
(Objectives) will prevent the movie from progressing to the Introduction
frame, and therefore the code to load intro.swf is never reached - unless
you have some code inside objectives.swf that instructs the main timeline to
resume playing when objectives.swf is finished, which of course I can't see.

Regarding your play control buttons, they are not addressing the movie clip
that you are trying to control. You are trying to control start.swf,
objectives.swf, and intro.swf. However, your control buttons are all
addressing _root.screen, which is the container into which you load the
others. To fix this, you could assign an instance name for the loaded movie
clips, and use the same name for each clip, and change the code in the
control buttons to address it. For example, if you assigned them all the
instance name foo you could change the code in the playme.onRelease
function to _root.screen.foo.play();

HTH

Jim

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Loren R.
Elks
Sent: Wednesday, May 03, 2006 3:36 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Help needed for Novice

Hi:
I need to load external swfs into a mc.  They will play in sequence, as soon
as one ends, the next one will start.  When running it blows by the first
external swf (start.swf) and the rest of the external swfs will not continue
to load and play after the objectives.swf.  Could someone take a look at my
code and tell me what I'm doing wrong?

I've created controls that will allow me to play, pause and stop the
external swfs while they're playing (however, these buttons do not seem to
have any effect on the external swf when it is playing).  I think it is a
scope issue, but I am not sure.  


Also, there's a combo box at the bottom, which allows the user to jump to
any external swf (it actually jumps to certain labels on the main timeline)
at any time.  The combo box appears to work OK.

The FLA is located at:  www.digitalhorizonstudios.com/exstream/newplayer.fla


By the way, this presentation is a fullscreen .exe file when in use, not a
swf played in an html file.

Thanks SO MUCH for any help on this one.

Please reply to the list AND email me directly if you have a solution.


Loren Elks
 The only real mistake is the one from which we learn nothing. - John
Powell
 
___

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] Help with swapdepths

2006-04-12 Thread Gaia-Tek

Hi Group,

I'm having a problem with a seemingly simple task...

I'm trying to get whichever movieclip on my stage is clicked on, to 
swapDepths to the top, and be draggable...


My code is:

on (press) {
   this.swapDepths(this.getNextHighestDepth());
   startDrag(this);
}
on (release) {
   stopDrag();
}

Not working...

Any help would be appreciated...

Thanks

Don


___
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] Help with swapdepths

2006-04-12 Thread GregoryN

Maybe you should try:

this.swapDepths(this._parent.getNextHighestDepth());
OR
this.swapDepths(_root.getNextHighestDepth());

instead of

this.swapDepths(this.getNextHighestDepth());

?


  

-- 
Best regards,
 GregoryN

http://GOusable.com
Flash components development.
Usability services.



 - Gaia-Tek wrote:
 I'm having a problem with a seemingly simple task...
 
 I'm trying to get whichever movieclip on my stage is clicked on, to 
 swapDepths to the top, and be draggable...
 
 My code is:
 
 on (press) {
 this.swapDepths(this.getNextHighestDepth());
 startDrag(this);
 }
 on (release) {
 stopDrag();
 }
 
 Not working...
 
 Any help would be appreciated...
 
 Thanks
 
 Don


___
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] Help with swapdepths

2006-04-12 Thread Gaia-Tek

I'll try it, thanks a lot...



GregoryN wrote:

Maybe you should try:

this.swapDepths(this._parent.getNextHighestDepth());
OR
this.swapDepths(_root.getNextHighestDepth());

instead of

this.swapDepths(this.getNextHighestDepth());

?


  

  


___
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] Help with swapdepths

2006-04-12 Thread Steven Sacks
Also, don't use on-clip methods like 

on (press) or on(release)

That's for non-coders who are making banner ads.  Instead, put your code
in the timeline:

btn.onPress = function() {
//
};
btn.onRelease = function() {
//
};

You'll thank me for it down the line.  It's never a good idea to put
code directly on buttons or movieclips.  Always put your code on the
timeline where it's easy to find without having to click on all the
individual buttons/clips in your movie.  There is no exception to this
rule, ever.

Also, the reason your code isn't working is because when you say
this.getNextHighestDepth(), you're referring to the depth INSIDE the
movieclip itself (this in an onPress method refers to the
movieclip/button - another reason to put your code on the timeline to
make things clearer).  You need to refer to the movieclip's parent.
this._parent.getNextHighestDepth();

HTH,
Steven 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Gaia-Tek
 Sent: Wednesday, April 12, 2006 3:02 AM
 To: Flashcoders mailing list
 Subject: [Flashcoders] Help with swapdepths
 
 Hi Group,
 
 I'm having a problem with a seemingly simple task...
 
 I'm trying to get whichever movieclip on my stage is clicked 
 on, to swapDepths to the top, and be draggable...
 
 My code is:
 
 on (press) {
 this.swapDepths(this.getNextHighestDepth());
 startDrag(this);
 }
 on (release) {
 stopDrag();
 }
 
 Not working...
 
 Any help would be appreciated...
 
 Thanks
 
 Don
 
 
 ___
 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
 


___
This e-mail is intended only for the named person or entity to which
it is addressed and contains valuable business information that is 
privileged, confidential and/or otherwise protected from disclosure. 
Dissemination, distribution or copying of this e-mail or the 
information herein by anyone other than the intended recipient, or 
an employee or agent responsible for delivering the message to the 
intended recipient, is strictly prohibited. All contents are the 
copyright property of Agency.com Ltd., its affiliates or a client of 
such agencies. If you are not the intended recipient, you are 
nevertheless bound to respect the worldwide legal rights of 
Agency.com, its affiliates and its clients. We require that 
unintended recipients delete the e-mail and destroy all electronic 
copies in their system, retaining no copies in any media. If you
have received this e-mail in error, please immediately notify us via 
e-mail to [EMAIL PROTECTED] We appreciate your cooperation.

We make no warranties as to the accuracy or completeness of this 
e-mail and accept no liability for its content or use. Any opinions 
expressed in this e-mail are those of the author and do not 
necessarily reflect the opinions of Agency.com or any of its 
affiliates.

___
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] Help with building a spider diagram

2006-04-03 Thread Kevin Boyd (MMCR)
I need to produce a spider diagram (a 360 deg personnel chart) dynamically
from an XML file in Flash 8. I have built most of it but hitting problems,
mainly with the layout and how to figure out if nodes are going to bump into
other nodes. Has anyone produced this kind of thing before and be up for
helping out on the job? Or point me to an example of how to handle a 360 deg
layout.

Contact me off list if you are free to help out at [EMAIL PROTECTED]

Thanks

Kevin Boyd
Multimedia Creations Ltd.
www.mmcr.co.uk
 



___
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] Help with building a spider diagram

2006-04-03 Thread Ron Wheeler

GraphViz does this from some very simple input.
I am not sure how easy it would be to take their code and turn it into 
Actionscript

You could use it on the server side.

Ron

Kevin Boyd (MMCR) wrote:

I need to produce a spider diagram (a 360 deg personnel chart) dynamically
from an XML file in Flash 8. I have built most of it but hitting problems,
mainly with the layout and how to figure out if nodes are going to bump into
other nodes. Has anyone produced this kind of thing before and be up for
helping out on the job? Or point me to an example of how to handle a 360 deg
layout.

Contact me off list if you are free to help out at [EMAIL PROTECTED]

Thanks

Kevin Boyd
Multimedia Creations Ltd.
www.mmcr.co.uk
 




___
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] Help with building a spider diagram

2006-04-03 Thread Kevin Boyd (MMCR)
Yes great stuff on GraphViz, though I do need something more Flash based
because, as usual, only have a couple of days to get this out! 


Kevin Boyd
Multimedia Creations Ltd.
www.mmcr.co.uk
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron Wheeler
Sent: 03 April 2006 13:39
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Help with building a spider diagram

GraphViz does this from some very simple input.
I am not sure how easy it would be to take their code and turn it into
Actionscript You could use it on the server side.

Ron

Kevin Boyd (MMCR) wrote:
 I need to produce a spider diagram (a 360 deg personnel chart) 
 dynamically from an XML file in Flash 8. I have built most of it but 
 hitting problems, mainly with the layout and how to figure out if 
 nodes are going to bump into other nodes. Has anyone produced this 
 kind of thing before and be up for helping out on the job? Or point me 
 to an example of how to handle a 360 deg layout.

 Contact me off list if you are free to help out at [EMAIL PROTECTED]

 Thanks

 Kevin Boyd
 Multimedia Creations Ltd.
 www.mmcr.co.uk
  



 ___
 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] Help with building a spider diagram

2006-04-03 Thread Mike Guerrero
B-Line has some charting components and I believe they have a spider plot
one, or something similar

http://www.blinex.com/

MikeG
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kevin Boyd
(MMCR)
Sent: Monday, April 03, 2006 8:19 AM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Help with building a spider diagram

Yes great stuff on GraphViz, though I do need something more Flash based
because, as usual, only have a couple of days to get this out! 


Kevin Boyd
Multimedia Creations Ltd.
www.mmcr.co.uk
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron Wheeler
Sent: 03 April 2006 13:39
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Help with building a spider diagram

GraphViz does this from some very simple input.
I am not sure how easy it would be to take their code and turn it into
Actionscript You could use it on the server side.

Ron

Kevin Boyd (MMCR) wrote:
 I need to produce a spider diagram (a 360 deg personnel chart) 
 dynamically from an XML file in Flash 8. I have built most of it but 
 hitting problems, mainly with the layout and how to figure out if 
 nodes are going to bump into other nodes. Has anyone produced this 
 kind of thing before and be up for helping out on the job? Or point me 
 to an example of how to handle a 360 deg layout.

 Contact me off list if you are free to help out at [EMAIL PROTECTED]

 Thanks

 Kevin Boyd
 Multimedia Creations Ltd.
 www.mmcr.co.uk
  



 ___
 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

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.4/299 - Release Date: 3/31/2006
 

___
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


<    1   2   3   4   >