Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > actionscript code help needed

actionscript code help needed
Thread Tools
Dedicated MacNNer
Join Date: Nov 2002
Status: Offline
Reply With Quote
Sep 17, 2003, 09:59 AM
 
im workin with a template of joshua davis's

http://flashtothecore.praystation.com/21.html


ive been going thru his book flash to the core. with this particular movie ive been trying to figure out how to get different content into the arrays. i see the array is based on a mc (section) that we have linked to the content mc thats on the stage. what im a bit confused about is how to add content to the different sections... do i make new movie clips with the array instance names? ex a mc named "section_01" etc...

id appreciate any feedback, thanks alot.

heres the code for attatching the sections. I changed the array as i have more sections.

løk


// create an array for attaching new sections on our timeline
section = new Array(7);
max = _root.section.length;
itemDepth = 1;


for (i=0; i<max; i++) {
// attach new item
_root.content_mc.attachMovie("section", "section_"+i, itemDepth);
curItem = content_mc["section_"+i];
// put the MC in an array
_root.section[i] = curItem;
if (i == 0) {
curItem._x = 0;
} else {
curItem._x = content_mc._width+1;
}
itemDepth++;
}


*edit for some reason a piece of the for loop wont display in this message...
(Last edited by lokjah; Sep 17, 2003 at 10:08 AM. )
iron sharpens iron
     
Dedicated MacNNer
Join Date: Nov 2001
Location: england
Status: Offline
Reply With Quote
Sep 17, 2003, 04:35 PM
 
your for loop is missing a bit- the less than symbol, and a i++

I guess this is the bit in the edit.

what sort of content are you trying to pull in? text, images, attached movies? or are you just adding mre section? post what you are pulling in/doing, and I'll help you fix it. or better yet, post your fla
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:10 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2