;

PDA

Click to See Complete Forum and Search --> : How to set a contentpanel to a different file (Actionscriopt)


maed
08-26-2006, 09:54 AM
Good morning ...

I was wondering if anyone could give me an idea how to address the contentpane's File (property?).

ie: I have a series of links ... click on each link and load the contentpane with a different text file (according to which link you pressed)

I'm just a beginner but (in learning this arduous actionscript language) I can't figure out how to load a different file (every link would have it's own actionscpript to load it's own file into the content pane)
like...

on(press)
{
contentpane1.File = 'Song1Lyrics.txt';
}

Since it's not working I assume I'm not addressing it correctly... "File"

I managed to load text into the contentpane by using the ".text" parameter. But, can't seem to load a file.

Any help in how to load a text file (Via actionscript) would be appreciated.

And any other obscure tip I may need to know ("oh you actually have to sync up this with this, and create a server before attempting to dynamically load files at runtime...") or whatever... :)

amazing product by the way!!! (KoolMoves)

w.brants
08-26-2006, 10:42 AM
Try

contentpane1.setContent(2,'Song1Lyrics.txt');

For more information, check the file contentPane API.txt in directory
C:\Program Files\KoolMoves\Examples\Components\Flash 8\API\

maed
08-26-2006, 05:55 PM
BOOM! That worked perfectly. Thanks!

I appreciate the link as well.

I just bought the software about 5 days ago and am pouring over documentation just to ATTEMPT to try to code something.

Most of the documentation has been helpful, but it was high level.

If anyone has any recommendations for more low-level documentation, please let me know.

SPECIFICALLY syntax for actionscript.

Something that says...

here are the objects, components that Koolmoves has (contentpane, listbox, drop-down box, radio buttons)... and HERE is the list of each field (of each component) ... and this is how you address each field when trying to code actionscript.

As in the example above...

contentpane1.setContent(2,'Song1Lyrics.txt');

Never would have occurred to me to use that syntax "setcontent".

By the way... can you tell me what that parameter is ... the "2"

I know in visual basic when working with files, you have to assign a number to each file...

open "song.txt" as input #1

or whatever...

Is that what's it's doing?

Thanks again.

God, I love this software, and for only 50 bucks. Where have you been all my life. :)

blanius
08-26-2006, 06:08 PM
good flash Actionscript docs are online
http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/js/html/wwhelp.htm

The components are Koolmoves specific and for the syntax look in the exampe/components/flash8/ directory for the docs.

And when all else fails Hollar here! :)

w.brants
08-27-2006, 01:14 AM
By the way... can you tell me what that parameter is ... the "2"
It's explained in the file I mentioned.
The first parameter states the content type. 2 stands for an external plain text file. Other values are for example for loading graphic content or assigning text directly. There's two additional parameters that are optional that let you specify a transition when you change the content of the contentpane.

Wilbert

maed
08-27-2006, 07:18 AM
Yes, thanks I am checking out that file.