-
Loaded HTML text controlling flash ????
Hi
I have built a site that loads in a .txt file as HTML to a textfield, which was easy enough, but the client now wants to include a link within this text that will link to another section in the flash site
Is there anyway i can do this? myabe javascript????
Let me know if this isn't clear and i'll try again
Thanks
-
Special Member
hi
it's pretty.. so long as you're using html text field, all you have to do is make a standard LINK... but instead of linking to a web address, you use the asfunction in flash..
for example:
make a link like this and load into your html text area
<a href="asfunction:goToFrame">click here</a>
then in your flash movie declare a function called "goToFrame"
goToFrame =function(){
this.gotoAndStop("target_area");
}
lookup asfunction in the help docs to learn more abotu it.
cheers
-
Hi
Thanks for that but i can only get it working when i define the html in the flash document (i.e. this.textField.htmlText ="<p>contents....) not when i load it from a .txt file
any ideas
much appreciated
-
Special Member
well it should work just fine if you load from a text file. what method did you use to load? xml? loadVars? and do you at least see the link in your text field when loading the text file? what happens if you click on it? or do you not see anything loaded in your text field at all?
-
hi
the code i'm using is:
var stylie = new TextField.StyleSheet();
stylie.onLoad = function(success) {
if (success) {
displayText();
} else {
this.textField.text = "Error loading style sheet. Please refresh your browser"
}
}
stylie.load("c/flash.css");
function displayText () {
this.textField.styleSheet = stylie;
loadVariables("t/people.txt", this);
}
does this shed any light?
thanks
-
Special Member
what is your people.txt's content?
-
contents=<p>Our staff is crucial in enabling us to offer exceptional, value added solutions to our clients. Our commitment to staff development is demonstrated through our continued recognition by Investors in People. As well as job related training and development, we encourage our staff to study for professional qualifications. All of our project managers have achieved their Chartered Institute of Marketing Professional Diploma and are currently studying for their Postgraduate Diploma. Collectively our professional qualifications include membership of the Market Research Society, Chartered Institute of Marketing, British Market Research Association and Association of Qualitative Researchers.</p>
<br />
<p>We like to nurture talent and are proud that the majority of those helping to lead the business today were once telephone researchers themselves. Consequently they have first hand experience of and insight into the detailed delivery of a market research project. Our team is committed to the success of our business. Many staff members have participated in our share option scheme which is available to all staff who have been with us for over two years.</p>
<br />
<p>Our staff are the core of our business and we consequently have a rigorous <a href="d/recruitmentProcess.pdf" target="_blank">recruitment process</a> to reflect this. Our researcher recruitment process is outlined below. (For information about existing researcher vacancies and to apply online, visit our vacancies page.)</p>
<br />
<p>All of our projects use the same structure and have a project director and manager, field manager and researchers. We typically assign a second project manager, who would be fully briefed on the project, to support the team.</p>
<br />
<p>To gain a fuller picture of our skills and experience, please click on the staff pictures to the right of this text.</p>
-
Special Member
well, umm.. i dont see you utilizing the asfunction anywhere..
what is the problem exactly?
i repost:
and do you at least see the link in your text field when loading the text file? what happens if you click on it? or do you not see anything loaded in your text field at all?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|