This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-07-24 19:37:12

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Please Help!!!!!!!!!!!!!!

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

 

#2 2011-07-24 19:39:55

Baderous
New Scratcher
Registered: 2011-04-14
Posts: 100+

Re: Please Help!!!!!!!!!!!!!!

What happened to the other topic? Did you delete it?

Offline

 

#3 2011-07-24 19:48:31

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: Please Help!!!!!!!!!!!!!!

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  smile


◕‿◕

Offline

 

#4 2011-07-24 20:02:27

Baderous
New Scratcher
Registered: 2011-04-14
Posts: 100+

Re: Please Help!!!!!!!!!!!!!!

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

 

#5 2011-07-24 20:03:56

gbear605
Scratcher
Registered: 2008-03-06
Posts: 1000+

Re: Please Help!!!!!!!!!!!!!!

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.


Yeah, I'm mostly inactive.  I check in once in a while though.  If you want to contact me, I have a contact form at my website, http://escratch.org

Offline

 

#6 2011-07-24 20:09:45

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: Please Help!!!!!!!!!!!!!!

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

 

#7 2011-07-24 20:31:45

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: Please Help!!!!!!!!!!!!!!

bump


◕‿◕

Offline

 

#8 2011-07-24 20:55:27

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: Please Help!!!!!!!!!!!!!!

bump


◕‿◕

Offline

 

#9 2011-07-24 21:33:24

hello12345678910
Scratcher
Registered: 2009-07-11
Posts: 100+

Re: Please Help!!!!!!!!!!!!!!

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)


http://tinyurl.com/8yt32o9 http://tinyurl.com/6tgwp5r || Fish = F+I+S+H = 6+9+19+8 = 42<<The answer to Life, the Universe and Everything

Offline

 

#10 2011-07-25 08:10:52

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: Please Help!!!!!!!!!!!!!!

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

 

#11 2011-07-25 08:16:00

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Please Help!!!!!!!!!!!!!!

Check the Panther code.  wink

Offline

 

#12 2011-07-25 08:20:21

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: Please Help!!!!!!!!!!!!!!

scimonster wrote:

Check the Panther code.  wink

what part of it? Also, do you know a .txt file uploader and editor online? I dont have my website


◕‿◕

Offline

 

#13 2011-07-25 08:50:26

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: Please Help!!!!!!!!!!!!!!

bumps


◕‿◕

Offline

 

#14 2011-07-25 08:53:59

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Please Help!!!!!!!!!!!!!!

You don't have to bump every half hour.
In Panther, it's at Scratch-UI-Dialogs -> NewsDialog.

Offline

 

#15 2011-07-25 09:01:18

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: Please Help!!!!!!!!!!!!!!

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

 

#16 2011-07-25 09:19:00

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Please Help!!!!!!!!!!!!!!

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:

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!

Last edited by WindowsExplorer (2011-07-25 09:39:47)


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#17 2011-07-25 09:36:02

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: Please Help!!!!!!!!!!!!!!

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

 

#18 2011-07-25 09:38:12

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Please Help!!!!!!!!!!!!!!

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)


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#19 2011-07-25 09:46:58

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: Please Help!!!!!!!!!!!!!!

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

 

#20 2011-07-25 09:49:13

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Please Help!!!!!!!!!!!!!!

You don't need a new url when updated, and I don't have the code to ask for a url.


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#21 2011-07-25 09:49:44

hello12345678910
Scratcher
Registered: 2009-07-11
Posts: 100+

Re: Please Help!!!!!!!!!!!!!!

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?


http://tinyurl.com/8yt32o9 http://tinyurl.com/6tgwp5r || Fish = F+I+S+H = 6+9+19+8 = 42<<The answer to Life, the Universe and Everything

Offline

 

#22 2011-07-25 09:51:38

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Please Help!!!!!!!!!!!!!!

I could create that if I new how to get variables from other scripts!


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#23 2011-07-25 09:55:36

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: Please Help!!!!!!!!!!!!!!

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:

http://i.imgur.com/1zXU5.png
NOTE: GRAPHIC GENERATED IN PANTHER


◕‿◕

Offline

 

#24 2011-07-25 10:27:09

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Please Help!!!!!!!!!!!!!!

I can do that if you tell me how to insert the value of a variable into that method from anotehr method.


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#25 2011-07-25 11:00:15

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: Please Help!!!!!!!!!!!!!!

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:

Code:

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:

Code:

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:

Code:

newsDialog
    | t1 t2 |
    t1 _ (HTTPSocket httpGet: url) contents.
    t2 _ DialogBoxMorph inform: t1 title: 'News'

and to set it:

Code:

method: t1
ask dialog code here
url _ t1
code not tested yet.

◕‿◕

Offline

 

Board footer