RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
So this is what happened... trace("imgID: "+imgID); //returns layout5_set3_img10 trace("rfcClip: "+rfcClip); //returns lay5_img10 trace(this[rfcClip]); //returns undefined trace(this); //returns undefined and this will sound stuipid but wtf does all that mean? How can the loadImages function have and undefined scope? Corban Baxter | rich media designer | www.funimation.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Corban Baxter Sent: Thursday, February 02, 2006 2:22 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; And how can traceing(this) return undefined? Is that possible? Corban Baxter | rich media designer | www.funimation.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, February 02, 2006 2:14 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; C'mon Corban - you can do this - don't get frustrated and ask us to do everything ;) - walk back a little in your code. What does trace(rfcClip) show? That should be the same name as your clip. What does trace(this) show in your loadImages function show? That should be the same timeline as the clip you are targeting... I know you're frustrated, don't give up. Just a little logic with trace statements will show you where you are going wrong. Jason Merrill | E-Learning Solutions | icfconsulting.com >>-Original Message- >>From: [EMAIL PROTECTED] [mailto:flashcoders- >>[EMAIL PROTECTED] On Behalf Of Corban Baxter >>Sent: Thursday, February 02, 2006 3:07 PM >>To: Flashcoders mailing list >>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; >> >>Well as you said it is a tracing issue and it's giving me an 'undefined'? >>What would >>cause this? I have the clips on the stage with the same instances? Any ideas? >> >>Corban Baxter | rich media designer | www.funimation.com >> >> >>-Original Message- >>From: [EMAIL PROTECTED] [mailto:flashcoders- >>[EMAIL PROTECTED] On Behalf Of Merrill, Jason >>Sent: Thursday, February 02, 2006 2:02 PM >>To: Flashcoders mailing list >>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; >> >>Have been out of the loop since yesterday, but again, some proper tracing >>should >>knock this down. >> >>Instead of tracing >> >>trace("rfcClip: "+rfcClip+" - typeof("+typeof (rfcClip)+")"); >> >>(ick!) >> >>do: >> >>trace(this[rfcClip]) >> >>In your code, you have rfcClip as just a string, so no, it's not going to be >>a movie >>clip until you do this[rfcClip] - which you should trace to see if its >>resolving to an >>actual clip. >> >> >>Jason Merrill | E-Learning Solutions | icfconsulting.com >> >> >> >> >> >> >> >> >> >> >>>>-Original Message- >>>>From: [EMAIL PROTECTED] [mailto:flashcoders- >>>>[EMAIL PROTECTED] On Behalf Of Corban Baxter >>>>Sent: Thursday, February 02, 2006 2:56 PM >>>>To: Flashcoders mailing list >>>>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; >>>> >>>>Could some one please take a look at my fla or the code and tell me why >>>>flash >>>>won't attach this clips correctly? Please! I'm not much of a beggar but >>>>this is >>>>getting out of hand. I feel like I have done this a thousand times and this >>>>time >>it >>>>won't work. >>>> >>>>[code] >>>> >>>>///varibles setup >>>>var layoutNum:Number; >>>>var setsArray:Array = [null, 3, 3, 3, 3, 4]; >>>>var totalSetsNLayout:Number; >>>>var totalImagesNLayout:Array = [null, 9, 8, 6, 6, 11]; >>>>var imagesToGrab:Number; >>>>var imgArray:Array = new Array(); >>>>var rfcsArray:Array = new Array(); >>>>var randomSet:Number; >>>> >>>>function selectLayoutNum() { >>>>//check if it was the last layout >>>>//set layoutNum >>>>layoutNum = random(5)+1; >>>>while (layoutNum == oldNum) { >>>>layoutNum = random(5)+1; >>>>} >>>>var oldNum:Number = layoutNum; >>>>tra
RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
And how can traceing(this) return undefined? Is that possible? Corban Baxter | rich media designer | www.funimation.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, February 02, 2006 2:14 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; C'mon Corban - you can do this - don't get frustrated and ask us to do everything ;) - walk back a little in your code. What does trace(rfcClip) show? That should be the same name as your clip. What does trace(this) show in your loadImages function show? That should be the same timeline as the clip you are targeting... I know you're frustrated, don't give up. Just a little logic with trace statements will show you where you are going wrong. Jason Merrill | E-Learning Solutions | icfconsulting.com >>-Original Message- >>From: [EMAIL PROTECTED] [mailto:flashcoders- >>[EMAIL PROTECTED] On Behalf Of Corban Baxter >>Sent: Thursday, February 02, 2006 3:07 PM >>To: Flashcoders mailing list >>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; >> >>Well as you said it is a tracing issue and it's giving me an 'undefined'? >>What would >>cause this? I have the clips on the stage with the same instances? Any ideas? >> >>Corban Baxter | rich media designer | www.funimation.com >> >> >>-Original Message- >>From: [EMAIL PROTECTED] [mailto:flashcoders- >>[EMAIL PROTECTED] On Behalf Of Merrill, Jason >>Sent: Thursday, February 02, 2006 2:02 PM >>To: Flashcoders mailing list >>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; >> >>Have been out of the loop since yesterday, but again, some proper tracing >>should >>knock this down. >> >>Instead of tracing >> >>trace("rfcClip: "+rfcClip+" - typeof("+typeof (rfcClip)+")"); >> >>(ick!) >> >>do: >> >>trace(this[rfcClip]) >> >>In your code, you have rfcClip as just a string, so no, it's not going to be >>a movie >>clip until you do this[rfcClip] - which you should trace to see if its >>resolving to an >>actual clip. >> >> >>Jason Merrill | E-Learning Solutions | icfconsulting.com >> >> >> >> >> >> >> >> >> >> >>>>-Original Message- >>>>From: [EMAIL PROTECTED] [mailto:flashcoders- >>>>[EMAIL PROTECTED] On Behalf Of Corban Baxter >>>>Sent: Thursday, February 02, 2006 2:56 PM >>>>To: Flashcoders mailing list >>>>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; >>>> >>>>Could some one please take a look at my fla or the code and tell me why >>>>flash >>>>won't attach this clips correctly? Please! I'm not much of a beggar but >>>>this is >>>>getting out of hand. I feel like I have done this a thousand times and this >>>>time >>it >>>>won't work. >>>> >>>>[code] >>>> >>>>///varibles setup >>>>var layoutNum:Number; >>>>var setsArray:Array = [null, 3, 3, 3, 3, 4]; >>>>var totalSetsNLayout:Number; >>>>var totalImagesNLayout:Array = [null, 9, 8, 6, 6, 11]; >>>>var imagesToGrab:Number; >>>>var imgArray:Array = new Array(); >>>>var rfcsArray:Array = new Array(); >>>>var randomSet:Number; >>>> >>>>function selectLayoutNum() { >>>>//check if it was the last layout >>>>//set layoutNum >>>>layoutNum = random(5)+1; >>>>while (layoutNum == oldNum) { >>>>layoutNum = random(5)+1; >>>>} >>>>var oldNum:Number = layoutNum; >>>>trace("layoutNum: "+layoutNum); >>>>getSetsNLayout(layoutNum); >>>>} >>>>function getSetsNLayout(layoutNum) { >>>>totalSetsNLayout = setsArray[layoutNum]; >>>>trace("totalSetsNLayout: "+totalSetsNLayout); >>>>gatherImages4Layout(totalSetsNLayout, layoutNum); >>>>} >>>> >>>>function gatherImages4Layout(totalSetsNLayout, layoutNum) { >>>>imagesToGrab = totalImagesNLayout[layoutNum]; >>>>trace("imagesToGrab: "+imagesToGrab); >>>>//dynamicly create array of images to be used
RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
Really. Whats sad is I really don't know how all this works. I have been coding AS1 for about 2 years now and I have gotten this far without really know much besides understanding basic logic really well. I don't mean to ask a lot of questions I am just at one of those humps in my learning that I need a little insight into what's possible. I never knew I could get different scopes by tracing(this)... Interesting stuff. I am going to look more but sorry if I have to ask... Corban Baxter | rich media designer | www.funimation.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, February 02, 2006 2:14 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; C'mon Corban - you can do this - don't get frustrated and ask us to do everything ;) - walk back a little in your code. What does trace(rfcClip) show? That should be the same name as your clip. What does trace(this) show in your loadImages function show? That should be the same timeline as the clip you are targeting... I know you're frustrated, don't give up. Just a little logic with trace statements will show you where you are going wrong. Jason Merrill | E-Learning Solutions | icfconsulting.com >>-Original Message- >>From: [EMAIL PROTECTED] [mailto:flashcoders- >>[EMAIL PROTECTED] On Behalf Of Corban Baxter >>Sent: Thursday, February 02, 2006 3:07 PM >>To: Flashcoders mailing list >>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; >> >>Well as you said it is a tracing issue and it's giving me an 'undefined'? >>What would >>cause this? I have the clips on the stage with the same instances? Any ideas? >> >>Corban Baxter | rich media designer | www.funimation.com >> >> >>-Original Message- >>From: [EMAIL PROTECTED] [mailto:flashcoders- >>[EMAIL PROTECTED] On Behalf Of Merrill, Jason >>Sent: Thursday, February 02, 2006 2:02 PM >>To: Flashcoders mailing list >>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; >> >>Have been out of the loop since yesterday, but again, some proper tracing >>should >>knock this down. >> >>Instead of tracing >> >>trace("rfcClip: "+rfcClip+" - typeof("+typeof (rfcClip)+")"); >> >>(ick!) >> >>do: >> >>trace(this[rfcClip]) >> >>In your code, you have rfcClip as just a string, so no, it's not going to be >>a movie >>clip until you do this[rfcClip] - which you should trace to see if its >>resolving to an >>actual clip. >> >> >>Jason Merrill | E-Learning Solutions | icfconsulting.com >> >> >> >> >> >> >> >> >> >> >>>>-Original Message- >>>>From: [EMAIL PROTECTED] [mailto:flashcoders- >>>>[EMAIL PROTECTED] On Behalf Of Corban Baxter >>>>Sent: Thursday, February 02, 2006 2:56 PM >>>>To: Flashcoders mailing list >>>>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; >>>> >>>>Could some one please take a look at my fla or the code and tell me why >>>>flash >>>>won't attach this clips correctly? Please! I'm not much of a beggar but >>>>this is >>>>getting out of hand. I feel like I have done this a thousand times and this >>>>time >>it >>>>won't work. >>>> >>>>[code] >>>> >>>>///varibles setup >>>>var layoutNum:Number; >>>>var setsArray:Array = [null, 3, 3, 3, 3, 4]; >>>>var totalSetsNLayout:Number; >>>>var totalImagesNLayout:Array = [null, 9, 8, 6, 6, 11]; >>>>var imagesToGrab:Number; >>>>var imgArray:Array = new Array(); >>>>var rfcsArray:Array = new Array(); >>>>var randomSet:Number; >>>> >>>>function selectLayoutNum() { >>>>//check if it was the last layout >>>>//set layoutNum >>>>layoutNum = random(5)+1; >>>>while (layoutNum == oldNum) { >>>>layoutNum = random(5)+1; >>>>} >>>>var oldNum:Number = layoutNum; >>>>trace("layoutNum: "+layoutNum); >>>>getSetsNLayout(layoutNum); >>>>} >>>>function getSetsNLayout(layoutNum) { >>>>totalSetsNLayout = setsArray[layoutNum]; >>>>trace(&quo
RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
C'mon Corban - you can do this - don't get frustrated and ask us to do everything ;) - walk back a little in your code. What does trace(rfcClip) show? That should be the same name as your clip. What does trace(this) show in your loadImages function show? That should be the same timeline as the clip you are targeting... I know you're frustrated, don't give up. Just a little logic with trace statements will show you where you are going wrong. Jason Merrill | E-Learning Solutions | icfconsulting.com >>-Original Message- >>From: [EMAIL PROTECTED] [mailto:flashcoders- >>[EMAIL PROTECTED] On Behalf Of Corban Baxter >>Sent: Thursday, February 02, 2006 3:07 PM >>To: Flashcoders mailing list >>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; >> >>Well as you said it is a tracing issue and it's giving me an 'undefined'? >>What would >>cause this? I have the clips on the stage with the same instances? Any ideas? >> >>Corban Baxter | rich media designer | www.funimation.com >> >> >>-Original Message- >>From: [EMAIL PROTECTED] [mailto:flashcoders- >>[EMAIL PROTECTED] On Behalf Of Merrill, Jason >>Sent: Thursday, February 02, 2006 2:02 PM >>To: Flashcoders mailing list >>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; >> >>Have been out of the loop since yesterday, but again, some proper tracing >>should >>knock this down. >> >>Instead of tracing >> >>trace("rfcClip: "+rfcClip+" - typeof("+typeof (rfcClip)+")"); >> >>(ick!) >> >>do: >> >>trace(this[rfcClip]) >> >>In your code, you have rfcClip as just a string, so no, it's not going to be >>a movie >>clip until you do this[rfcClip] - which you should trace to see if its >>resolving to an >>actual clip. >> >> >>Jason Merrill | E-Learning Solutions | icfconsulting.com >> >> >> >> >> >> >> >> >> >> >>>>-Original Message- >>>>From: [EMAIL PROTECTED] [mailto:flashcoders- >>>>[EMAIL PROTECTED] On Behalf Of Corban Baxter >>>>Sent: Thursday, February 02, 2006 2:56 PM >>>>To: Flashcoders mailing list >>>>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; >>>> >>>>Could some one please take a look at my fla or the code and tell me why >>>>flash >>>>won't attach this clips correctly? Please! I'm not much of a beggar but >>>>this is >>>>getting out of hand. I feel like I have done this a thousand times and this >>>>time >>it >>>>won't work. >>>> >>>>[code] >>>> >>>>///varibles setup >>>>var layoutNum:Number; >>>>var setsArray:Array = [null, 3, 3, 3, 3, 4]; >>>>var totalSetsNLayout:Number; >>>>var totalImagesNLayout:Array = [null, 9, 8, 6, 6, 11]; >>>>var imagesToGrab:Number; >>>>var imgArray:Array = new Array(); >>>>var rfcsArray:Array = new Array(); >>>>var randomSet:Number; >>>> >>>>function selectLayoutNum() { >>>>//check if it was the last layout >>>>//set layoutNum >>>>layoutNum = random(5)+1; >>>>while (layoutNum == oldNum) { >>>>layoutNum = random(5)+1; >>>>} >>>>var oldNum:Number = layoutNum; >>>>trace("layoutNum: "+layoutNum); >>>>getSetsNLayout(layoutNum); >>>>} >>>>function getSetsNLayout(layoutNum) { >>>>totalSetsNLayout = setsArray[layoutNum]; >>>>trace("totalSetsNLayout: "+totalSetsNLayout); >>>>gatherImages4Layout(totalSetsNLayout, layoutNum); >>>>} >>>> >>>>function gatherImages4Layout(totalSetsNLayout, layoutNum) { >>>>imagesToGrab = totalImagesNLayout[layoutNum]; >>>>trace("imagesToGrab: "+imagesToGrab); >>>>//dynamicly create array of images to be used in layout >>>>for (i=0; i<=imagesToGrab; i++) { >>>>randomSet = random(totalSetsNLayout)+1; >>>>while (randomSet == oldSet) { >>>>randomSet = random(totalSetsNLayout)+1; >>>>} >>>>var oldSet:Number = randomSet; >>>>var img:St
RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
Well as you said it is a tracing issue and it's giving me an 'undefined'? What would cause this? I have the clips on the stage with the same instances? Any ideas? Corban Baxter | rich media designer | www.funimation.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, February 02, 2006 2:02 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; Have been out of the loop since yesterday, but again, some proper tracing should knock this down. Instead of tracing trace("rfcClip: "+rfcClip+" - typeof("+typeof (rfcClip)+")"); (ick!) do: trace(this[rfcClip]) In your code, you have rfcClip as just a string, so no, it's not going to be a movie clip until you do this[rfcClip] - which you should trace to see if its resolving to an actual clip. Jason Merrill | E-Learning Solutions | icfconsulting.com >>-Original Message- >>From: [EMAIL PROTECTED] [mailto:flashcoders- >>[EMAIL PROTECTED] On Behalf Of Corban Baxter >>Sent: Thursday, February 02, 2006 2:56 PM >>To: Flashcoders mailing list >>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; >> >>Could some one please take a look at my fla or the code and tell me why flash >>won't attach this clips correctly? Please! I'm not much of a beggar but this >>is >>getting out of hand. I feel like I have done this a thousand times and this >>time it >>won't work. >> >>[code] >> >>///varibles setup >>var layoutNum:Number; >>var setsArray:Array = [null, 3, 3, 3, 3, 4]; >>var totalSetsNLayout:Number; >>var totalImagesNLayout:Array = [null, 9, 8, 6, 6, 11]; >>var imagesToGrab:Number; >>var imgArray:Array = new Array(); >>var rfcsArray:Array = new Array(); >>var randomSet:Number; >> >>function selectLayoutNum() { >> //check if it was the last layout >> //set layoutNum >> layoutNum = random(5)+1; >> while (layoutNum == oldNum) { >> layoutNum = random(5)+1; >> } >> var oldNum:Number = layoutNum; >> trace("layoutNum: "+layoutNum); >> getSetsNLayout(layoutNum); >>} >>function getSetsNLayout(layoutNum) { >> totalSetsNLayout = setsArray[layoutNum]; >> trace("totalSetsNLayout: "+totalSetsNLayout); >> gatherImages4Layout(totalSetsNLayout, layoutNum); >>} >> >>function gatherImages4Layout(totalSetsNLayout, layoutNum) { >> imagesToGrab = totalImagesNLayout[layoutNum]; >> trace("imagesToGrab: "+imagesToGrab); >> //dynamicly create array of images to be used in layout >> for (i=0; i<=imagesToGrab; i++) { >> randomSet = random(totalSetsNLayout)+1; >> while (randomSet == oldSet) { >> randomSet = random(totalSetsNLayout)+1; >> } >> var oldSet:Number = randomSet; >> var img:String = "layout"+layoutNum+"_set"+randomSet+"_img"+i; >> imgArray.push(img); >> var myMC:String = "lay"+layoutNum+"_img"+i; >> rfcsArray.push(myMC); >> } >> //trace("imgArray= [" + imgArray + "]"); >> //trace(" "); >> //trace("rfcsArray = [" + rfcsArray + "]"); >> gotoAndPlay("lay_"+layoutNum); >>} >> >>//loadImages is called in an interval when the playhead hits the marker >>specified >>//like "lay_2" etc >>//loadImgInterval = setInterval(loadImages, 2000, imagesToGrab); >>function loadImages(imagesToGrab) { >> if (imagesToGrab == 0) { >> //stop loading images >> clearInterval(loadImgInterval); >> trace("hitting the clear"); >> } else { >> var randomPos:Number = random(imagesToGrab)+1; >> var rfcClip:String = rfcsArray[randomPos]; >> var imgID:String = imgArray[randomPos]; >> rfcsArray.splice(randomPos, 1); >> imgArray.splice(randomPos, 1); >> //select and image id >> trace("imgID: "+imgID); >> //select corisponding rfcClip >> trace("rfcClip: "+rfcClip+" - typeof("+typeof (rfcClip)+")"); >> //will strict data typing not assure me that I am pulling cli
RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
Have been out of the loop since yesterday, but again, some proper tracing should knock this down. Instead of tracing trace("rfcClip: "+rfcClip+" - typeof("+typeof (rfcClip)+")"); (ick!) do: trace(this[rfcClip]) In your code, you have rfcClip as just a string, so no, it's not going to be a movie clip until you do this[rfcClip] - which you should trace to see if its resolving to an actual clip. Jason Merrill | E-Learning Solutions | icfconsulting.com >>-Original Message- >>From: [EMAIL PROTECTED] [mailto:flashcoders- >>[EMAIL PROTECTED] On Behalf Of Corban Baxter >>Sent: Thursday, February 02, 2006 2:56 PM >>To: Flashcoders mailing list >>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; >> >>Could some one please take a look at my fla or the code and tell me why flash >>won't attach this clips correctly? Please! I'm not much of a beggar but this >>is >>getting out of hand. I feel like I have done this a thousand times and this >>time it >>won't work. >> >>[code] >> >>///varibles setup >>var layoutNum:Number; >>var setsArray:Array = [null, 3, 3, 3, 3, 4]; >>var totalSetsNLayout:Number; >>var totalImagesNLayout:Array = [null, 9, 8, 6, 6, 11]; >>var imagesToGrab:Number; >>var imgArray:Array = new Array(); >>var rfcsArray:Array = new Array(); >>var randomSet:Number; >> >>function selectLayoutNum() { >> //check if it was the last layout >> //set layoutNum >> layoutNum = random(5)+1; >> while (layoutNum == oldNum) { >> layoutNum = random(5)+1; >> } >> var oldNum:Number = layoutNum; >> trace("layoutNum: "+layoutNum); >> getSetsNLayout(layoutNum); >>} >>function getSetsNLayout(layoutNum) { >> totalSetsNLayout = setsArray[layoutNum]; >> trace("totalSetsNLayout: "+totalSetsNLayout); >> gatherImages4Layout(totalSetsNLayout, layoutNum); >>} >> >>function gatherImages4Layout(totalSetsNLayout, layoutNum) { >> imagesToGrab = totalImagesNLayout[layoutNum]; >> trace("imagesToGrab: "+imagesToGrab); >> //dynamicly create array of images to be used in layout >> for (i=0; i<=imagesToGrab; i++) { >> randomSet = random(totalSetsNLayout)+1; >> while (randomSet == oldSet) { >> randomSet = random(totalSetsNLayout)+1; >> } >> var oldSet:Number = randomSet; >> var img:String = "layout"+layoutNum+"_set"+randomSet+"_img"+i; >> imgArray.push(img); >> var myMC:String = "lay"+layoutNum+"_img"+i; >> rfcsArray.push(myMC); >> } >> //trace("imgArray= [" + imgArray + "]"); >> //trace(" "); >> //trace("rfcsArray = [" + rfcsArray + "]"); >> gotoAndPlay("lay_"+layoutNum); >>} >> >>//loadImages is called in an interval when the playhead hits the marker >>specified >>//like "lay_2" etc >>//loadImgInterval = setInterval(loadImages, 2000, imagesToGrab); >>function loadImages(imagesToGrab) { >> if (imagesToGrab == 0) { >> //stop loading images >> clearInterval(loadImgInterval); >> trace("hitting the clear"); >> } else { >> var randomPos:Number = random(imagesToGrab)+1; >> var rfcClip:String = rfcsArray[randomPos]; >> var imgID:String = imgArray[randomPos]; >> rfcsArray.splice(randomPos, 1); >> imgArray.splice(randomPos, 1); >> //select and image id >> trace("imgID: "+imgID); >> //select corisponding rfcClip >> trace("rfcClip: "+rfcClip+" - typeof("+typeof (rfcClip)+")"); >> //will strict data typing not assure me that I am pulling clip >>references? >> //ALL ISSUES ARE OCCURING IN THIS LINE OF CODE FROM WHAT I >>UNDERSTAND >> //COULD ANYONE HELP ME OUT WITH THIS? >> this[rfcClip].container.attachMovie(imgID, imgID, >>this.getNextHighestDepth()); >> imagesToGrab--; >> clearInterval(loadImgInterval); >> loadImgInterval = setInterval(loadImages, 2000, imagesToGrab); >> } >> trace("image
RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
Could some one please take a look at my fla or the code and tell me why flash won't attach this clips correctly? Please! I'm not much of a beggar but this is getting out of hand. I feel like I have done this a thousand times and this time it won't work. [code] ///varibles setup var layoutNum:Number; var setsArray:Array = [null, 3, 3, 3, 3, 4]; var totalSetsNLayout:Number; var totalImagesNLayout:Array = [null, 9, 8, 6, 6, 11]; var imagesToGrab:Number; var imgArray:Array = new Array(); var rfcsArray:Array = new Array(); var randomSet:Number; function selectLayoutNum() { //check if it was the last layout //set layoutNum layoutNum = random(5)+1; while (layoutNum == oldNum) { layoutNum = random(5)+1; } var oldNum:Number = layoutNum; trace("layoutNum: "+layoutNum); getSetsNLayout(layoutNum); } function getSetsNLayout(layoutNum) { totalSetsNLayout = setsArray[layoutNum]; trace("totalSetsNLayout: "+totalSetsNLayout); gatherImages4Layout(totalSetsNLayout, layoutNum); } function gatherImages4Layout(totalSetsNLayout, layoutNum) { imagesToGrab = totalImagesNLayout[layoutNum]; trace("imagesToGrab: "+imagesToGrab); //dynamicly create array of images to be used in layout for (i=0; i<=imagesToGrab; i++) { randomSet = random(totalSetsNLayout)+1; while (randomSet == oldSet) { randomSet = random(totalSetsNLayout)+1; } var oldSet:Number = randomSet; var img:String = "layout"+layoutNum+"_set"+randomSet+"_img"+i; imgArray.push(img); var myMC:String = "lay"+layoutNum+"_img"+i; rfcsArray.push(myMC); } //trace("imgArray= [" + imgArray + "]"); //trace(" "); //trace("rfcsArray = [" + rfcsArray + "]"); gotoAndPlay("lay_"+layoutNum); } //loadImages is called in an interval when the playhead hits the marker specified //like "lay_2" etc //loadImgInterval = setInterval(loadImages, 2000, imagesToGrab); function loadImages(imagesToGrab) { if (imagesToGrab == 0) { //stop loading images clearInterval(loadImgInterval); trace("hitting the clear"); } else { var randomPos:Number = random(imagesToGrab)+1; var rfcClip:String = rfcsArray[randomPos]; var imgID:String = imgArray[randomPos]; rfcsArray.splice(randomPos, 1); imgArray.splice(randomPos, 1); //select and image id trace("imgID: "+imgID); //select corisponding rfcClip trace("rfcClip: "+rfcClip+" - typeof("+typeof (rfcClip)+")"); //will strict data typing not assure me that I am pulling clip references? //ALL ISSUES ARE OCCURING IN THIS LINE OF CODE FROM WHAT I UNDERSTAND //COULD ANYONE HELP ME OUT WITH THIS? this[rfcClip].container.attachMovie(imgID, imgID, this.getNextHighestDepth()); imagesToGrab--; clearInterval(loadImgInterval); loadImgInterval = setInterval(loadImages, 2000, imagesToGrab); } trace("imagesLeftToLoad: "+imagesToGrab); trace(" "); } selectLayoutNum(); stop(); [/code] Corban Baxter | rich media designer | www.funimation.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Corban Baxter Sent: Thursday, February 02, 2006 1:29 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; Sorry that's what I meant to type. It's in the code correct. Any other ideas? Corban Baxter | rich media designer | www.funimation.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adrian Lynch Sent: Thursday, February 02, 2006 11:55 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; Try: this[rfcClip].container.attachMovie(imgID); Ade -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Corban Baxter Sent: 02 February 2006 17:15 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; Hey guys I am working on this project still that is doing a whole lot of random things. Since I have not converted over to AS2 yet I am having some problems with doing this... "this[rfcClip].container.attachMovie[imgID];" the rfcClip and the imgID variables are pulling from arr
RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
Sorry that's what I meant to type. It's in the code correct. Any other ideas? Corban Baxter | rich media designer | www.funimation.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adrian Lynch Sent: Thursday, February 02, 2006 11:55 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; Try: this[rfcClip].container.attachMovie(imgID); Ade -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Corban Baxter Sent: 02 February 2006 17:15 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; Hey guys I am working on this project still that is doing a whole lot of random things. Since I have not converted over to AS2 yet I am having some problems with doing this... "this[rfcClip].container.attachMovie[imgID];" the rfcClip and the imgID variables are pulling from arrays and seem to trace perfect but for some reason the clip's are not showing up nor attaching to my stage. I was hoping someone could take a quick look at the file and tell me what they think might be the problem. I have uploaded a zip with the FLA to my dev server. Any help would be greatly appreciated. Thanks! http://webdev.funimation.com/fun2004/coders/s3.zip - FLA file Problem occurs in the loadImage function on frame 9 line 51. This function is called though an interval at the end of each marker: ie marker: lay_1, lay_2 etc... //cb ___ 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
RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
Try: this[rfcClip].container.attachMovie(imgID); Ade -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Corban Baxter Sent: 02 February 2006 17:15 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] this[rfcClip].container.attachMovie[imgID]; Hey guys I am working on this project still that is doing a whole lot of random things. Since I have not converted over to AS2 yet I am having some problems with doing this... "this[rfcClip].container.attachMovie[imgID];" the rfcClip and the imgID variables are pulling from arrays and seem to trace perfect but for some reason the clip's are not showing up nor attaching to my stage. I was hoping someone could take a quick look at the file and tell me what they think might be the problem. I have uploaded a zip with the FLA to my dev server. Any help would be greatly appreciated. Thanks! http://webdev.funimation.com/fun2004/coders/s3.zip - FLA file Problem occurs in the loadImage function on frame 9 line 51. This function is called though an interval at the end of each marker: ie marker: lay_1, lay_2 etc... //cb ___ 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