Flash How to use gotoAndStop in XML?


I have an XML-based menu that integrates with flash. I need to make
the menu clickable so that when you click you are transported to a
frame in the flash timeline.
Is there anybody that could help me
with this?
Here is the action in flash:
import
com.mixdesign.navigationMenu.*;
var m:NavigationMenu = new
NavigationMenu(stage, 200, null,
"NavigationMenuConfig.xml");
m.x = 0;
m.y = 0; />addChild(m);
m.onMenuClick(function(s:String, tab:Boolean):void
{
trace(s+" "+tab);
// this functinos will be
called once you click on menu item
}); />m.onReady(function():void {
I've worked through the excellent XML menu tutorial at:
http://www.kirupa.com/developer/acti...pdown_menu.htm
and found
it to be very helpful.
Now I'm trying to add the capability to
jump to a frame label.
Here is the section of the AS that defines
the Actions:
// This actions object handles methods for
actions
// defined by the XML called when a menu item is
pressed
Actions = Object();
Actions.gotoURL =
function(urlVar){
getURL(urlVar, "_blank");
}; />//
// here is the code i've added
// add gotoAndStop
action - jumpTo
//
Actions.jumpTo = function(jump){ />gotoAndStop(jump);
Development Tools & Services
Didn't get any takers on the last question so I thought I would try
again. I am getting a compiler error when I try to use a gotoAndStop
function in a static method in one class that is being activated by a
button in another class.
Line 33 1180: Call to a possibly
undefined method gotoAndStop
Here is the code for the Main
Script
package scripts
{
import
flash.display.MovieClip;
import flash.events.*;
import
flash.utils.*;
public class MainScript extends MovieClip

{


public function MainScript()
{

gotoAndStop("home");

var ad
Development Tools & Services
im new in as3 (as you can see) and im having some problems.
im
creating a tile based game and im using something like this to draw
the map:
class="bbcode_description">Code:
for
(y=0; y<=15; y++)
    {
     
  for (x=0; x<=19; x++)
        { />            var hex:tile = new
tile();
            hex.stop(); />            hex.x=(x*25)+13; />            hex.y=(y*25)+13; />      &n
Development Tools & Services
hi to evryone,
im a newbie in flash game dev, i hope you guys can
help.
i have a problem about using gotoandstop, i used in an .as
file,
it has the frames of walking, idle, and attack for my side
scroll game.
heres my code :
private function
keyDownHandler(e:KeyboardEvent):void
{
switch
(e.keyCode)

{
case 37:

hero.scaleX = -1;

hero.gotoAndStop('walking');
gravityx = -2;
break;
case
38:
gravityy = -15;
Development Tools & Services
hi to evryone,
im a newbie in flash game dev, i hope you guys can
help.
i have a problem about using gotoandstop, i used in an .as
file,
it has the frames of walking, idle, and attack for my side
scroll game.
heres my code :
private function
keyDownHandler(e:KeyboardEvent):void
{

switch (e.keyCode)

{

case 37:
hero.scaleX =
-1;

hero.gotoAndStop('walking');
gravityx = -2;


break;
Development Tools & Services
I have an XML-based menu that integrates with flash. I need to make
the menu clickable so that when you click you are transported to a
frame in the flash timeline.
Is there anybody that could help me
with this?
Here is the action in flash:
import
com.mixdesign.navigationMenu.*;
var m:NavigationMenu = new
NavigationMenu(stage, 200, null,
"NavigationMenuConfig.xml");
m.x = 0;
m.y = 0; />addChild(m);
m.onMenuClick(function(s:String, tab:Boolean):void
{
trace(s+" "+tab);
// this functinos will be
called once you click on menu item
}); />m.onReady(function():void {
Development Tools & Services

- Technology - Languages
+ Webmasters
+ Development
+ Development Tools
+ Internet
+ Mobile Programming
+ Linux
+ Unix
+ Apple
+ Ubuntu
+ Mobile & Tablets
+ Databases
+ Android
+ Network & Servers
+ Operating Systems
+ Coding
+ Design Software
+ Web Development
+ Game Development
+ Access
+ Excel
+ Web Design
+ Web Hosting
+ Web Site Reviews
+ Domain Name
+ Information Security
+ Software
+ Computers
+ Electronics
+ Hardware
+ Windows
+ PHP
+ ASP/ASP.Net
+ C/C++/C#
+ VB/VB.Net
+ JAVA
+ Javascript
+ Programming
Privacy Policy - Copyrights Notice - Feedback - Report Violation 2018 © BigHow