Does anybody know how to make a News dialog in the beginning when scratch loads up? Also, does anybody know the location of #openScratchFrame? Thanks
Offline
Baderous wrote:
What happened to the other topic? Did you delete it?
Yes, I did I finished working on the delete movie player part, after this part my mod should be complete, and yes, I will give credit
Offline
You shouldn't delete it, you're subverting the knowledge sharing concept of an online community like this. Plus, Scratch source code license forces you to openly share the source code, so there was no reason to delete the topic.
Offline
Baderous wrote:
You shouldn't delete it, you're subverting the knowledge sharing concept of an online community like this. Plus, Scratch source code license forces you to openly share the source code, so there was no reason to delete the topic.
He probably didn't want it cluttering up the forums, and it looked kinda like he was a newb because of that.
Offline
gbear605 wrote:
Baderous wrote:
You shouldn't delete it, you're subverting the knowledge sharing concept of an online community like this. Plus, Scratch source code license forces you to openly share the source code, so there was no reason to delete the topic.
He probably didn't want it cluttering up the forums, and it looked kinda like he was a newb because of that.
you haven't answere my question yet
Offline
bump
Offline
bump
Offline
You have to have your own website with a file called news.txt on it. When the application starts, you should display a dialog that reads text from yoursite.com/news.txt and displays it. If you need anything in more detail ask sparks or NxIII
As for the location of #openScratchFrame, probaly in scratchUI-panes > scratchframe. Search around there. I'm updating my Mac to OSX Lion right now, so I'll check when I'm done.
Glad to be of help!!!
Last edited by hello12345678910 (2011-07-24 21:41:17)
Offline
hello12345678910 wrote:
You have to have your own website with a file called news.txt on it. When the application starts, you should display a dialog that reads text from yoursite.com/news.txt and displays it. If you need anything in more detail ask sparks or NxIII
As for the location of #openScratchFrame, probaly in scratchUI-panes > scratchframe. Search around there. I'm updating my Mac to OSX Lion right now, so I'll check when I'm done.
Glad to be of help!!!
Ahem, the coding of the dialog box
Offline
Check the Panther code.
Offline
scimonster wrote:
Check the Panther code.
![]()
what part of it? Also, do you know a .txt file uploader and editor online? I dont have my website
Offline
bumps
Offline
You don't have to bump every half hour.
In Panther, it's at Scratch-UI-Dialogs -> NewsDialog.
Offline
scimonster wrote:
You don't have to bump every half hour.
In Panther, it's at Scratch-UI-Dialogs -> NewsDialog.
How do I make it run at startup?
And how to I change the url for the news dialog?
Last edited by flashgocrazy (2011-07-25 09:02:00)
Offline
1. Upload a text file here and copy the link.
2. Open scratch, hack it, and open broswer.
3. Go to IU Panes > ScratchFrameMorph > startup > startup.
4. Under the line self newScratchProject, insert the following code:
self newsDialog.
5. Right click > accept.
6. Now go back to ScratchFrameMorph > menus/buttons actions.
7. Replace the text shown on screen with the following code:
newsDialog
| t1 t2 |
t1 _ (HTTPSocket httpGet: 'TXT') contents.
t2 _ DialogBoxMorph inform: t1 title: 'News'(Replace TXT with the text file url)
8. Right click > accept.
9. Close broswer and save image for end user.
10. Open scratch and it should be working!
Last edited by WindowsExplorer (2011-07-25 09:39:47)
Offline
WindowsExplorer wrote:
1. Upload a text file here and copy the link.
2. Open scratch, hack it, and open broswer.
3. Go to IU Panes > ScratchFrameMorph > startup > startup.
4. Under the text self newScratchProject, insert the following code:Code:
self newsDialog.5. Right click > accept.
6. Now go back to ScratchFrameMorph > menus/buttons actions.
7. Replace the text shown on screen with the following code:Code:
newsDialog | t1 t2 | t1 _ (HTTPSocket httpGet: 'TXT') contents. t2 _ DialogBoxMorph inform: t1 title: 'News'(Replace TXT with the text file url)
8. Right click > accept.
9. Close broswer and save image for end user.
10. Open scratch and it should be working!
what part of the code should I put
self newsDialog.?
Offline
Put it in IU Panes > ScratchFrameMorph > startup > startup and put the code under the line self newScratchProject.
Last edited by WindowsExplorer (2011-07-25 09:38:22)
Offline
WindowsExplorer wrote:
Put it in IU Panes > ScratchFrameMorph > startup > startup and put the code under the line self newScratchProject.
do you have the code so it changes the url when updated?
And the code that asks for the new url (In dialog) then sets it to that?
Last edited by flashgocrazy (2011-07-25 09:48:34)
Offline
You don't need a new url when updated, and I don't have the code to ask for a url.
Offline
flashgocrazy wrote:
WindowsExplorer wrote:
Put it in IU Panes > ScratchFrameMorph > startup > startup and put the code under the line self newScratchProject.
do you have the code so it changes the url when updated?
And the code that asks for the new url (In dialog) then sets it to that?
That is the code, isn't it?
Offline
hello12345678910 wrote:
flashgocrazy wrote:
WindowsExplorer wrote:
Put it in IU Panes > ScratchFrameMorph > startup > startup and put the code under the line self newScratchProject.
do you have the code so it changes the url when updated?
And the code that asks for the new url (In dialog) then sets it to that?That is the code, isn't it?
No, that code juts has a url that cannot be changed, I need the code that's like this:
NOTE: GRAPHIC GENERATED IN PANTHER
Offline
I can do that if you tell me how to insert the value of a variable into that method from anotehr method.
Offline
WindowsExplorer wrote:
I can do that if you tell me how to insert the value of a variable into that method from another method.
OK, I got the code for that, here it is
first add this to scratch UI panes>ScratchFrameMorph
change this:
Morph subclass: #ScratchFrameMorph
instanceVariableNames: 'topPane viewerPane scriptsPane stageFrame workPane titlePane libraryPane menuPanel stageButtonsPanel readoutPane logoMorph projectTitleMorph flagButton fillScreenFlag paintingInProgress projectDirectory projectName projectInfo author loginName loginPassword watcherPositions shuffledCostumeNames justSaved viewModeButtons viewMode lastViewMode viewModeButtonsPanel toolbarPanel lastWeDoPoll '
classVariableNames: 'AllowSharing Clipboard DefaultNotes DefaultSprite Fonts FontsXO IsXO ScratchServers ScratchSkin ScratchSkinXO ShareServer ShareServerPath SupportServer SupportServerPath TakeOverScreen UseErrorCatcher Version VersionDate VisibleDrives WorkpaneExtent '
poolDictionaries: ''
category: 'Scratch-UI-Panes'to this:
Morph subclass: #ScratchFrameMorph
instanceVariableNames: 'topPane url viewerPane scriptsPane stageFrame workPane titlePane libraryPane menuPanel stageButtonsPanel readoutPane logoMorph projectTitleMorph flagButton fillScreenFlag paintingInProgress projectDirectory projectName projectInfo author loginName loginPassword watcherPositions shuffledCostumeNames justSaved viewModeButtons viewMode lastViewMode viewModeButtonsPanel toolbarPanel lastWeDoPoll '
classVariableNames: 'AllowSharing Clipboard DefaultNotes DefaultSprite Fonts FontsXO IsXO ScratchServers ScratchSkin ScratchSkinXO ShareServer ShareServerPath SupportServer SupportServerPath TakeOverScreen UseErrorCatcher Version VersionDate VisibleDrives WorkpaneExtent '
poolDictionaries: ''
category: 'Scratch-UI-Panes'then hit accept.
After that for the news dialog:
newsDialog
| t1 t2 |
t1 _ (HTTPSocket httpGet: url) contents.
t2 _ DialogBoxMorph inform: t1 title: 'News'and to set it:
method: t1 ask dialog code here url _ t1 code not tested yet.
Offline