View Full Version : Sample Project
dmj963
07-03-2002, 01:46 PM
I really liked your sample project.
Thank you for including me in your beta test for am4.
Most of the testers probably do much more sophisticated projects than I ever will attempt. Although I was pretty intimidated by the new screen and features, I plowed forward. I soon found the options I needed, and I am growing very fond of this version. This software will do far more that I will ever require. I have been really having fun with this.
Problem: This was with a simple text box. I could not get the project screen to open the .doc or .txt file. And Yes, I had copied the files to the distribution directory.
I ended up doing a copy and paste into a text box. I would also like to be able to edit the text right in the scrolling text box - right on the page. The scroll bars do not work on the page either, which doesn't allow me to check it until I do a "preview". Would it be possible to grant these two wishes?
When I tried to preview the project, I received an error. (Which I didn't write down) I deleted the page and redid the the text box, and it was fine. It seemed as though, If I did a "build" on the project, then decided to change and "preview" the changes - I received the error. I am still trying these out, since I need to use the text options a lot.
Thanks again,
Donna
unknown user
07-03-2002, 02:34 PM
Cool! Thanx Adam.
That helps the people that need a little extra help, now they can study the way it's been put together and take a peek at the commands etc.
Additionally, it gives me something to play my mp3's as I test AMS4 /ubbthreads/images/icons/smile.gif
You guys are the best!!
njlech
07-03-2002, 02:43 PM
Adam,
Very nice job on incorporating several of the cool MP3 features! Even a pretty nice layout...for a programmer /ubbthreads/images/icons/smile.gif
Did anyone check out the scripts on the next and previous buttons? This product even amazes me sometimes
If anyone else wants to make an MP3 player I would be interested in seeing it, or feel free to jazz it up, I would also be interested in seeing it with some more bells and whistles
unknown user
07-03-2002, 02:58 PM
Yeah I took a look at the script. Pretty **** good. It does return an error if there's nothing in the list box! But I figure you knew that and hadn't put it in coz it's a sample. Did think about jazzing it up a bit. Thought about including something to rip mp3 as well ... how easy is that to put in (assuming one has the codec)?
I do have some code in there to check for a single file in the ListBox but I must have overlooked the possibility of there being no items in the box. Just a couple of IF statements would fix that. As for Ripping I have no clue how you would do that, but keep in mind that AMS4 can run any type of file so it may be possible with some fancy work.
I am working on a new project that uses Edit Fields and TextFile actions. It has been postponed due to a bug found while working on this project. I'll post it soon
Are there any other new features that you users would like to see implemented in a sample project?
njlech
07-04-2002, 11:24 AM
Adam,
I would like to know how you got the %MP3time% variable to automatically count when you select an MP3 in the List Box. I saw something in the Page Properties about setting the variable to 00:00:00, but how does that make it count?
unknown user
07-04-2002, 11:51 AM
Adam,
Now that yu ask ... I'm having grief (!) trying to figure out the best way to implement the following:
A listbox is loaded at run-time allowing the user to select each item in the list. On Selection Change, an appropriate description of the item would be displayed in a textbox to the right.
The only way i can see of doing this (for i see no easer built in method), is to have each selection load a desrciption from a txt file and display the contents in the textbox. Can't seem to get it working tho.
Perhaps ... it would work to allow textbox object to be populated from an inside source and giving the option of defining the populated txt.
Is that way too confusing?
Check out the MP3 Player Properties -> On Progress, This will continually update that variable as the song plays. Remember that you need to tell AMS4 to update that text object whenever you need it to.
Derek,
That method should work, are you using the TextBox.SetText() to set the text of that TexBox Object? I will look into it and post what I find.
Hi Derek,
You could store your descriptions in the DATA property of a List Box item. Basically each List Box items has two properties that it stores, the TEXT it displays, and some DATA.
So what you could do is create a List Box item like this:
Product1::This is the best Product since unsliced bread.
"Product1" would be the display text.
"This is the best Product since unsliced bread." - would be the data.
Then you would have the Following Actions on the 'On Selection Change" event:
%Index% = ListBoxObject[ListBox1].GetSelected
%ItemData% = ListBoxObject[ListBox1].GetItemData (%Index%)
TextObject[txtDescription].SetText (%ItemData%)
Here is an example page you can take a look at:
(Copy and then Paste into AutoPlay. To paste, go to the Page Tab on the Project Bar, right click on a Page and select your paste)
<IR_PAGES_LIST>
<Page>
<Name>Page 1</Name>
<WindowTitle>AutoPlay Application</WindowTitle>
<Background>
<Type>0</Type>
<TopColor format="decimal">16711680</TopColor>
<BottomColor format="decimal">16777215</BottomColor>
<ParentPage/>
<ShowParentDT>1</ShowParentDT>
<NormalImage>
<Filename/>
</NormalImage>
<MouseOverImage>
<Filename/>
</MouseOverImage>
<MouseDownImage>
<Filename/>
</MouseDownImage>
</Background>
<Object>
<Type>9</Type>
<Name>ListBox1</Name>
<VisibleAtDesignTime>1</VisibleAtDesignTime>
<VisibleAtRunTime>1</VisibleAtRunTime>
<Locked>0</Locked>
<LockSize>0</LockSize>
<ToolTip/>
<Cursor>0</Cursor>
<Coordinates>
<Top>84</Top>
<Bottom>144</Bottom>
<Left>45</Left>
<Right>189</Right>
</Coordinates>
<Hotkey>
<VirtualKey>0</VirtualKey>
<Modifiers>0</Modifiers>
</Hotkey>
<Event>
<Name>On Selection Changed</Name>
<Action name="Get Selected">
<Type>126</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<TargetListBox>ListBox1</TargetListBox>
<Variable>%Index%</Variable>
<VariableDelimiter>;;</VariableDelimiter>
</Action>
<Action name="Get Item Data">
<Type>121</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<TargetListBox>ListBox1</TargetListBox>
<Index>%Index%</Index>
<Variable>%ItemData%</Variable>
</Action>
<Action name="Set Text">
<Type>75</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<ObjectName>txtDescription</ObjectName>
<Text>%ItemData%</Text>
</Action>
</Event>
<Event>
<Name>On Double-click</Name>
</Event>
<Text>
<ListData>Kafka::Productivity is being able to do things that you were never able to do before. ;;Hemingway::I'm not going to get into the ring with Tolstoy.;;Thoreau::I should not talk so much about myself if there were anybody else whom I knew as well.</ListData>
<TextColor>0</TextColor>
<BackgroundColor>16777215</BackgroundColor>
<UseCustomFont>0</UseCustomFont>
<FontName>Arial</FontName>
<StyleName>Regular</StyleName>
<CharacterSet>0</CharacterSet>
<Height>14</Height>
<Weight>400</Weight>
<Italic>0</Italic>
<Underline>0</Underline>
<StrikeOut>0</StrikeOut>
<Antialias>1</Antialias>
</Text>
<Window>
<HasBorder>1</HasBorder>
<SunkenBorder>1</SunkenBorder>
<VerticalScrollbar>1</VerticalScrollbar>
<HorizontalScrollbar>0</HorizontalScrollbar>
<Sort>1</Sort>
<MultipleSelect>0</MultipleSelect>
</Window>
</Object>
<Object>
<Type>1</Type>
<Name>txtDescription</Name>
<VisibleAtDesignTime>1</VisibleAtDesignTime>
<VisibleAtRunTime>1</VisibleAtRunTime>
<Locked>0</Locked>
<LockSize>0</LockSize>
<ToolTip/>
<Cursor>1</Cursor>
<Coordinates>
<Top>88</Top>
<Bottom>308</Bottom>
<Left>227</Left>
<Right>506</Right>
</Coordinates>
<Hotkey>
<VirtualKey>0</VirtualKey>
<Modifiers>0</Modifiers>
</Hotkey>
<Event>
<Name>On Mouse Over</Name>
</Event>
<Event>
<Name>On Mouse Leave</Name>
</Event>
<Event>
<Name>On Mouse Click</Name>
</Event>
<Text>
<Body>Description Text</Body>
<NormalColor format="decimal">16711680</NormalColor>
<HighlightColor format="decimal">65535</HighlightColor>
<MouseDownColor format="decimal">65535</MouseDownColor>
<FontName>Arial</FontName>
<StyleName>Regular</StyleName>
<CharacterSet>0</CharacterSet>
<Height>24</Height>
<Weight>400</Weight>
<Italic>0</Italic>
<Underline>0</Underline>
<StrikeOut>0</StrikeOut>
<Alignment>0</Alignment>
<AntiAlias>1</AntiAlias>
<VerticalCenter>0</VerticalCenter>
<MouseOverSound/>
<MouseOverIsExternal>0</MouseOverIsExternal>
<MouseClickSound/>
<MouseClickIsExternal>0</MouseClickIsExternal>
</Text>
</Object>
<Event>
<Name>On Initialize</Name>
</Event>
<Event>
<Name>On Show</Name>
</Event>
<Event>
<Name>On Close</Name>
</Event>
<Event>
<Name>On Destroy</Name>
</Event>
</Page>
</IR_PAGES_LIST>
mark.
Hello everybody,
Here is a sample project I have created that uses lots of MP3 and ListBoxObject actions. I have created a little stand-alone MP3 player that mimics much of the functionality of Winamp. I have zipped the project file along with the resources directory. To check out the project simply unzip this file to the My Documents/AutoPlay Media Studio Projects directory. Then you can simply open the project and play around with it.
Let me know what you guys/girls think.
http://www.icynorth.com/~adam/MP3PlayerV1.0.zip
unknown user
07-04-2002, 01:33 PM
Mark,
You just made it to the top of my Christmas card list!
Thank you
unknown user
08-25-2002, 06:34 PM
Great project, learned lots from it...
alibaba
08-26-2002, 05:51 AM
Is there any way to put Volume control on it?
Derek
08-26-2002, 08:23 AM
Sure - read this (http://www.indigorose.com/ubbthreads/showthreaded.php?Cat=&Board=UBB2&Number=1136&page= 0&view=collapsed&sb=5&o=0&fpart=)
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.