Flash cue points: Link from a website to specific point in a flash animation

Web Technologies Web Development 2 years ago

0 2 1 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating
_x000D_ _x000D_ Well the title basically said it all. I want to be able to link to a cue point in a flash animation I've searched and searched in Google but all I can see was linking from flash to a website based on a que point. The idea is this: I create an animation in flash that contains multiple languages. I want to create multiple links on my website. The user clickes a link in their language and opens the movie at the right "cue" point where his/her language shows. I think this can be done with cue points but I'm not really the flash-expert to know how this works. Hope that somebody else can provide me with some solid information! M.

Posted on 16 Aug 2022, this text provides information on Web Development related to Web Technologies. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago
_x000D_ You can try using variables in the link addresses. This means just add something like ?lang=eng at the end of your linked URL. Flash can read that address (only from HTML embed) and have code that does something depending on what comes after the lang= part. There's better ways to do this including real variable parsing but I just went with a simple converting browser address to String and then extract the last (language) bit. Just to see if that works too. For testing only you need an MC and two textfields on stage with these instance names: txt_url shows the full browser address txt_lang shows the final 3 letter language code MC_lang is (your) movieclip that changes frames according to txt_lang customising: you can customise your variable with these two lines: var Index_one:int = 5 + int( tempSTR.indexOf("lang=") ); Here 5 is because lang= has five characters. When you change the word you must change the number to match word/symbols length also. case "eng" must match the language code you choose (eg: if you go with ?lang=english_UK then in code it becomes case "english_UK" import flash.display.MovieClip; import flash.external.ExternalInterface; var str_url :String = ""; get_Language(); function get_Language () : void { // GET LANGUAGE var url:String = ExternalInterface.call("window.location.href.toString"); if (url != null) //if is not null { txt_url.text = url; txt_lang.text = get_lang_URL(url); } //SET BY LANGUAGE if (txt_lang.length > 0) //if is not null { switch(txt_lang.text) { case "eng": MC_lang.gotoAndStop(1); break; case "jap": MC_lang.gotoAndStop(2); break; case "bra": MC_lang.gotoAndStop(3); break; } } } //EXTRACT LANGUAGE VARIABLE FROM ADDRESS function get_lang_URL (input_str:String):String { var tempSTR:String = input_str; var finalSTR:String = ""; var Index_one:int = 5 + int( tempSTR.indexOf("lang=") ); var Index_two = input_str.length - Index_one; finalSTR = tempSTR.substr(Index_one, Index_two ); return finalSTR; }

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Important Web Technologies Links