FLASH MX 2004 action script question

Hello!

I need to create a script for a core function; When the mouse passes over a moveclip, who also works a link, I want it to trigger an invisible red dot on a map of nerby. I created a movieclip and named the 'red', a clip of 1 sec with nothing in the beginning and a red dot in the end. I want this trigger point and to show when the mouse passes over this specific link, otherwise, it should be invisible.

I know it's something pretty basic and I did a few years back, but I forgot how to do and need help now.

Any help would be much appreciated :-)

Kim

When you mention that you do not understand why the code for the button is where it is, it gives the impression that you did not design this file.  Maybe you should do is to redraw the coding of button in a way that is familiar to you.  How the coding is done it is the old way, and is not a recommended... partly because it masks the code view.

If you give the buttons, instance names, you can assign functions to mouse event for them on the timeline, rather than on the buttons themselves...

Btn1.onRelease = function() {}
getURL(/:url1);
}
Btn1.onRollOver = function() {}

gotoAndPlay (2);
}
Btn1.onRollOut = function()

gotoAndPlay ("sec");
}

Since you say you had a button on the main timeline that was able to control properly, what you could do is to gradually move this button in the navigation bar to the same place that the other buttons, and every step set you the code in order to maintain control of the red dot.  Each scenario in that you move would mean adding a _parent reference to target the red dot, for example...

redDot._visible = true; on the same timeline as the red dot

_parent.redDot._visible = true; inside a movieclip which is on the same timeline as the red dot

_parent._parent.redDot._visible = true; inside a movieclip that is inside this movieclip which is on the same timeline as the red dot

Tags: Adobe Animate

Similar Questions

  • Action script question on a loop to a part of the line of the time

    Hi all!

    You have another question about an action script editing in Adobe Flash. Earlier this year, I asked for help to set up a script of action where the video itself would start when the user hovers over the scene and loops from the beginning to the end.

    Now, I need to adapt it so that instead of a loop all the way back to the beginning, it goes rather to the points later in the animation (for example, say 10 seconds in) rather than backwards to the beginning.

    The Script that was created for me it was:

    FLV.source = "Flash.F4V";
    flv.autoPlay = false;

    flv.autoRewind = true;
    flv_btn.addEventListener (MouseEvent.ROLL_OVER, rolloverF);
    flv_btn.addEventListener (MouseEvent.ROLL_OUT, rolloutF);

    function rolloverF(e:Event):void {}
    FLV. Play();
    }
    function rolloutF(e:Event):void {}
    FLV. Stop();
    }

    flv.addEventListener (Event.COMPLETE, completeF);

    function completeF(e:Event):void {}
    FLV. Play();
    }

    Now, I think that what needs to be changed is the autoRewind = true section, but being a complete novice, I don't know where to start. I've seen articles online on a goto command, but my attempts to change the code did not work properly. Any ideas?

    use:

    FLV.source = "Flash.F4V";
    flv.autoPlay = false;

    flv_btn.addEventListener (MouseEvent.ROLL_OVER, rolloverF);
    flv_btn.addEventListener (MouseEvent.ROLL_OUT, rolloutF);

    function rolloverF(e:Event):void {}
    FLV. Play();
    }
    function rolloutF(e:Event):void {}
    FLV. Stop();
    }

    flv.addEventListener (Event.COMPLETE, completeF);

    function completeF(e:Event):void {}
    FLV. Seek (20);  use the right time

    FLV. Play();

    }

  • Action Script Question


    Hi all

    How the value of the maxlength of a TextBox in ActionScript?

    < cfformitem type = "script" >

    function create (): Void {}
    <! - this isn't work - >
    txtName.maxlength = 20;
    }

    < / cfformitem >

    < cfinput type = "text" name = "txtName" maxlength = "20" >

    Looking forward for your reply.

    Thanks in advance
    Keiko

    I don't think that a TextInput has a property called 'maxlength '. There is however a "maxChars, called. You could try to look at the docs AS 2.0 here of Flex ActionScript Language Reference

  • I'm on a W7 PC, of FlashProCC. -Have a Z1, jpg in the library. Choose Properties, export for ActionScript and get name Z1, class flash.display.BitmapData - how I introduce in a display by using Action Script 3.0 object?

    I'm on a W7 PC, of FlashProCC. -Have a Z1, jpg in the library. Choose Properties, export for ActionScript and get name Z1, class flash.display.BitmapData - how I introduce in a display by using Action Script 3.0 object?

    var z1:Bitmap = new bitmap;

    Z1. BitmapData = new Z1 (1,1);

    yourDisplayObject.addChild (z1);

  • CC - Flash don't support action script 2

    I have some programs that use action script 2, but when I try and open them in the new version of the CC for flash it says that it does not support AS2

    I have to keep the program on an older computer with a previous version of flash

    It is not cost-effective to update *-any suggestions on what I can do in the new version of CC?

    or CC have access to previous versions of flash?

    Wayne

    Previous through Cloud http://helpx.adobe.com/creative-cloud/help/install-apps.html#previous

  • Action Script 3.0 for Flash Professional CC running Windows

    Hello world

    I am trying to learn Action Script 3 on Flash Professional CC. The video I'm following courses on Lynda.com and they all speak when referencing an instance of a clip that hits this instance name followed by the (dot) will show a list of available properties for this instance. I see this in action when you watch the video, but when I try properties do not appear. For example, I have a video clip of a circle on my scene and the instance of this clip is named mv_Circle

    When I type the line 1 > mv_Circle.   There should be a list appears displaying the properties, but this does not happen, so I try to guess what the property could be and what its value might be. Example of setting the alpha of this instance I type

    1 > mv_Circle.alpha = 0.5;     but the word alpha does not appear in the supposed list. I'm doing something wrong or I have put in implementation hurt somewhere. My OS is Windows 7 64 bit or victory 8 64-bit. No computer will give me this option.

    I really hope that someone can help me because it drives me crazy. Thank you in advance.

    Dougie

    You can "type" (in other words, explicitly tell Flash of the object class) first mv_Circle:

    var mv_Circle:MovieClip;

    .

    .

    .

    Enter mv_Circle point, you should see the available properties.

  • How t o create breadcrumbs in flash 5 action script 2.0 use cs?

    How t o create breadcrumbs in flash 5 action script 2.0 use cs?

    If the user is throungh go some buttons then there's finally breadcrumbs on the last stage (as it is selected 1, 2 or 3 buttons etc...) and then final should display last used button.

    Besically am looking for bread crumbs. Can anyone know how to create breadcrumbs with the help of the movie clip? or any other code?

    Can someone help me?

    Use swfaddress: http://fcontheweb.com/articles/swfaddress_as2/

  • createjs Flash cs6 export do not action script

    Hello

    I had installed cs6 in my laptop (trail version). Basically, I am programmer Action Script 3.0. I'm trying to develop an application and create the js file. I have programming using simple drag and drop functionality. his work in the swf file. Once I publish js his does not work. And I faced questions of the text. You guys can let me know that I was wrong.

    Find attached test files.

    Thank you
    Virginia chatelain

    CreateJS will not translate your actionscript code to javascript.

    Search for tutorials on the subject that will show you how you can replicate the features of AS3 with Javascript

  • Projector is "full screen" look a Cs5.5 Flash action script

    How can I set up a projector for "Full screen" display Flash Cs5.5

    Knowing he already has action script.

    I tried to add FSCommands on top, nothing helps.

    stage.displayState = "fullScreen";

  • Need help with 3.0 in Flash CS5 action script?

    Hi I work with action script 3.0 in flash and our school teacher wants us to create a simple action that allows us to have a clip from the animated film and then we have a stop and a button "play", so when I click on stop the clip stops and when I click on play it moves again. Have tried several times, I get compiler errors. I have my buttons on one layer and my video clip on a separate layer. All I have is 2 buttons. One for the stop and the other to play.

    What I am doing wrong? Here is my code and my mistakes-

    start_btn.onRelease = function() {}


    Polygon.Play ();
    }
    stop_btn.onRelease = function() {}
    Polygon.Stop ();
    }

    Here are my mistakes and if he please be aware that our teacher said to use action script 3 only and no action script 2.

    Scene 1, 'Layer' buttons, image 1, line 1 1120:Access of start_btn of property not defined
    Scene 1, 'Layer' buttons, image 1, line 1 1120:Access of stop_btn of property not defined
    Scene 1, 'Layer' buttons, image 1, line 1 1120:Access of the polygon of property not defined
    Scene 1, 'Layer' buttons, image 1, line 1 1120:Access of the polygon of property not defined

    I think your teacher, or anyone else, gave you sense with ActionScript 2 programming. In AS2, what oyu have here would have worked very well. But in AS3, you use a rather different approach. Your buttons and their instance name, can remain the same. But now in AS3, you must add the following event listeners:

    yourButtonName.addEventListener (MouseEvent.CLICK, yourListenerFunction);

    In your case, you can do one of two things - A) assign a unique to each key listener function or B) assign the same listsner to the two functions:

    (A)

    start_btn.addEventListener (MouseEvent.CLICK, startPolygon);

    stop_btn.addEventListener (MouseEvent.CLICK, stopPolygon);

    function startPolygon(e:MouseEvent):void {}

    Polygon.Play ();

    }

    function stopPolygon(e:MouseEvent):void {}

    Polygon.Stop ();

    }

    (B)

    start_btn.addEventListener (MouseEvent.CLICK, controlPolygon);

    stop_btn.addEventListener (MouseEvent.CLICK, controlPolygon);

    function controlPolygon(e:MouseEvent):void {}

    If (e.target.name == "start_btn") {//Test for the name of the object that sent the CLICK event

    Polygon.Play ();

    } ElseIf (e.target.name == "stop_btn") {}

    Polygon.Stop ();

    }

    }

    When I use multiple buttons that do the same/almost similar things, I support approach B on A, as it keeps me just a simple to process function.

  • In FLex and Flash action script

    Please give me advice.

    I understand just that flex and different flash actionscript?

    If so can you give me the reference material action script in flex?

    ActionScript is the same in flash & flex.   Think that flex is a framework actionscript for the flash player.

  • Beginner of Flash Action Script 3

    Hi friends,

    I worked as a graphic designer and web and am very interested in learning Flash Action script 3.

    Please guide me to choose a straight path.

    Thanks in advance!

    You will be better to go straight to the AS3... you need not to learn first AS2, and in doing so may confuse learning AS3.

  • Action Script 3 Question

    I have a problem, I have a flash site that I am building.  When the site loads up, it will go through the opening animation and then go to the home page (which is a clip in the clip) and when he goes to the home page continues to play this movie again and again clip animation.  I used Clipname.stop (); and Clipname.Clipname.stop (); both imagined errors saying that the Clipname is not a defined property.  So I put stop(); in action script and now the code XML does not load in the page. Here is the code for the home page:

    (The code is Scene1-> content (movieclip: frame 1)-> ContentHome (another Movieclip):)


    var xmlholder:URLLoader = new URLLoader (new URLRequest("home.xml"));

    xmlholder.addEventListener (Event.COMPLETE, onload);

    function onload(e:Event):void {}
    Feed.Text ="";
    var xml = new XML (xmlholder.data);
    for (var i: Number = 0; i < xml.story.length (); i ++) {}
    feed.appendText(xml.story[i].body+"\n\n");
    }
    }

    var xmlholderevent:URLLoader = new URLLoader (new URLRequest("events.xml"));

    xmlholderevent.addEventListener (Event.COMPLETE, onloadevent);

    function onloadevent(e:Event):void {}
    Event.Text ="";
    var xml = new XML (xmlholderevent.data);
    for (var i: Number = 0; i < xml.story.length (); i ++) {}
    event.appendText (xml.story [i].date+"/n"+xml.story [i].storyname+"/n"+xml.story[i].body+"\n\n");
    }
    }

    var xmlholderpoll:URLLoader = new URLLoader (new URLRequest("poll.xml"));

    xmlholderpoll.addEventListener (Event.COMPLETE, onloadpoll);

    function onloadpoll(e:Event):void {}
    Poll.Text ="";
    var xml = new XML (xmlholderpoll.data);
    for (var i: Number = 0; i < xml.story.length (); i ++) {}
    poll.appendText (xml.story [i].date+"/n"+xml.story [i].storyname+"/n"+xml.story[i].body+"\n\n");
    }
    }

    I need to know where to put in a stop command. For the loop ends and can load the XML file.  If anyone can help, that would be great

    put a stop() on the last frame of the timeline that repeated suburbs.

  • Flash beginner needs help with Movie Clips/Action script

    HI -.

    I'm having a problem with my video clips playing simultaneously and cannot, for the life of me, know what I did wrong. I'm new to flash so I can I have created something wrong but this is what I have so far:

    11 layers, total: 1 layer with 10 buttons, each button with the following actionscript code:


    on (release) {}
    gotoAndPlay (85);
    }


    When the number changes with regard to keyframes, the next film is about.

    I have 10 films, total, but they are only video clips, mainly photo slideshow with audio, does everything in the library.

    The problem occurs when I click on the second or third button. Not only the movie I selected starts to play, but all previous clips are as well, he has completely blurred all the sounds. I don't know what Miss me in action script, as my Action layer has a stop command to this topic at each keyframe where there is a new clip to play.

    I tried to add a stopAllSounds command, but I'm afraid that does nothing because it is not an "audio file" in itself playing in the timeline panel.

    I'm at the end of my rope and really need help to understand this one. My project is hanging in the balance on this point, I wrote everything correctly and it works beautifully.

    Help, please!

    Thank you
    Caroline

    Start your sounds in frame 2 and place stopAllSounds() on each keyframe where begins a movieclip.

  • Flash action script 3 settings

    How can I change the 3 action script settings? I want to make sure the default scene dimensions are different.

    This isn't really an Actionscript parameter. Open the Properties window for the movie, be sure that it says, 'Document' at the top of the window. In the Properties section, select the icon for key to the right of the dimensions of the stage. Which opens a new window. Here, you can define a new default step size, and then click make default in the lower left corner.

Maybe you are looking for