A Flash Developer Resource Site

Results 1 to 17 of 17

Thread: Tweening external dynamic text inside a MC inside main timeline

  1. #1
    Junior Member
    Join Date
    Mar 2003
    Posts
    15

    Tweening external dynamic text inside a MC inside main timeline

    I've seen a hundred and a half posts on similar subjects, but goshdarnit, I just can't make this work. Let me explain the problem, and I've included a link to a Zip file with my .fla file and the away.txt file I'm calling the variables from.

    Basically, I want to create an interactive menu thing, that starts with a row of each of the 26 letters of the alphabet. When one clicks on a letter, the letter is tweened to a larger faded state, and so is the rest of the alphabet, and I want the names of the schools starting with that letter to then fade in. I have a movie clip inside the last frame of the main tween, which should then tween (fade in over 12 frames) the graphic symbol containing my dynamic text box, which is supposed to be linked to the text variables in the external file. The text variable is created on the first frame of the main timeline using Actionscript on the static header layer, and so I should be able to load it inside my movie clip (I think). Everything looks fine to me, but then I've only been using Flash for 2 weeks.

    To sum up, I need to tween the graphic symbol. The graphic symbol contains the dynamic text which references the external text file. The graphic symbol is inside a movie clip, inside one frame of my main timeline. The text isn't showing up, only the empty text box is.

    My Zipped source files can be found at: http://www.tolcs.org/athletics/away.zip

    If anyone would be willing to download my source files and give some wonderful advice, I'd revere and adore them forever.

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Have you embedded the font(s) used?

  3. #3
    Junior Member
    Join Date
    Mar 2003
    Posts
    15
    I thought I had... that's in the properties of the dynamic text box correct? Click on Characters and mark the box for all characters?

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Yep! Did you?

  5. #5
    Junior Member
    Join Date
    Mar 2003
    Posts
    15
    It's set to load all characters, I've added the Arial font as a font in the library, I've checked and rechecked my code, I've looked around the Debug output when testing the movie, I'm totally stumped.

  6. #6
    Junior Member
    Join Date
    Mar 2003
    Posts
    15
    Perhaps I'm not totally grasping the concept of embedding the font. Could someone run me step by step how embed a font into my movie, say the Arial font?

  7. #7
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Well, didn't have time to check your files yet...
    But usually you select EACH textfield and in it's properties, hit the Character tab, and select Embed All...

  8. #8
    Junior Member
    Join Date
    Mar 2003
    Posts
    15
    Okay, I have Embed All checked for the properties of the SchoolA dynamic text field, and on the Actions layer of frame 1 of my main timeline I have the following:

    Code:
    loadVarsText = new loadVars();
    loadVarsText.load("away.txt");
    loadVarsText.onLoad = function(success) {
    	if (success) {
    		schoolA.text = this.school1;
    	}
    };
    stop();
    The dynamic text is in the AC1 graphic symbol inside the ListA movie clip on the main timeline, frame 13, on the Lists layer.

    oldnewbie, if you'd kindly look through my files and see if you see anything odd, please let me know. This is my first project with Flash for work and I'd like to not get stuck on it forever.

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Ok! A couple of problems.

    First the textfield must be present on the frame you're using LoadVars(), so you either move your LoadVars to frame 13, or you make your textfield allways present on the timeline and just hide & show it with your listA movie clip's alpha.

    Second since the textfield is nested in the listA movie clip, you have to add that instance name in your LoadVars()...

    loadVarsText = new loadVars();
    loadVarsText.load("away.txt");
    loadVarsText.onLoad = function(success) {
    if (success) {
    listA.schoolA.text = this.school1;
    }
    };
    stop();

  10. #10
    FK's Official War Driver wiReZ's Avatar
    Join Date
    Jun 2002
    Location
    wireless
    Posts
    615
    oldnewbie, do you live on these forums?

  11. #11
    Junior Member
    Join Date
    Mar 2003
    Posts
    15
    oldnewbie, as promised, you get my reverence and adoration forever! You rock! That was my missing marble, I had no idea I had to have all of my loadVars() code on the same frame as the dynamic text field I was loading the external text from. Awesome! Tweaked my .fla accordingly, and presto!

    Thanks a million!

    -Joel

  12. #12
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    wiReZ...

    ...Until I leave for the Caribbeans in 4 days!

  13. #13
    Junior Member
    Join Date
    Mar 2003
    Posts
    15
    Alrighty, got around one mountain of a problem, and ran smackdab into another. Now that I've gotten the dynamic text to fade in inside a graphic symbol, I want to have that dynamic text inside a button symbol, so when it's clicked, it calls up more dynamic text to be determined at a later point. But the problem is, if I change the AC1 graphic symbol (which worked with the dynamic text inside) to a button symbol, it won't display the dynamic text anymore. Any suggestions?

  14. #14
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Where would this new text appear?

  15. #15
    Junior Member
    Join Date
    Mar 2003
    Posts
    15
    What I plan to do is when the name of the school is clicked, it goes to another frame on the main timeline that contains a movie clip, in a similar setup as the one I've been dealing with, and have the directions to that school fade in. What I can't do (yet) is make the school's name, once it's faded in, clickable as a button. If I convert the graphic symbol to a button symbol, it won't display the dynamic text anymore. I want it to display the same text as the graphic symbol did.

  16. #16
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Just add an invisible button in your listA clip... On another layer if but for sake of clatity!

  17. #17
    Junior Member
    Join Date
    Mar 2003
    Posts
    15
    Tell you what, I've given up for the moment on making the schools' names come from the external text file... I only tried that because it would make it easier to update if we stop playing with one school or whatnot... I'll just have everything pre-programmed in as static text and that will make things so much easier on me as the programmer. Thanks a million!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center