|
-
Read variable from mc?
I know that variables in moviclips are local. I am using a multipage contentpane to show some texts. I think that when the user clicks on the arrow to advance to the next page a variable called "pagenumber" is incremented. I want to use this information to link to a given audio file. That is, when the user chooses a page, I will use the value in "pagenumber" to determine which audio file is played when he hits the play audio button.
To test this, I created a dynamic textbox and added the AS "txt1var = pagenumber" but when I run it, the display is "Undefined." Makes sense, since "pagenumber" is in MC1 and so is local. Following info on a thread here, I tried adding "_global." on both sides of the assignment with no luck. Naturally, "mc1.pagenumber" is also an absurdity to KM. So how can I read the value in a variable within a movieclip?
BTW, entering all the pages by hand is tedious, especially since the interface does not remember that I am adding files and not using transitions and you can't select multiple files in the file selector. You have to do a lot of clicking. It would be nice if the interface remembered your last choices.
I know I could do this with actionscript as in the KC8Demo. I tried to follow that and the API in the Flash 8 Examples folder and the Users Guide, but the code eludes me. Is there more newbie-oriented information somewhere about using the components with AS? These components are terrific, so I want to learn how to get the most from them.
Last edited by jimventola; 08-08-2006 at 01:57 PM.
Reason: add info
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|