Im wondering how to take specific words in a dynamic text box and use them to trigger a movie inside of flash. It seems like it would be simple but i cant figure out how to turn just a few words inside of one bigger text box into … well… almost buttons…
What i would like to happen is… one box has a list of dates or words… these are almost like hyperlinks i guess… when they are clicked… it triggers a movie though, instead of a URL.
does anybody understand what im trying to do? and if so… can somebody explain how to do it?
ok… in my flash movie there are TWO boxes that are used to contain data. One is used to list archived sections, dates, events, ect. BAsicly just a list of whatever. Being that the list can be somewhat long depending on the section, ive use dynamic text box for this that way i could add a scroller. … Now… the situation at hand… is that i would like ONE specific date/title within that box to trigger the data in the other box to load on release.
Basicly you have a box full of hyperlink on one side of the site… that triggers data to load on the other side of site… …
ITs for a band… so the best example i can give is this:
BOX ONE (LEFT) contains song names.
BOX TWO (RIGHT) will contain LYRICS to each one of those songs.
By clicking each song name, i would like it to trigger a different movie instance or graphic instance of the lyrics, that pertains to that song name.
The code in the tut up above, changes the entire dynamic box into a link… where as i need each individial line in the box to be a link.
That’s not true, you could have as many links as you wish.
[AS]myTextField.htmlText = “<a href=‘asfunction:function,arguments’>one link here</a> some text here <a href='asfunction:function,arguments’>another link here</a>”;[/AS]
Get the point?
You could set up a function to do all those things you want.
[AS]myFunction = function() {
myClip.loadMovie(“someMovie.swf”);
myOtherClip.gotoAndStop(“Xframe”);
myClip.myChildClip.removeMovieClip();
// etc, etc, etc.
};
myTextField.htmlText = “<a href=‘asfunction:myFunction’>do your stuff</a>”;[/AS]
[EDIT]http://www.macromedia.com/support/flash/ts/documents/asfunction.htm[/EDIT]
Although there’s a workaround to pass multiple parameters to the function in the TechNote (see link in the post above), this is what I usually use:
[AS]// define function myFunction
myFunction = function (arg1, arg2, arg3) {
// if there’s only one argument
if (arguments.length == 1) {
// create arguments array
var args = arg1.split(",");
// execute the function
arguments.callee.apply(this, args);
// stop the function
return;
}
trace("The first parameter is: "+arg1);
trace("The second parameter is: "+arg2);
trace("The third parameter is: "+arg3);
};[/AS]
either way… its over my head… so im going to have to take some time and trial and error runs to figure it out anyway… i should be able to figure it out eventually though… thank you