hi, folks
i thought i have solved how to set the filename of an external html member 
in a projector to a new downloaded html file (and to make its hyperlink 
actives, thanks to mark), and, beside that, make the text and the hyperlink 
styles customizable. it works, but the only problem is that the sprite 
dimensions are altered also. the workaround was to, instead of setting the 
filename, set the html property of the old html sprite member to the html 
property of the new one, and then proceed to the formatting hyperlink 
routine. but this time the problem is that i cannot set the 
usehypertextstyle to false, which is weird, considering that all the others 
formatting commands work. any idea? down bellow is the script. if someone 
could take a look, it would be nice. :^)
thanks


on getBehaviorDescription
   return "This behavior should be assigned to html text sprites only"
end getBehaviorDescription

--***************** sets the initial properties for the html sprite, 
turning it into a customizable hyperlink scheme. it will use parameters later.
on beginSprite me
   set the useHypertextStyles of member the member of sprite the 
currentSpriteNum = FALSE
   sprite(the currentSpriteNum).ink = 36
   sprite(the currentSpriteNum).member.font = "arial"
   sprite(the currentSpriteNum).member.fontSize = 12
   sprite(the currentSpriteNum).member.color = rgb(255,255,255)

   list = []
   list = sprite(the currentSpriteNum).member.hyperlinks

   repeat with i = 1 to count(list)
     repeat with a = list[i][1] to list[i][2]
       sprite(the currentSpriteNum).member.char[a].color = rgb(255,100,0)
     end repeat
   end repeat
end

--***************** changes the mouse when it is over a hyperlink
on mouseWithin me
   if sprite(the currentSpriteNum).pointInHyperlink(the mouseLoc) then
     cursor 280
   else
     cursor -1
   end if
end

on mouseLeave me
   cursor -1
end

--***************** for testing purposes, just checks the data embedded in 
a html sprite
on hyperlinkClicked me,data, range
   put data
   put sprite(the currentSpriteNum).member.char[range[1]..range[2]]
   sprite(the currentSpriteNum).member.char[range[1]..range[2]].color = 
rgb(255,0,0)
   put range
   put sprite(the currentSpriteNum).member.hyperlinks
end

--***************** to be called from outside and to supposedly alter the 
html hyperlink scheme, the same way the beginSprite handler does, for the 
'new' html sprite. it is called when the "sendAllSprites(#updateHTML,new 
html member number or name or filename)" command is issued from somewhere 
else (message window).

on updateHTML me, whichHTML
   sprite(the currentSpriteNum).member.html = member(whichHTML).html --to 
be used for changing the html property; use this line or the the line 
bellow. of course you must have another html member than the one used at 
the stage.

   --  sprite(the currentSpriteNum).member.fileName = the 
moviePath&whichHTML --to be used for changing the filename of the html 
member; use this line or the line above.

   sprite(the currentSpriteNum).member.media = sprite(the 
currentSpriteNum).member.media

   set the useHypertextStyles of member the member of sprite the 
currentSpriteNum = FALSE -- for some reason, it doesn't work at this moment
   sprite(the currentSpriteNum).ink = 36
   sprite(the currentSpriteNum).member.font = "arial"
   sprite(the currentSpriteNum).member.fontSize = 8
   sprite(the currentSpriteNum).member.color = rgb(255,255,255)

   list = []
   list = sprite(the currentSpriteNum).member.hyperlinks

   repeat with i = 1 to count(list)
     repeat with a = list[i][1] to list[i][2]
       sprite(the currentSpriteNum).member.char[a].color = rgb(255,100,0)
     end repeat
   end repeat
end
[]'s
Quixad�

web site - http://www.alternex.com.br/~quixada


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to