[Flashcoders] trying to get data from list component

2011-05-26 Thread DONALD TALCOTT
I have a list component (multiple selection) on the stage. I am trying to send 
the selections from the list to sql database via php.
I'm using the script below to convert the data selected from the list to a 
string. The trace works as designed.
What do I send in my variables to php script? 
topskillsfield.selectedIndices is not working. topskillsfield is my list 
item.
Any help would be greatly appreciated.

submitTwoBtn.addEventListener(MouseEvent.CLICK, submitHandler);
 
function submitHandler(e:MouseEvent) {
var myArr:Array = topskillsfield.selectedIndices;
 
var selectedTopSkills:String = ;
 
for(var i:int = 0; i  myArr.length; i++) {
var j:int = myArr[i];
if(selectedTopSkills == ) {
selectedTopSkills = topskillsfield.getItemAt(j).data;
} else {
selectedTopSkills += ,  + 
topskillsfield.getItemAt(j).data;
}
}
 
trace(selectedTopSkills:  + selectedTopSkills);
}
DON TALCOTT
316 Greenwood Avenue
Decatur, Georgia 30030

404.538.1642
dtalc...@mindspring.com





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


Re: [Flashcoders] trying to get data from list component

2011-05-26 Thread DONALD TALCOTT
function submitHandler(e:MouseEvent) {
var myArr:Array = topskillsfield.selectedIndices;
 
var selectedTopSkills:String = ;
 
for(var i:int = 0; i  myArr.length; i++) {
var j:int = myArr[i];
if(selectedTopSkills == ) {
selectedTopSkills = topskillsfield.getItemAt(j).data;
} else {
selectedTopSkills += ,  + 
topskillsfield.getItemAt(j).data;
}
}
 
trace(selectedTopSkills:  + selectedTopSkills);
}
my trace ouputs the following: selectedTopSkills: Written Communication, 
Networking, Public Speaking, Negotiation, Strategic Planning

When I use the following in my variables, the number of selections (5) is 
posted to db.

I need to post Written Communication, Networking, Public Speaking, 
Negotiation, Strategic Planning to the db.

var variables:URLVariables = new URLVariables();
variables.firstname = fnamefield.text;
variables.lastname = lnamefield.text;
variables.title = titlefield.text;
variables.dept = deptfield.value;
variables.email = emailfield.text;
variables.nickname = mc_one.nicknamefield.text;
variables.birthday = mc_one.birthdayfield.text;
variables.anniversary = mc_one.anniversaryfield.text;
variables.topskills = mc_two.topskillsfield.selectedIndices;
variables.rightlefthanded = mc_three.radioGroup1.selection.value;
variables.hometown = mc_four.hometownfield.text;
variables.college = mc_four.collegefield.text;
variables.achievement1 = mc_five.achievement1field.text;
variables.achievement2 = mc_five.achievement2field.text;
variables.photo = mc_six.photo.fileDisplay_txt.text;
On May 26, 2011, at 3:41 PM, Karl DeSaulniers wrote:

 .selectedIndex  ??
 
 
 On May 26, 2011, at 2:36 PM, DONALD TALCOTT wrote:
 
 .selectedIndices
 
 Karl DeSaulniers
 Design Drumm
 http://designdrumm.com
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

DON TALCOTT
316 Greenwood Avenue
Decatur, Georgia 30030

404.538.1642
dtalc...@mindspring.com





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


Re: [Flashcoders] Strange Behavior with an email link

2011-04-25 Thread DONALD TALCOTT
had somewhat the same problem, used as below to fix.

//SET THE MAILTO ADDRESS
var emailLink1:String = mailto:...@i.com;;
 
//ADD EVENT LISTENER FOR EMAIL LINK
mailtoLink1.addEventListener(MouseEvent.MOUSE_DOWN,function():void {
 navigateToURL(new URLRequest(emailLink1), _self);}
);

On Apr 25, 2011, at 1:07 PM, Steve Abaffy wrote:

 I have the following code, and in IE8, IE9, Chrome when the email link
 button is pressed, it opens the client email as expected but it also opens a
 new page that says Navigation Cancelled in Firefox it works without
 opening the extra page.
 
 
 
 How do I make it stop doing that.
 
 function SendRepEmail(e:MouseEvent): void{
 
 var url:String = mailto:; + e.target.RepEmailText.text;
 
  var request:URLRequest = new URLRequest(url);  // Also triedvar
 request:URLRequest = new URLRequest(url,_blank' ); with the same result
 
  try {
 
navigateToURL(request);
 
  } catch (e:Error) {
 
//Do Nothing
 
  }
 
 }
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

DON TALCOTT
316 Greenwood Avenue
Decatur, Georgia 30030

404.538.1642
dtalc...@mindspring.com





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


[Flashcoders] error mesg

2010-12-16 Thread DONALD TALCOTT
I have the following code below. When I compile the swf,I get the following 
error;
Line 187 1136: Incorrect number of arguments. Expected 1.

Have been playing with this all day, somewhat new to as3, and this has me 
stumped.
Any help/insight would be greatly appreciated.


stage.addEventListener(KeyboardEvent.KEY_DOWN, doSubmitViaEnter);

function doSubmitViaEnter(e:KeyboardEvent):void
{
if (e.keyCode == 13)
{
doSubmit();   // this is line 187
}
};


function doSubmit(e:MouseEvent):void
{
var clip:MovieClip = active_clip.mc_form;

if (fname1field.text ==  || lname1field.text ==  || 
email1field.text ==  || clip.fnamefield.text ==  || clip.lnamefield.text == 
 || clip.titlefield.text ==  || clip.emailfield.text == )
{
status_txt.text = Please fill in all required fields.;
}
else
{
//All fields valid so send away!
status_txt.text = Posting nomination...\nPlease wait...;
doSend();
}
}




DON TALCOTT
316 Greenwood Avenue
Decatur, Georgia 30030

404.538.1642
dtalc...@mindspring.com





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


Re: [Flashcoders] error mesg

2010-12-16 Thread DONALD TALCOTT
I failed to mention, also have the following for a button;
mc_aim_higher.mc_form.submitBtn.addEventListener(MouseEvent.CLICK, doSubmit);

If I remove e.MouseEvent the button won't work.


On Dec 16, 2010, at 7:05 PM, Nathan Mynarcik wrote:

 Take out the e:MouseEvent in your doSubmit function.
 On Dec 16, 2010 6:40 PM, DONALD TALCOTT dtalc...@mindspring.com wrote:
 I have the following code below. When I compile the swf,I get the
 following error;
 Line 187 1136: Incorrect number of arguments. Expected 1.
 
 Have been playing with this all day, somewhat new to as3, and this has me
 stumped.
 Any help/insight would be greatly appreciated.
 
 
 stage.addEventListener(KeyboardEvent.KEY_DOWN, doSubmitViaEnter);
 
 function doSubmitViaEnter(e:KeyboardEvent):void
 {
 if (e.keyCode == 13)
 {
 doSubmit(); // this is line 187
 }
 };
 
 
 function doSubmit(e:MouseEvent):void
 {
 var clip:MovieClip = active_clip.mc_form;
 
 if (fname1field.text ==  || lname1field.text ==  || email1field.text
 ==  || clip.fnamefield.text ==  || clip.lnamefield.text ==  ||
 clip.titlefield.text ==  || clip.emailfield.text == )
 {
 status_txt.text = Please fill in all required fields.;
 }
 else
 {
 //All fields valid so send away!
 status_txt.text = Posting nomination...\nPlease wait...;
 doSend();
 }
 }
 
 
 
 
 DON TALCOTT
 316 Greenwood Avenue
 Decatur, Georgia 30030
 
 404.538.1642
 dtalc...@mindspring.com
 

DON TALCOTT
316 Greenwood Avenue
Decatur, Georgia 30030

404.538.1642
dtalc...@mindspring.com




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


Re: [Flashcoders] error mesg

2010-12-16 Thread DONALD TALCOTT
Thanks to all, it is woking and posting all data.

function doSubmitViaEnter(e:KeyboardEvent):void
{
if (e.keyCode == 13)
{
status_txt.text = Posting nomination...\nPlease wait...;
doSubmit();
}
}


function doSubmit(e:MouseEvent=null):void
{
var clip:MovieClip = active_clip.mc_form;

if (fname1field.text ==  || lname1field.text ==  || 
email1field.text ==  || clip.fnamefield.text ==  || clip.lnamefield.text == 
 || clip.titlefield.text ==  || clip.emailfield.text == )
{
status_txt.text = Please fill in all required fields.;
}
else
{
//All fields valid so send away!
status_txt.text = Posting nomination...\nPlease wait...;
doSend();
}
}

//Disable all the fields and buttons
//prep all the variables that need to be sent to PHP
//send them to register.php


function doSend():void
{
for (var i:uint = 0; i  fields.length; i++)
{
fields[i].enabled = false;
}

//enable preloader dots
dots.visible = true;
dots.play();

var variables:URLVariables = new URLVariables();
// variables follow .

On Dec 16, 2010, at 7:48 PM, Merrill, Jason wrote:

 You shouldn't be manually calling an event handler in your code.  If you want 
 multiple event handler functions to run the same set of code, then create a 
 third function that they all call.  
 
 function onSomething(event:Event):void
 {
   doIt();
 }
 
 function onSomethingElse(event:Event)
 {
   doIt();
 }
 
 function doIt():void
 {
   //doStuff.
 }
 
 
 Jason Merrill
 Instructional Technology Architect
 Bank of America  Global Learning 
 
 
 
 
 
 ___
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com 
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of DONALD TALCOTT
 Sent: Thursday, December 16, 2010 7:24 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] error mesg
 
 I failed to mention, also have the following for a button; 
 mc_aim_higher.mc_form.submitBtn.addEventListener(MouseEvent.CLICK, doSubmit);
 
 If I remove e.MouseEvent the button won't work.
 
 
 On Dec 16, 2010, at 7:05 PM, Nathan Mynarcik wrote:
 
 Take out the e:MouseEvent in your doSubmit function.
 On Dec 16, 2010 6:40 PM, DONALD TALCOTT dtalc...@mindspring.com wrote:
 I have the following code below. When I compile the swf,I get the
 following error;
 Line 187 1136: Incorrect number of arguments. Expected 1.
 
 Have been playing with this all day, somewhat new to as3, and this 
 has me
 stumped.
 Any help/insight would be greatly appreciated.
 
 
 stage.addEventListener(KeyboardEvent.KEY_DOWN, doSubmitViaEnter);
 
 function doSubmitViaEnter(e:KeyboardEvent):void
 {
 if (e.keyCode == 13)
 {
 doSubmit(); // this is line 187
 }
 };
 
 
 function doSubmit(e:MouseEvent):void
 {
 var clip:MovieClip = active_clip.mc_form;
 
 if (fname1field.text ==  || lname1field.text ==  || 
 email1field.text
 ==  || clip.fnamefield.text ==  || clip.lnamefield.text ==  || 
 clip.titlefield.text ==  || clip.emailfield.text == )
 {
 status_txt.text = Please fill in all required fields.; } else { 
 //All fields valid so send away!
 status_txt.text = Posting nomination...\nPlease wait...; doSend(); 
 } }
 
 
 
 
 DON TALCOTT
 316 Greenwood Avenue
 Decatur, Georgia 30030
 
 404.538.1642
 dtalc...@mindspring.com
 
 
 DON TALCOTT
 316 Greenwood Avenue
 Decatur, Georgia 30030
 
 404.538.1642
 dtalc...@mindspring.com
 
 
 
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 --
 This message w/attachments (message) is intended solely for the use of the 
 intended recipient(s) and may contain information that is privileged, 
 confidential or proprietary. If you are not an intended recipient, please 
 notify the sender, and then please delete and destroy all copies and 
 attachments, and be advised that any review or dissemination of, or the 
 taking of any action in reliance on, the information contained in or attached 
 to this message is prohibited. 
 Unless specifically indicated, this message is not an offer to sell or a 
 solicitation of any investment products or other financial product or 
 service, an official confirmation of any transaction, or an official 
 statement of Sender. Subject to applicable law, Sender may intercept, 
 monitor, review and retain e-communications (EC) traveling through its 
 networks/systems and may produce any such EC to regulators, law enforcement, 
 in litigation and as required by law. 
 The laws of the country of each sender/recipient may impact the handling of 
 EC, and EC may be archived, supervised and produced in countries other than 
 the country in which you

[Flashcoders] as/papervision3D question

2010-06-30 Thread DONALD TALCOTT
I have a 3D portfolio built with papervision that works great. It opens with a 
category image (cube). On mouseOVER, a matrix of thumbnail images 
(categoryClicked) opens.

I would like to have the gallery of thumbnails open automatically without a 
mouseEvent. I've tried using a TimerEvent and EnterFrame with no luck.
Any ideas?

Thanks. 

code section:



env.scene.addChild(cube);
// interactive

cube.addEventListener(InteractiveScene3DEvent.OBJECT_OVER, categoryClicked, 
false, 0, true);


// loaded complete
if (++count == totalCategory)
{
// hide preloader
loadText0.visible = false;
// fade in viewport and move camera
dLayer.activate(true);
//addChild(goFull);
TweenMax.to(env.viewport, 2, { alpha:1, 
startAt: { alpha:0 } });
TweenMax.to(env.camera, 2, {x:0, 
y:0, z: -env.camera.zoom * env.camera.focus, ease:Quint.easeOut});
TweenMax.to(this, 0, {  
delay:1, 

onComplete:function():void

{

// start looking around

PV3DShortcut.startLookAroundStyle2(env, 
configObject.lookAroundDelta);

dLayer.deactivate();

}
});
env.startRendering();
}
}
}

// Category Interactive
private function categoryClicked(e:InteractiveScene3DEvent):void
{
if (gridMode) return;
env.keepRendering = true;
cCategory = Cube(e.target);
// fade out other cube
var i:Number;
var c:Cube;
for (i = 0; i  totalCategory; i++)
{
c = Cube(env.scene.getChildByName(category + 
i));
if (i != e.target.extra.index)
{
TweenMax.to(c, 0.75, { scale:0, 
ease:Quint.easeOut, visible:false } );
}
}
// move selected cube to center
TweenMax.to(e.target, 1, { x:0, ease:Quint.easeOut } );
// rotate cube - start load or display asset
rotateCube = new TweenMax(e.target, 5, { delay:0.5, 
rotationY:360, loop:0, ease:Linear.easeNone } );
currentCategory = e.target.extra.index;
dLayer.activate(true);
//addChild(goFull);
// load asset or display
if (!category[currentCategory].assetLoaded) 
loadCategoryAsset(); 
else 
{
maxPage = 
Math.floor(category[currentCategory].TOTAL / 
category[currentCategory].matrix.num) + (category[currentCategory].TOTAL % 
category[currentCategory].matrix.num != 0);
displayCategoryAsset();
}
}

DON TALCOTT

404.538.1642
dtalc...@mindspring.com




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


Re: [Flashcoders] Upgrading from Master Collection Cs4 - just Flash Cs5?

2010-06-19 Thread DONALD TALCOTT
Yes you can upgrade to Flash Professional CS5 from from Adobe Flash CS4
Professional or CS3 Professional or Macromedia Flash Professional 8 or Basic
8 for $199.00.

http://www.adobe.com/products/flash/?promoid=BPDEE

If you use the complete CS4 Suite, and you upgrade any other components at a
latter date, this is an expensive way to go. It is a trap, but it is always
better/cheaper to upgrade the complete suite.

  


On 6/19/10 3:04 PM, Matt S. mattsp...@gmail.com wrote:

 If you've purchased the Master collection of CS4, is it possible to
 just upgrade Flash to CS5 without upgrading the whole Collection?
 Adobe has all sorts of upgrade eligibility crap on their site but
 its not clear whether there is a way to just upgrade single products
 within a Suite. Anyone here know the scoop on that?
 
 Thanks,
 
 .m
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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


[Flashcoders] Dynamic Text Boxes in Flash CS4

2010-05-26 Thread Donald Talcott
I have some static text boxes that I need to make dynamic.
Questions;
1. Do you have to render text as HTML in a Dynamic text box in order to use 
multiple font sizes and colors within each box?
2. When I render the text as HTML, format the type, get it looking good. Then I 
click outside the text box, the text weight and line spacing changes.
When I select the text box again with the text tool, the type appears correct 
as I originally set it.

Is this normal or is Flash messing with my mind.



Don Talcott
316 Greenwood Ave
Decatur, GA 30030
404 538-1642
dtalc...@mindspring.com



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


Re: [Flashcoders] gotoAndPlay a sorted array

2010-05-12 Thread Donald Talcott
Keith, Karl,
thanks, I have a clearer understanding now.

File structure; Frame labels on timeline order = mmPretzel, 
3Musketeers_truffle, MilkyWay_Caramel, mmCO, mmCherry, Twix_java, VOTE, mmPB, 
NASCAR.
Animations are setup to play to the end of one then bounce over to the next one 
in the final array.
What I am trying to get on gotoAndPlay is mmPretzel and 3Musketeers_truffle 
always play 1st and 2nd, then a random pick from the remaining 7 would play as 
3rd, followed by the 4th item in the array and so forth.

My current trace statements = 
trace(b) = mmCherry, mmPB,mmCO, MilkyWay_Caramel, VOTE, Twix_java, NASCAR.
trace(mOnemTwo) = mmPretzel, 3Musketeers_truffle, mmCherry, mmPB, mmCO, 
MilkyWay_Caramel, VOTE, Twix_java, NASCAR.

play result = mmPretzel, 3Musketeers_truffle, MilkyWay_Caramel, mmCO, mmCherry, 
Twix_java, VOTE, mmPB, NASCAR (original order on timeline) 

On May 11, 2010, at 11:56 PM, Keith Reinfeld wrote:

 Don, 
 
 Yes, Karl is correct. In my post 'index' is a variable of type Number which
 you would increment upon successive calls to function goOn(). You access
 elements of an array by using the array access operator '[]'. The indices of
 arrays are zero based, so the index of the first element is 0, the index of
 the second element is 1, the index of the third element is 2, and so on. You
 can use the length property of an array to find out how many elements there
 are in the array. In your case you have an array with 9 elements so you
 would want to use index values between 0 and 8. Note that mOnemTwo.length
 (9) is one higher than the highest index value you can use with this array
 (8). The sample code below includes an if/else block to manage index values.
 
 
 // initialize index 
 var index:Number = 0; 
 function goOn(){ 
   gotoAndPlay(mOnemTwo[index]); 
   // manage the index 
   if(index  mOnemTwo.length - 1){ 
   // increment index by one 
   index++; 
   }else{ 
   // set index back to zero 
   index = 0; 
   } 
 }; 
 
 I have to echo Karl's questions about how you are planning to make
 subsequent calls to function goOn(). What you have, setTimeout(goOn,+8),
 will kick off the first one (although I don't understand the '+8' in the
 delay parameter) but what about the rest? Any suggestions I could make here
 would be pure guesswork without knowing more about the structure of your
 file. 
 
 HTH
 
 Regards, 
 
 Keith Reinfeld
 Home Page: http://keithreinfeld.home.comcast.net
 
 
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Don Talcott
316 Greenwood Ave
Decatur, GA 30030
404 538-1642
dtalc...@mindspring.com



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


Re: [Flashcoders] gotoAndPlay a sorted array

2010-05-12 Thread Donald Talcott
Keith,
That did it. I shortened the delay and all is working well. Thank you. My 
example cited in this post was last years project, I wanted to work out the 
code first using it.
Now it's time to build this years project. I owe you.

On May 12, 2010, at 10:09 AM, Keith Reinfeld wrote:

 Don, 
 
 Okay, if I understand you correctly, you could insert a keyframe at the end
 of each animation which will allow you to place some code: 
 
 stop();
 setTimeout(goOn,1000);// that's a one second delay 
 
 This will call the goOn function which in turn will direct the playhead to
 each animation in the desired (randomized) order. 
 If you use the if/else block (from the code in my previous post) to manage
 the index then the animations will repeat, continuously. 
 
 Regards,
 
 Keith Reinfeld
 Home Page: http://keithreinfeld.home.comcast.net
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-
 boun...@chattyfig.figleaf.com] On Behalf Of Donald Talcott
 Sent: Wednesday, May 12, 2010 7:58 AM
 To: Flash Coders List
 Subject: Re: [Flashcoders] gotoAndPlay a sorted array
 
 Keith, Karl,
 thanks, I have a clearer understanding now.
 
 File structure; Frame labels on timeline order = mmPretzel,
 3Musketeers_truffle, MilkyWay_Caramel, mmCO, mmCherry, Twix_java, VOTE,
 mmPB, NASCAR.
 Animations are setup to play to the end of one then bounce over to the
 next one in the final array.
 What I am trying to get on gotoAndPlay is mmPretzel and
 3Musketeers_truffle always play 1st and 2nd, then a random pick from
 the remaining 7 would play as 3rd, followed by the 4th item in the
 array and so forth.
 
 My current trace statements =
 trace(b) = mmCherry, mmPB,mmCO, MilkyWay_Caramel, VOTE, Twix_java,
 NASCAR.
 trace(mOnemTwo) = mmPretzel, 3Musketeers_truffle, mmCherry, mmPB, mmCO,
 MilkyWay_Caramel, VOTE, Twix_java, NASCAR.
 
 play result = mmPretzel, 3Musketeers_truffle, MilkyWay_Caramel, mmCO,
 mmCherry, Twix_java, VOTE, mmPB, NASCAR (original order on timeline)
 
 On May 11, 2010, at 11:56 PM, Keith Reinfeld wrote:
 
 Don,
 
 Yes, Karl is correct. In my post 'index' is a variable of type Number
 which
 you would increment upon successive calls to function goOn(). You
 access
 elements of an array by using the array access operator '[]'. The
 indices of
 arrays are zero based, so the index of the first element is 0, the
 index of
 the second element is 1, the index of the third element is 2, and so
 on. You
 can use the length property of an array to find out how many elements
 there
 are in the array. In your case you have an array with 9 elements so
 you
 would want to use index values between 0 and 8. Note that
 mOnemTwo.length
 (9) is one higher than the highest index value you can use with this
 array
 (8). The sample code below includes an if/else block to manage index
 values.
 
 
 // initialize index
 var index:Number = 0;
 function goOn(){
 gotoAndPlay(mOnemTwo[index]);
 // manage the index
 if(index  mOnemTwo.length - 1){
 // increment index by one
 index++;
 }else{
 // set index back to zero
 index = 0;
 }
 };
 
 I have to echo Karl's questions about how you are planning to make
 subsequent calls to function goOn(). What you have,
 setTimeout(goOn,+8),
 will kick off the first one (although I don't understand the '+8' in
 the
 delay parameter) but what about the rest? Any suggestions I could
 make here
 would be pure guesswork without knowing more about the structure of
 your
 file.
 
 HTH
 
 Regards,
 
 Keith Reinfeld
 Home Page: http://keithreinfeld.home.comcast.net
 
 
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Don Talcott
 316 Greenwood Ave
 Decatur, GA 30030
 404 538-1642
 dtalc...@mindspring.com
 
 
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Don Talcott
316 Greenwood Ave
Decatur, GA 30030
404 538-1642
dtalc...@mindspring.com



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


Re: [Flashcoders] Random Sort of Array

2010-05-11 Thread Donald Talcott
Kenneth,
thanks for the response, this should work well.

On May 11, 2010, at 4:53 AM, kennethkawam...@gmail.com wrote:

 Have two arrays - first one with 2 products and second one with 7
 products. Randomise the 2nd array  (with Fisher-Yates shuffle ;) and
 concat() the two arrays to produce the array with 9 products.
 -- 
 Kenneth Kawamoto
 http://www.materiaprima.co.uk/
 
 On 11 May 2010 01:44, Donald Talcott dtalc...@mindspring.com wrote:
 Last year I created a small timeline based intro of products for a client
 that used Math.random to produce a random start of the animation sequence.
 This year they would like two specific product animations to always start in
 the #1 and #2 position and the remaining 7 products to play in a random
 order. I have given this some thought and am not sure how to go about it.
 Any ideas out there? If I contain the two specific products to the # 1 and #
 2 positions, and procede randomly to the rest, how might I get all 7
 remaining products to play before replaying #1 and #2?
 
 Last years code below:
 
 stop();
 var minList:Array = [mmPretzel, 3Musketeers_truffle, MilkyWay_Caramel,
 mmCO, mmCherry, Twix_java, VOTE, mmPB, NASCAR];
 var minStart:Number = Math.floor(Math.random()*9);
 trace(minStart);
 trace(minList[minStart]);
 
 function goOn(){
 gotoAndPlay(minList[minStart]);
 };
 setTimeout(goOn,+8);
 
 
 
 
 
 Don Talcott
 316 Greenwood Ave
 Decatur, GA 30030
 404 538-1642
 dtalc...@mindspring.com
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Don Talcott
316 Greenwood Ave
Decatur, GA 30030
404 538-1642
dtalc...@mindspring.com



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


[Flashcoders] gotoAndPlay a sorted array

2010-05-11 Thread Donald Talcott
Have a file with 9 animations, each with a frame label on the timeline
 I've created 2 arrays, sorted the 2nd one and concat() the two into a third 
array.
I'm tracing all arrays and they are working as I'd like. Now I would like to 
gotoAndPlay the final array.
Can this be done? See code below:

stop();
var mOne:Array = [mmPretzel, 3Musketeers_truffle];
var mTwo:Array = [MilkyWay_Caramel, mmCO, mmCherry, Twix_java, VOTE, 
mmPB, NASCAR];


function shuffle(mTwo,b):int {
var num : int = Math.round(Math.random()*2)-1;
return num;
}
var b:Array = mTwo.sort(shuffle);
trace(b);

var mOnemTwo:Array = mOne.concat(b);
trace(mOnemTwo);




/*function goOn(){
gotoAndPlay(mOnemTwo);
};
setTimeout(goOn,+8);
*/


When I uncomment the function, I get the following error.

mmCherry,mmPB,mmCO,MilkyWay_Caramel,VOTE,Twix_java,NASCAR
mmPretzel,3Musketeers_truffle,mmCherry,mmPB,mmCO,MilkyWay_Caramel,VOTE,Twix_java,NASCAR

ArgumentError: Error #2109: Frame label 
mmPretzel,3Musketeers_truffle,mmCherry,mmPB,mmCO,MilkyWay_Caramel,VOTE,Twix_java,NASCAR
 not found in scene Scene 1.
at flash.display::MovieClip/gotoAndPlay()
at Mars_2010Test_fla::MainTimeline/goOn()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at SetIntervalTimer/onTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

Don Talcott
316 Greenwood Ave
Decatur, GA 30030
404 538-1642
dtalc...@mindspring.com



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


Re: [Flashcoders] gotoAndPlay a sorted array

2010-05-11 Thread Donald Talcott

Keith,
added [index] to the function;
now have the following error:
1120:Access of undefined property index.

Wish I could wrap my head around this. Any thoughts?

On May 11, 2010, at 7:31 PM, Keith Reinfeld wrote:


gotoAndPlay(mOnemTwo);


You need to pass just one element of the mOnemTwo array rather than  
the

entire array.
So:

gotoAndPlay(mOnemTwo[index]);

Regards,

Keith Reinfeld
Home Page: http://keithreinfeld.home.comcast.net


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-
boun...@chattyfig.figleaf.com] On Behalf Of Donald Talcott
Sent: Tuesday, May 11, 2010 5:25 PM
To: Flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] gotoAndPlay a sorted array

Have a file with 9 animations, each with a frame label on the  
timeline

I've created 2 arrays, sorted the 2nd one and concat() the two into a
third array.
I'm tracing all arrays and they are working as I'd like. Now I would
like to gotoAndPlay the final array.
Can this be done? See code below:

stop();
var mOne:Array = [mmPretzel, 3Musketeers_truffle];
var mTwo:Array = [MilkyWay_Caramel, mmCO, mmCherry,  
Twix_java,

VOTE, mmPB, NASCAR];


function shuffle(mTwo,b):int {
var num : int = Math.round(Math.random()*2)-1;
return num;
}
var b:Array = mTwo.sort(shuffle);
trace(b);

var mOnemTwo:Array = mOne.concat(b);
trace(mOnemTwo);




/*function goOn(){
gotoAndPlay(mOnemTwo);
};
setTimeout(goOn,+8);
*/


When I uncomment the function, I get the following error.

mmCherry,mmPB,mmCO,MilkyWay_Caramel,VOTE,Twix_java,NASCAR
mmPretzel, 
3Musketeers_truffle,mmCherry,mmPB,mmCO,MilkyWay_Caramel,VOTE,

Twix_java,NASCAR

ArgumentError: Error #2109: Frame label
mmPretzel, 
3Musketeers_truffle,mmCherry,mmPB,mmCO,MilkyWay_Caramel,VOTE,

Twix_java,NASCAR not found in scene Scene 1.
at flash.display::MovieClip/gotoAndPlay()
at Mars_2010Test_fla::MainTimeline/goOn()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at SetIntervalTimer/onTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

Don Talcott
316 Greenwood Ave
Decatur, GA 30030
404 538-1642
dtalc...@mindspring.com



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


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


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


[Flashcoders] Random Sort of Array

2010-05-10 Thread Donald Talcott
Last year I created a small timeline based intro of products for a  
client that used Math.random to produce a random start of the  
animation sequence. This year they would like two specific product  
animations to always start in the #1 and #2 position and the remaining  
7 products to play in a random order. I have given this some thought  
and am not sure how to go about it. Any ideas out there? If I contain  
the two specific products to the # 1 and # 2 positions, and procede  
randomly to the rest, how might I get all 7 remaining products to play  
before replaying #1 and #2?


Last years code below:

stop();
var minList:Array = [mmPretzel, 3Musketeers_truffle,  
MilkyWay_Caramel, mmCO, mmCherry, Twix_java, VOTE, mmPB,  
NASCAR];

var minStart:Number = Math.floor(Math.random()*9);
trace(minStart);
trace(minList[minStart]);

function goOn(){
gotoAndPlay(minList[minStart]);
};
setTimeout(goOn,+8);





Don Talcott
316 Greenwood Ave
Decatur, GA 30030
404 538-1642
dtalc...@mindspring.com

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


[Flashcoders] Question about MouseEvent.ROLL_OVER and ROLL_OUT

2010-05-05 Thread Donald Talcott
I have an AS3 fla file with a mc and stop() on frame 1 and different content on 
additional frames.
When the swf is launched, I would like to have a MouseEvent.ROLL_OVER with a 
function to gotoAnd Play frame 2. Also I would like to have a 
MouseEvent.ROLL_OUT with a function to gotoAndSop on frame 1. I have added a mc 
the size of my file and used it as a button. I can get the ROLL_OVER to work, 
but not the ROLL_OUT. I hope this is not to vague. Can anyone help.


Don Talcott
316 Greenwood Ave
Decatur, GA 30030
404 538-1642
dtalc...@mindspring.com



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


Re: [Flashcoders] Question about MouseEvent.ROLL_OVER and ROLL_OUT

2010-05-05 Thread Donald Talcott
My file has two scenes. See code below. Originally the Mouse Events  
were MouseEvent.CLICK and they worked fine.


Scene 1
Frame 1

stop();


playScene2_btn.addEventListener(MouseEvent.MOUSE_OVER, playScene2);

function playScene2(evt:Event)
{
gotoAndPlay(1, Scene 2);
}

Scene 2
Frame 1

gotoScene1_btn.addEventListener(MouseEvent.CLICK, gotoScene1);

function gotoScene1(evt:Event)
{
gotoAndStop(1, Scene 1);
}

On May 5, 2010, at 5:44 PM, Karl DeSaulniers wrote:


Please post your code if you can.
It may be a problem with the way you have written it.


Karl


On May 5, 2010, at 4:35 PM, Donald Talcott wrote:

I have an AS3 fla file with a mc and stop() on frame 1 and  
different content on additional frames.
When the swf is launched, I would like to have a  
MouseEvent.ROLL_OVER with a function to gotoAnd Play frame 2. Also  
I would like to have a MouseEvent.ROLL_OUT with a function to  
gotoAndSop on frame 1. I have added a mc the size of my file and  
used it as a button. I can get the ROLL_OVER to work, but not the  
ROLL_OUT. I hope this is not to vague. Can anyone help.



Don Talcott
316 Greenwood Ave
Decatur, GA 30030
404 538-1642
dtalc...@mindspring.com



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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


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