13

MAR

Flash dynamic nav (for Nuke evolution CMS system)

by krike in Flash, Nuke evolution, Tutorials

Author: krike

I'm an enthousiast web designer/developer who's trying to learn as much as possible and likes to share his knowledge with others.

1) Got to file-> new and choose Flash File (ActionScript 2.0):

new document

2) Go to file->import->import to library, and import all images

import images

3) Move header_05 to the stage, also take note of the widht and height (262.0 * 36.0) cause the document should have exact the same size as your image:

header to stage

4) Deselect header_05 image (just click outside of the document), then click on the size button (see image below, 550*400).
A new window should appear, replace the default size of the document with the size of header_05 (width: 262.0, height: 36.0).

set width height

5) Select header image again and set the x and y to 0, this will align the header image perfectly with the document (will be placed on the white part of the document which is the document background, the stage).

set xy for header

6) Now move the left.png image to the stage, just above the home of header_05.

move button to stage

7) Rightmouse click on the button and choose “convert to symbol”:
Make sure button is checked and give it the name button1

convert to symbol

8) Now double click on the home button and you should see the timeline changing.

up: this is the part you see when you don’t go over it or click it.
over: this is the part you see when you go over it.
down: this is the part you see when you click it.
hit: you will never see this part, it’s just the hit spot. When you have something small that people should be able to click you can draw a rectangular in the hit part and that will be used as hit spot. (mostly used for text)

up over down explanation

9) Click on the frame under over and press F6 (this will create a copy of the up part) and hit delete (you only need the keyframe).
Now move left_hover.png to stage and set the x and y to 0, it will be placed at the same position as left.png image.

move homeover to stage

10) go back to scene1 (just click on scene1 like in image below):

go back to scene 1

11) be sure the button1 is selected and press f9, add the actionscript below for the link:

actionscript

12) Take your text tool (T) and draw a textarea just above the button1.
Set the text to dynamic text, and don’t forget to type “link1text” as variable (most important of all !!)

textarea link

13) Repeat step 6 -12 for the other buttons.

Don’t forget to change the variable name of each button.

button2 -> link2text
button3 -> link3text
…….etc

You also need to change the link in the actionscript:

button2 -> getURL(_root.link2, “_self”);
button3 -> getURL(_root.link3, “_self”);
……etc

14) Now go to file->publish settings, when the new window is open click publish (it will save the .swf file and .html file in the same map where you saved you .fla file, if the .fla file was not saved yet flash will ask you to save it first).

publish settings

15) Copy/paste the .swf file into the images map of your theme (theme/yourtheme/images)

16) Open the html file in you editor and search after tag (around line 45, next to the parameter tags). Copy the entire embed tag.

embed tag

17) Open your header.php (or header.html), find the line with the image that should be replaced by the embed tag.
and replace the entire <img …./> tag with the entire <embed …./> tag.

18) in the embed tag find the source (src=”normal_nav.swf”) and before the flash name add the new path -> src=”themes/yourtheme/images/normal_nav.swf”

19) after normal_nav.swf add following code(after .swf, not after .swf“, so between .swf and ):

?link1=” . $ThemeInfo['link1'] . “&link1text=” . $ThemeInfo['link1text'] . “&link2=” . $ThemeInfo['link2'] . “&link2text=” . $ThemeInfo['link2text'] . “&link3=” . $ThemeInfo['link3'] . “&link3text=” . $ThemeInfo['link3text'] . “&link4=” . $ThemeInfo['link4'] . “&link4text=” . $ThemeInfo['link4text'] . “

Explenation:

link1=” . $ThemeInfo['link1'] <- this is the first link of your button

. “ or “. <- this is used to attach php strings

& <- is used to attach the link and text (for flash actionscript)

link1text=” . $ThemeInfo['link1text'] <- this is the text that will appear in the nav (link name)

At the end of the line, the backslash () is used so the quote (“) after it would be seen as an html quote and not the end of the echo” command.

If you still don’t get how this works ask for help in the forum.

Where can you change the link of the nav and the names?

Go to the administration panel -> theme management -> click the edit button next to your theme and you will see the following:
Make the changes and save it :)

ato panel

So that’s it :) save, upload and test your flash nav.

Follow us on Twitter, or subscribe to our rss feed.

4 Comments

  1. Horror-Code on 20 Mar 2009

    Thats awesome!!! I almost want to switch to evo now, WOW! Maybe something like this can be done with standard nuke though. Keep up the great work guys.

  2. krike on 20 Mar 2009

    thanks :D, yes it would be nice if PHP-Nuke had the ATO panel. So people don’t have to contact the theme owner to edit the flash navigation (which he might pay for)

  3. [...] See the original post:  Flash dynamic nav (for Nuke evolution CMS system) | CMS tutorial site [...]

  4. [...] post: Flash dynamic nav (for Nuke evolution CMS system) | CMS tutorial site Tags:a-dynamic-navigation, allows-you, ato-panel, but-you, dynamic-navigation, flash, flash-file, [...]

Drop us a word