# Dynamic text used to trigger a movie?!?

**URL:** <https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654>\
**Category:** Uncategorized\
**Created:** [August 29, 2003, 1:28am UTC](https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654 "2003-08-29T01:28:24Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![asignofcollapse](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@asignofcollapse](https://forum.kirupa.com/u/asignofcollapse)\
**Post date:** [August 29, 2003, 1:28am UTC](https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654/1 "2003-08-29T01:28:24Z")

</div>

Hello…

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?

thanx

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 2:59am UTC](https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654/2 "2003-08-29T02:59:34Z")

</div>

Nope. You can just add in hyperlinks for URL’s in loaded text.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 3:28am UTC](https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654/3 "2003-08-29T03:28:24Z")

</div>

It’s basically the same thing… 😛

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=32542](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=32542)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 3:48am UTC](https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654/4 "2003-08-29T03:48:39Z")

</div>

Holy buckets - I’m sorry, I retract my ‘nope’, you can. Wow. Sorry!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 6:33am UTC](https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654/5 "2003-08-29T06:33:42Z")

</div>

thats a step closer in the right direction i guess… but not really what i was looking to accomplish… thank you though…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 3:18pm UTC](https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654/6 "2003-08-29T15:18:58Z")

</div>

Close? What are you trying to do exactly?

…The asfunction protocol is pretty much the only way, I think. :-\

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 5:24pm UTC](https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654/7 "2003-08-29T17:24:40Z")

</div>

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.

thanx

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 6:16pm UTC](https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654/8 "2003-08-29T18:16:44Z")

</div>

That’s not true, you could have as many links as you wish.  
[AS]myTextField.htmlText = “\<a href=‘as **function:function,arguments’\>one link here\</a\> some text here \<a href='as** function:function,arguments’\>another link here\</a\>”;[/AS]  
Get the point? 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 6:23pm UTC](https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654/9 "2003-08-29T18:23:19Z")

</div>

ahhh… gotcha… didnt even think of that… good call…

now… instead of triggering frames… is there a way to trigger movie instances or graphic instances…

and if i use a bunch … will it still scroll up and down with the scroller?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 6:38pm UTC](https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654/10 "2003-08-29T18:38:53Z")

</div>

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]](http://www.macromedia.com/support/flash/ts/documents/asfunction.htm%5B/EDIT%5D)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 6:50pm UTC](https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654/11 "2003-08-29T18:50:31Z")

</div>

that should work… thank you very much…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 7:09pm UTC](https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654/12 "2003-08-29T19:09:09Z")

</div>

You’re welcome. :beam:

And I forgot to add something…

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]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 7:16pm UTC](https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654/13 "2003-08-29T19:16:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 7:21pm UTC](https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654/14 "2003-08-29T19:21:02Z")

</div>

Ok… good luck! And let me know if you have any question. 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 2, 2003, 8:42am UTC](https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654/15 "2003-09-02T08:42:53Z")

</div>

If you wanted to use asFunction() with xml would you be allowed to? or would flash want to parse the \<a\>\</a\> as a childNode?

Anyone know about this? Or a work around for it?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 2, 2003, 6:13pm UTC](https://forum.kirupa.com/t/dynamic-text-used-to-trigger-a-movie/29654/16 "2003-09-02T18:13:48Z")

</div>

Yes, can use it. You shouldn’t have any problems. 🙂
