-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Flash with Drupal
At this point, we simply need to modify our existing functionality so that it is capable of editing nodes as well as adding new ones. Fortunately, we can use the same editor movie clip to do both editing and adding, but will need to populate the fields within this editor, depending on which tab is selected. We will need to add some functionality within our selectTab function, that will populate the title and body fields with node information if we are within the view tab, and clear them otherwise. To do this, we will need to store the value of the current node that has been populated within the view tab, and then use that stored copy to add text to our title and body fields of the editor for the edit tab.
// The current user.
var user:Object = null;
var currentNode:Object = null;
...
...
// Selects a new tab.
function selectTab( newTab:MovieClip )
{
// Make the previous tab go to normal.
selectedTab.gotoAndStop("normal");
// Set the new selected tab.
selectedTab...
Change the font size
Change margin width
Change background colour