Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Index Xtra
Emulator
Text Member Menu System
myFile
MMX
Acrobat Reader
Drag Install
WinShaper
Simple Paint application
Delet an Existing File
MediaMacros Xtras Mall
 

 

 

Behavior Stock quote

Added on 5/26/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: bugmeister

Attached to a field, this behavior retrieves data from Yahoo"s finacial site to show you the current quote.

--#####################################
--##        Stock Quote behavior     ##
--##      Written by Aviyam Fischer  ##
--##         aviyam@bigfoot.com      ##
--#####################################
--
-- Usage: Create a text field and attach
--        this behavior to it.
--
property spriteNum
property theNetID
property theStock
property refreshTime


on beginSprite me
  theURL="http://finance.yahoo.com/d/quotes.csv?s="&theStock&"&f=sl1d1t1c1ohgv&e=.csv"
  set theNetID = getNetText(theURL)
  startTimer
end

on exitFrame me
  if netDone(theNetID) then
    theQuote =  netTextResult(theNetID)
    member(sprite(me.spriteNum).member).text = theQuote.item[2]
  else
    doConnectionAnimation(me)
  end if
  if the timer>= refreshTime *60 then beginSprite(me)
end

on doConnectionAnimation me
  if member(sprite(me.spriteNum).member).text = " * * " then
    member(sprite(me.spriteNum).member).text = "* * *"
  else
    member(sprite(me.spriteNum).member).text = " * * "
  end if
end

on getPropertyDescriptionList
  vPDlist = [:]
  setaProp vPDList, #theStock, [#comment: "The stock to quote:", #format: #string, ¬
    #default: "AAPL"]
  setaProp vPDList, #refreshTime, [#comment: "refresh time (ticks)", #format: #integer,¬
  #range: [#min: 100, #max: 1000],#default: 600]
  return vPDList
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail