Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 





Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Design Forum > Web Design & Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read

Web Design & Programming Discussion of web design, and server-side & client-side scripting

Reply
 
Thread Tools
Old 07-24-2008, 06:42 PM   #1 (permalink)
Registered User
 
Join Date: Jul 2008
Posts: 5
OS: xp


allowing user to edit text in Flash site

Hi, I'm really stuck on something so I hope anyone can offer some direction here...
I have developed a Flash site for a customer and they really like it but they want to be able to edit/update the text on three of the pages without having to use Flash. Right now, I have those three pages set up as Static Text and I've been making their updates myself by opening the .fla file and literally typing the new text in. Is there a way to set up an HTML or text file that they can use to type the text in themselves and then have that text automatically display in the Flash site?
Any help would be great!
developing is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-26-2008, 04:22 AM   #2 (permalink)
TSF Enthusiast
 
jamiemac2005's Avatar
 
Join Date: Jul 2007
Location: Northampton, UK
Posts: 756
OS: Win Vista Home Premium & Ubuntu Hardy(8.04)


Re: allowing user to edit text in Flash site

Hey, there are 2 ways to go about this, they're quite similar they differ slightly with the actionscript you'd need to use:

Both would need you to change the static text types to dynamic text.

- Do that first and give the dynamic text box an instance name ending in "_txt".

Method 1)
Set up the flash so it reads in a variable from a text file then puts that in the dynamic text box.
To do this:
Code:
- create a text file in the same directory as the site and call it something like "paragraph.txt" (or something more descriptive)
- Within that text file type "paragraph=Blah blah blah your paragraph to insert goes here"
- Within flash add the following actionscript where you want the text to load into the dynamic text boxes:

//define a loadvars object
myParagraph = new LoadVars();
//define its onload handler
myParagraph.onLoad = function() {
//set the text of paragraph_txt(the dynamic text box) to the variable
paragraph_txt.text = this.paragraph;//here paragraph is from the text file (paragraph=)
};
//load the text file
myData.load("paragraph.txt");
The other way would be to use XML but it is a fair bit harder to navigate xml using flash, so i'll leave you to google that if you wish to go down that route.

There are some amazing flash tutorials on XML here:
http://www.gotoandlearn.com/

Post back if you need more help.

Cheers,
Jamey
__________________
If i refuse you help because of forum rules don't have a go at me, i quite like this forum and do not wish to get kicked off it. However, if i refuse you help because of some moral issue feel free.

Jamey
jamiemac2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-26-2008, 04:25 PM   #3 (permalink)
Mentor
 
sobeit's Avatar
 
Join Date: Nov 2007
Location: NEAR
Posts: 4,478
OS: windows/linux


Send a message via MSN to sobeit Send a message via Yahoo to sobeit Send a message via Skype™ to sobeit
Re: allowing user to edit text in Flash site

another way to for the customer to edit the files without messing anything up is using adobe ontribute. You can set it up the customer can only access what you want them to access. You may want to check this option out.

http://www.adobe.com/products/contribute/
__________________


Do not feed the trolls.
sobeit is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 07-30-2008, 07:19 PM   #4 (permalink)
Registered User
 
Join Date: Feb 2008
Posts: 162
OS: Vista


Re: allowing user to edit text in Flash site

PHP Code:
<?php

echo '
<form method="post" enctype="text/plain">
<br />
Content:
<br />
<textarea name="content"></textarea>
<br /><br />
<input type="submit" value="Submit" name="submit">
</form>
'
;

if(!
$_POST['content']) {
    echo 
'Content is a required field.';
} else {
    echo 
'Content was successfully edited.';
    
$content htmlspecialchars($_POST['content']);
}

?>
Use javascript or something to import the variables.
Slapshot is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 08-05-2008, 06:14 PM   #5 (permalink)
Registered User
 
Join Date: Jul 2008
Posts: 5
OS: xp


Re: allowing user to edit text in Flash site

Thank you everyone for your suggestions. Unfortunately, I can't get any of them to work correctly though. :( For some reason, only the first three lines of the text file are displayed in the dynamic text area of the Flash page. Any idea why this would happen?
I really appreciate any help with this! The client wants it done by the end of this week.
developing is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 08-06-2008, 06:02 AM   #6 (permalink)
TSF Enthusiast
 
jamiemac2005's Avatar
 
Join Date: Jul 2007
Location: Northampton, UK
Posts: 756
OS: Win Vista Home Premium & Ubuntu Hardy(8.04)


Re: allowing user to edit text in Flash site

Could you post the code/a link to the site?

Cheers,
Jamey
__________________
If i refuse you help because of forum rules don't have a go at me, i quite like this forum and do not wish to get kicked off it. However, if i refuse you help because of some moral issue feel free.

Jamey
jamiemac2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 08-07-2008, 05:01 AM   #7 (permalink)
Registered User
 
Join Date: Jul 2008
Posts: 5
OS: xp


Re: allowing user to edit text in Flash site

http://www.artedistrazza.com/test/Links_new3.htm
developing is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 08-07-2008, 05:17 AM   #8 (permalink)
TSF Enthusiast
 
jamiemac2005's Avatar
 
Join Date: Jul 2007
Location: Northampton, UK
Posts: 756
OS: Win Vista Home Premium & Ubuntu Hardy(8.04)


Re: allowing user to edit text in Flash site

Hey, you'll have to post the source to the flash file...

Cheers,
Jamey
__________________
If i refuse you help because of forum rules don't have a go at me, i quite like this forum and do not wish to get kicked off it. However, if i refuse you help because of some moral issue feel free.

Jamey
jamiemac2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 08-07-2008, 06:21 PM   #9 (permalink)
Registered User
 
Join Date: Jul 2008
Posts: 5
OS: xp


Re: allowing user to edit text in Flash site

hmm....how do I do that?
developing is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 08-07-2008, 06:25 PM   #10 (permalink)
TSF Enthusiast
 
jamiemac2005's Avatar
 
Join Date: Jul 2007
Location: Northampton, UK
Posts: 756
OS: Win Vista Home Premium & Ubuntu Hardy(8.04)


Re: allowing user to edit text in Flash site

lol, open the .fla, show us what actions are occuring, or just upload the .fla
__________________
If i refuse you help because of forum rules don't have a go at me, i quite like this forum and do not wish to get kicked off it. However, if i refuse you help because of some moral issue feel free.

Jamey
jamiemac2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 08-07-2008, 07:29 PM   #11 (permalink)
Registered User
 
Join Date: Jul 2008
Posts: 5
OS: xp


Re: allowing user to edit text in Flash site

loadVariables("linktext.txt", this);
this is really the only action that the .fla has
i can't upload files for some reason :(
thanks for helping me with this!
developing is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -7. The time now is 07:04 PM.



Copyright 2001 - 2008, Tech Support Forum

Search Engine Friendly URLs by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81