Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-02-2002, 03:24 AM   #1
Philip Toews
Registered User
 
Philip Toews's Avatar
 
Join Date: Nov 2002
Posts: 68
Default programmatically inserting a very small button into a scrolling textfield

How would I go about programmatically inserting a very small button into a scrolling textfield? It's for a reading instruction movie I want to create. The students click on a small button or hotspot in a body of text to indicate that they think given "passage" would be most appropriately inserted at that point.

The challenge for me is that I want to load the text in the reading passage dynamically as a variable pulled from an array. How can I get Flash MX to put an interactive element (button, MC, whatever) in-line with the text that is placed in the dynamic text field? I need the "button" (or whatever the "hotspot" element ends up being) to be a small black square (it's what the client has asked for).

Any ideas oh ye Gods and oracles of Flash?

Philip Toews is offline   Reply With Quote
Old 11-02-2002, 08:29 AM   #2
tost
my pleasure
 
tost's Avatar
 
Join Date: Apr 2002
Location: gent.be
Posts: 792
Default

just m2c
set text as html and use a simple <a href...></a> tag? You could use a special character between the tags to serve as the clickable text, and use a dingbat character? and use the textfield object's focus actions together with substring to insert it in your text?
might solve the whole scrolling issue at once, if i understood correctly that the button needs to scroll up and down with the text? (and needs to be hidden when the corresponding textline scrolls out the textfield?)

i think you could use asfunction to let those html-links talk to flash, but someone else will have to correct me if i'm wrong, never used that before.

succes
tost
tost is offline   Reply With Quote
Old 11-02-2002, 09:18 AM   #3
Philip Toews
Registered User
 
Philip Toews's Avatar
 
Join Date: Nov 2002
Posts: 68
Talking that just might be it!

I thought the answer would be along those lines. IT leads to two short questions:
[list=1][*]Does the generic _sans font have a square dingbat? How can I get a look at the available dingbats?[*]Can anyone tell me more about asfunction ?[/list=1]

Quote:
if i understood correctly that the button needs to scroll up and down with the text? (and needs to be hidden when the corresponding textline scrolls out the textfield
Yes, that's right. I think with your proposed solution I can:
[list=1][*]Load up variables from a text file[*]Have actionscript parse the reading text variable for special dingbat chars and format them as hyperlinks that are addressed to the flash movie itself[*]Actionscript then inserts the "question text" after the special dingbat character... actionscript can look for some valuessuch as String.indexOf() that are passed as part of the post/get[/list=1]

Does all that make sense?

And what is is asfunction?

Thanks to all!
Philip Toews is offline   Reply With Quote
Old 11-02-2002, 09:34 AM   #4
tost
my pleasure
 
tost's Avatar
 
Join Date: Apr 2002
Location: gent.be
Posts: 792
Default

makes sense to me

check this
http://www.macromedia.com/support/fl...asfunction.htm
tost is offline   Reply With Quote
Old 11-02-2002, 10:51 AM   #5
tost
my pleasure
 
tost's Avatar
 
Join Date: Apr 2002
Location: gent.be
Posts: 792
Default

i don't think the _sans has a square in it,
but maybe this works:
search the dingbat u want to use, whatever the font is,
place a static textfield with just that dingbat character in it inside a movieclip,
set the linkage for that mc to "export for actionscript",
(embeds the dingbat in your swf)
and the use <font face...><a href...>dingbat</a></font>
this will override the _sans for the dingbat only and use your dingbat

it's a theory, i haven't tested this!
you could disable the dingbat font after you've exported your swf, and then view your page in the browser to see if it works.
let me know!
greetz
tost
tost is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:26 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.