PDA

Volledige versie bekijken : combinatie flash en html


Matthijss
%Europe/Berlin %748 %2005, 18:57
ik heb 2 vragen over het combineren van flash en html. ik heb net met behulp van flash een menu gemaakt. mijn plan was om daar onder een frame met html te maken zodat als je op een link uit het flash menu klikt alleen dat frame wordt veranderd. mijn vragen zijn:
-hoe maak je met behulp van html 1 centraal frame onder de flash animatie zodat alleen dat html frame veranderd als je op een link uit het flash gedeelte klikt?
-hoe kan ik een link maken in het flash gedeelte dat er voor zorgt dat dat ene frame uit de eerste vraag veranderd (dat de tekst/info dus als enigste veranderd)?

hopelijk kan iemand mij hierbij helpen want het schiet niet meer op haha. alvast bedankt!
met vriendelijke groet,
matthijs

Laiverd
%Europe/Berlin %774 %2005, 19:35
Dit zijn basisdingen die gewoon in de handleiding staan en grotendeels in de tutorials aan de orde komen.

Matthijss
%Europe/Berlin %784 %2005, 19:49
sorry dat ik het hier heb gepost, maar ik op de een of andere manier kom ik de tutorial niet binnen, terwijl ik wel ben ingelogd. iemand?

Laiverd
%Europe/Berlin %868 %2005, 21:51
Ik bedoelde in elk geval de tutorials die gewoon bij het programma worden geleverd. Verder staat het maken van een link/button in Flash ook gewoon in de handleiding beschreven
Creating buttons

Buttons are actually four-frame interactive movie clips. When you select the button behavior for a symbol, Flash creates a Timeline with four frames. The first three frames display the button's three possible states; the fourth frame defines the active area of the button. The Timeline doesn't actually play, it simply reacts to pointer movement and actions by jumping to the appropriate frame.

To make a button interactive in a movie, you place an instance of the button symbol on the Stage and assign actions to the instance. The actions must be assigned to the instance of the button in the movie, not to frames in the button's Timeline.

Each frame in the Timeline of a button symbol has a specific function:

The first frame is the Up state, representing the button whenever the pointer is not over the button.

The second frame is the Over state, representing the button's appearance when the pointer is over it.

The third frame is the Down state, representing the button's appearance as it is clicked.

The fourth frame is the Hit state, defining the area that will respond to the mouse click. This area is invisible in the movie.


You can also create buttons using the ActionScript MovieClip object. See Using button events with movie clips to trigger scripts. You can add buttons to your movie using button components. See The PushButton component and The RadioButton component.

For an interactive lesson on creating buttons in Flash, choose Help > Lessons > Buttons.


To create a button:

1
Choose Edit > Deselect All to ensure that nothing is selected on the Stage.

2
Choose Insert > New Symbol, or press Control+F8 (Windows) or Command+F8 (Macintosh).

To create the button, you convert the button frames to keyframes.

3
In the Create New Symbol dialog box, enter a name for the new button symbol, and for Behavior choose Button.

Flash switches to symbol-editing mode. The Timeline header changes to display four consecutive frames labeled Up, Over, Down, and Hit. The first frame, Up, is a blank keyframe.


4
To create the Up state button image, use the drawing tools, import a graphic, or place an instance of another symbol on the Stage.

You can use a graphic or movie clip symbol in a button, but you cannot use another button in a button. Use a movie clip symbol if you want the button to be animated.

5
Click the second frame, labeled Over, and choose Insert > Keyframe.


Flash inserts a keyframe that duplicates the contents of the Up frame.

6
Change the button image for the Over state.

7
Repeat steps 5 and 6 for the Down frame and the Hit frame.


The Hit frame is not visible on the Stage, but it defines the area of the button that responds when clicked. Make sure that the graphic for the Hit frame is a solid area large enough to encompass all the graphic elements of the Up, Down, and Over frames. It can also be larger than the visible button. If you do not specify a Hit frame, the image for the Up state is used as the Hit frame.

You can create a disjoint rollover, in which rolling over a button changes another graphic on the Stage. To do this, you place the Hit frame in a different location than the other button frames.

8
To assign a sound to a state of the button, select that state's frame in the Timeline, choose Window > Properties, and then select a sound from the Sound menu in the Property inspector. See Adding sounds to buttons.

9
When you've finished, choose Edit > Edit Document. Drag the button symbol out of the Library panel to create an instance of it in the movie.
Creating Interaction with ActionScript > Controlling movie playback > Jumping to a different URL


Jumping to a different URL

To open a Web page in a browser window, or to pass data to another application at a defined URL, you can use the getURL action. For example, you can have a button that links to a new Web site, or you can send data to a CGI script for processing in the same way as you would an HTML form.

In the following procedure, the requested file must be at the specified location and absolute URLs must have a network connection (for example, http://www.myserver.com/).

For information on passing variables, see Connecting with External Sources.


To jump to a URL:

1
Select the frame, button instance, or movie clip instance to which you will assign the action.

2
Choose Window > Actions to display the Actions panel if it's not already visible. If the Actions panel is not in normal mode, choose Normal Mode from the View Options pop-up menu.

3
In the Actions toolbox, click the Actions category, then click the Browser/Network category, and double-click the getURL action.

4
In the parameters pane, enter the URL from which to get the document or to which you are sending data, following these guidelines:

Use either a relative path, such as mypage.html, or an absolute path, such ashttp://www.mydomain.com/mypage.html.

A relative path lets you describe one file's location in relation to another; it tells Flash to move up and down the hierarchy of nested files and folders, starting from the file where you issued the getURL instruction. An absolute path is the complete address that specifies the name of the server on which the file resides, the path (the nested hierarchy of directories, volumes, folders, and so on), and the name of the file itself.For more information about writing paths, see About absolute and relative target paths.

To get a URL based on the value of an expression, select Expression and enter an expression that evaluates to the URL's location.

For example, the following statement indicates that the URL is the value of the variable dynamicURL:

getURL(dynamicURL);

For information on writing expressions, see Understanding the ActionScript Language.

5
For Window, specify the window or HTML frame into which the document will be loaded, as follows.

Choose from the following reserved target names:

_self specifies the current frame in the current window.

_blank specifies a new window.

_parent specifies the parent of the current frame.

_top specifies the top-level frame in the current window.

Enter the name of a specific window or frame as it is named in the HTML file.

Select Expression and enter the expression that evaluates to the window's location.

6
For Variable, choose a method for sending variables for the loaded movie to the location listed in the URL text box:

Choose Send Using Get to append a small number of variables to the end of the URL. For example, use this option to send the values of the variables in a Flash movie to a server-side script.

Choose Send Using Post to send variables separate from the URL, as longer strings in a separate header; this allows you to send more variables and lets you post information collected from a form to a CGI script on the server.

Choose Don't Send to prevent variables from being passed.

Your code would look similar to the following line:

getUrl ("page2.html", "blank");

The getURL action loads the HTML file page2.html into a new browser window.



For more information on the getURL action, see its entry in the online ActionScript Dictionary in the Help menu.

Robz88
%Europe/Berlin %450 %2008, 10:49
geef dan geen antwoord en ga fietsen!