ActionScript 1/2 :: Adding Tooltip Functionality To MovieClip?
Dec 28, 2010
So I've been trying to add tooltip functionality, but I'm getting some strange behavior. e.g. duplicate clips appearing, clip not loading completely, clip not fading in correctly.
Goal: Tooltip box that quickly fades in after a short delay. Must resize to accomodate varying number of lines and line lenghts.
Structure: The tooltip movieclip holds three other clips in this layer order:
1) clip with a texbox
2) clip with the yellow box background
3) clip with a black box for the border (this box is 2 pixels larger than the box background, effectively leaving a 1 pixel border.)
These clips exist transparent on a timeline for about a half second, then start to fade in to full opacity by the last frame. So, the button code consists of assigning some text to a variable, then calling a function to make the tooltip visible via rollOver, and a hide function on rollOut. The idea is:
RollOver
1) use startDrag to place the clip by the mouse
2) Assign the text to the text box
3) Resize the background and border to match the size of the current text
4) Make the tooltip clip _visible = true
5) Play the tooltip clip, causing the delay and then fade in. (stop at last frame)
RollOut
1) make tooltip clip _visible = false
2) gotoAndStop(1); (reset clip)
Now for the problems:
1) Improper (loading?)
Upon opening the flash file, If I do anything that causes the tooltip move to stop playing, or if the showTooltip() function get called before that playback is done, the clip will no longer play. And it will be stuck at whatever frame it was on at the time of interrupt everytime the tooltip is shown thereafter.
2) Duplicate clips
If my main timeline has more than one frame, and extra instance of the tooltip appears from 'somewhere' - which is odd because there is only one tooltip movieclip and it's there from the begining.
3) Fade not working
The setting of the box size seems to be somehow interfering with the alpha of the parent clip. I've had to resort to using _visible on the tooltip timeline to control the delayed visibility of the box. (Removal of the box sizing causes the clip to fade properly.)
Relevant code:
Main timeline
startDrag("_root.tooltip", true); tooltip._visible = false;
Tooltip clip
onClipEvent(load) {
function showTooltip() {
[Code] .....
View 3 Replies
Similar Posts:
Jul 19, 2010
I'm setting up a row of thumbnails that will show a tooltip TextFormat object on rollover.
[Code]...
However when the screen is resize and the thumbnails are repositioned. The tooltips are still referencing to the old position. I tried to 'refresh' the positions by adding the same EventListener again on resize. But didn't work
[Code]...
View 1 Replies
Jun 9, 2009
I've struggled to get my animation working the way it is currently and now the functionality has been requested to change and quite frankly I just don't think I would be able to work it out as I'm not a Flash developer.[URL]It's a sliding image gallery. There are 13 images and when you roll your mouse over an image a set of filters are applied (to the movieclip wrapping the image) that gives it a glow/drop shadow effect.The images move based on the mouse position.
1. The animation still needs to move on the mouse position, but also the when the animation loads it should automatically move in one direction (images moving left across the stage) but when the user rolls their mouse over the animation then the mouse position takes control. Once the user rolls their mouse away from the animation then the images need to keep moving in the last direction (at a set speed)
2. When the user rolls their mouse over an image it needs to get bigger - but wont some of the images then overlap, so each movieclip would then have to dynamically move to the top of the stack to make sure they overlap the other images correctly
3. The animation needs to loop!?
View 3 Replies
Feb 9, 2012
this is a working singleton class for Tooltips. I want to add a timer in order to delay the tooltips since the way they're instantly popping up is bothering me.
This is the fla:
Code:
//Import and Initialise the ToolTip class
import ToolTip;
ToolTip.show();
[Code]....
View 2 Replies
Aug 23, 2010
I've got an application (video player) that has many different interactive pieces spread throughout a handful of different classes throughout the display tree hierarchy (all children/grandchildren/great-grandchildren/etc of the same View class). I'm trying to add a universal tooltip to use throughout [URL].
Basically, the primary problems I want to solve are:
-Ideally called from or channels through a single place (for ease of updating etc).Must show above all other display objects (for instance, a tooltip that shows for a player controls button shouldn't be obscured by a menu display object that might be above it).
-Add the object once in a container/holder that's added above all the other View objects.Dispatch a custom event for every ROLL_OVER and ROLL_OUT event that needs to show/hide the tool tip.In my main (logic) class, listen for the event, and then call the method in the view class that shows/hides the tooltip.
View 2 Replies
Jul 19, 2006
Anyone know how to add keyboard (up and down arrows) functionality to move the scroll up and down? And clicking the scroll bar area to move the scroll?
View 1 Replies
Mar 18, 2010
I wish to extend upon a basic Google Map. What need to do is make a submit field where people can enter in their postcode and it directs to a preset destination by defining a route upon the map. My test map is here if you wish to view it: [URL]
The Google Map that I have so far has been created by following an excellent tutorial by tunevision: [URL]
Here is the code that I have used including most of the comments:
[Code]....
View 3 Replies
Jan 12, 2011
I got a flash form going on and all the tutorials I've seen explain how to code the text fields and text areas but nothing about checkboxes. I have no idea how to code for the checkboxes that I'm using in the form. Here are a couple of screen shots for the code and the form
View 8 Replies
Jan 23, 2012
I am writing a game in actionscript3 and adobe AIR for the iphone4. Is there a way to connect to iphone's gameCenter in actionscript3, or is that not possible and I am forced to use xcode and objective-C? If this is not possible, are there any alternatives to gameCenter that I can program with actionscript3 and AIR? For example openFeint?
View 3 Replies
Feb 26, 2009
just made my jump into OOP and I am quite excited to find out such marvelous things that I did not know. If someone has a quick answer or can point me in some direction please reply to this question: How can I, if at all possible, modify a function from a superclass but preserving all of it's functionality? I know about the "override public function" but that is not precisely what I want.
View 5 Replies
Jun 25, 2009
I'm creating an image scroller in AS2 that pulls images into Flash from an external folder, as determined by an XML file. The program use a MovieClipLoader to load the external images into series of empty, and temporarily invisible, movie clips that are created inside a for loop. Once the attached listener determines that the clips are all loaded, their visibility is turned on and they begin scrolling. Everything had been going fine, until I tried to add functionality to each of the four images that had been loaded. All I want to do is generate a trace statement that says "success" when I mouse over each of the four external images in the scroller. I can use that as a springboard to continue working...
Here is the problem: "Success" IS traced out upon rollover, but only once - when you roll over the last image that was pulled in from the RSS feed and into the for loop. It does not apply to any of the other images. It seems like the functionality on the other images is created but them somehow instantly destroyed or overwritten as the for loop continues to run and the MovieClipListener updates itself. But I am not sure. If this were simply a series of movie clips or images being pulled in from the Flash library, I wouldn't have this problem. However, the external images and the MovieClipLoader are confusing things.
//Start For Loop Pulling from XML File {
//create movie clip that will hold next image pulled in from XML file var cImageHolder:MovieClip = scrollerBase.createEmptyMovieClip
("imageHolder" + i + whichRow, scrollerBase.getNextHighestDepth());
var mcLoader:MovieClipLoader = new MovieClipLoader();
[Code] .....
View 1 Replies
Sep 16, 2009
I have a custom flv player and i'm slowly adding more functionality to it as I go along but i've hit a wall.I want to add a subtitle button that toggles between show/hide. I've seen on the internet that the best way is to use an XML file (holding the script, times etc.), which I have no problem writing.I'm having problems trying to replicate the 'FLVPlaybackCaptioning' component (in Flash CS3) in to my custom flv player. I.E. Adding the right actionscript to my toggle button.
View 8 Replies
Sep 16, 2009
I have a custom flv player and i'm slowly adding more functionality to it as I go along but i've hit a wall.
I want to add a subtitle button that toggles between show/hide. I've seen on the internet that the best way is to use an XML file (holding the script, times etc.), which I have no problem writing.
I'm having problems trying to replicate the 'FLVPlaybackCaptioning' component (in Flash CS3) in to my custom flv player. I.E. Adding the right actionscript to my toggle button.
The current actionscript for my flv player is:
Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
theVideo.attachVideo(ns);
[Code]....
View 2 Replies
Sep 1, 2011
I have a video player that doesn't have "seek from unloaded time" functionality. I want to add it now. I simply load video like this;
stream.play("vidurl.flv");
(pseudo streaming)
Server side is ready. I can call videos like videourl.flv?start=xxx but cant play them in player cuz video comes without metadata
To sum up:
1. stream.play("vidurl.flv"); works, video plays
2. user clicks to seek bar. on unloaded part. I get the position and convert it to seconds
stream.play("vidurl.flv?start=10");
Doesn't work! No metadata what I should do after?
View 0 Replies
Jul 1, 2010
My application creates instances of a movie clip (located in the library) based on XML data. Now I want to add individual button functionality to these instances, and I'm stumped.
I'm basically creating instances of clickable doors, the data of which are fetched from an external XML file. The number of doors (doorCount) is calculated directly from the number of "door" nodes in the XML, so it needs to be fully dynamic. Essentially, I want to have a single function that each instance can use by passing in their individual XML data. Clicking a door would first open the door (or something similar), and clicking it again would lead to a link, listed in each instance node.
Here's the loop, where the instances are created:
[Code].....
I don't really know where to begin. Am I able to declare an eventListener inside the loop? How do I pass the "number" of the door to the function called by the eventListener? Or should I somehow pass the door-specific link (and any other node data) to the function directly from the loop?
View 3 Replies
Mar 22, 2010
I'm looking for a way to extend the functionality of the HTMLEditor control that the Ajax Control Toolkit supplies for ASP.net. I would like to add video and flash functionality to the editor (buttons, allowed tags, etc).
To my knowledge, this is rather easy: plop in an embed tag with the correct parameters and it just works; I have videos running in the preview window of the editor.
Unfortunately, the tag is stripped away when saving the HTML-code and updating it in the database.
Hence, I would like to ask if there is any way of adding this functionality apart from manually adding the changes in the source control repository of the Ajax Control Toolkit and recompiling it.
View 1 Replies
Mar 19, 2010
how to create dynamic button tooltip and get tooltip data from XML.
View 0 Replies
May 23, 2011
Would anyone know how to customize the "tooltip" / mouseover popup window in a Candlestick Component?By default, It just displays open / high / low / close data, but I need to add additional details such as date, time, and a few others...I'm guessing this is simple one, using item renderers maybe, but I cannot seem to get my head around it, or find any decent documentation online..
View 0 Replies
Jan 11, 2010
I'm trying to add a tooltip of sorts to a mc. the mc has the buttonMode set to true and when I rollover it I want it to display another movie clip as a tooltip. I've worked out how to do this with startDrag. The problem is that unless i remove the event listener for rollover the mouse flickers and won't work properly. I fixed this by removing the event listener in the same function, which works great. The problem is that I have to add and event listener for rollout, but the flickering starts again when its added.
Here's the code I have so far:
clapperHit_mc.addEventListener(MouseEvent.ROLL_OVER, videoCursor);
clapperHit_mc.buttonMode = true;
function videoCursor(event:MouseEvent):void {
videoCursor_mc.startDrag(true);
videoCursor_mc.visible = true;
videoCursor_mc.gotoAndPlay(1);
View 2 Replies
Apr 7, 2011
I have around 20 buttons that together make a map of USA. I am using AS3 tool tip, which display name of region on mouse-over. I want to create a movieclip which will house all these 20 buttons and their actions(basically put everything under one movieclip).
But when I do that everything works fine but the tool tip gets dispalced.
It appears almost at the edge of the stageAny way to make it appear near the mouse cursor?
Code I am using for tool tip is:
Button1.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler1);
function mouseOverHandler1(e:MouseEvent):void
{
//creating a new tooltip instance
[Code].....
View 2 Replies
Dec 29, 2009
I have create a simple tooltip movieclip that follows the mouse. the tooltip will popup when I hover over another movieclip, but when the tooltip is visible and I move the mouse onto the tooltip it disappears, because I have a mouse out event on the second movieclip to remove the tooltip. Is there a way to make the tooltip visible but not affect anything, such as mouse over and mouse out?
View 1 Replies
Feb 8, 2010
I have an array of MovieClips on the screen and when I hover over each of them, a tooltip is displayed but how do I bring the tooltip movieclip to the front of the stage so it's not hidden behind the other MovieClips that are already on stage?
View 1 Replies
Mar 28, 2010
I have created a paint/drawing program, and I want to be able to add a button to the menu that allows you to open a new page. When you create the new page it creates a tab inside of the application and not just opening a new browser tab. I can do the new page to a new browser tab, but I want to be able to keep it inside the program itself.
View 2 Replies
Jul 27, 2010
I created a flyout menu from this tutorial: [URL]. It basically created buttons within a movie clip for animation. Everything works great, but I cannot get the dropdown buttons to go to frames outside of the movie clip. Within the movie clip I am adding script to the dropdown buttons as follows:
on (release) {
gotoAndStop("Scene 1",10);
}
But it won't work. The buttons only seem to be able to go to frames within the movie clip such as:
on (release) {
gotoAndStop(10);
}
View 2 Replies
Jun 23, 2006
I have a movie clip that contains a button the buttons are created dynamically using xml. The button has a rollover change colour effect. When the movie is run the buttons change colour as expected when the mouse rolls over them. However as soon as I add code to a button to perform an action the button loses the rollover effect. Is it something to do with event capturing and propagation? How is it possible to overcome this??
View 5 Replies
Jan 20, 2012
I want to use RTMP based HTTP DVR functionality and HLS based IOS functionality, So I need to know how to MPP from my existing DVR app to the livepkgr app so that the stream being recorded at the DVR app can be used by the Flash and Stream MPP over to livepkgr app and can be used by the IOS HLS.
View 1 Replies
Nov 5, 2010
I have a movieClip button in my library that I dynamically add multiple instances of to the stage using code (so each instance has a unique name). The button has two frames, so it has a basic rollover effect (just changes color. To make the rollover work, I've had to dynamically add an event listener to each new instance of the movieclip, which triggers the rollover function.
I was wondering, instead of adding an event listener each time, can I somehow have an event listener within the movieclip to take care of the rollover? Or will it not make any difference to the number of event listeners, as it will still add a listener with each new instance of the clip?
View 1 Replies
Mar 25, 2012
I have a scrollpane in my library.Inside a movieclip, I create an image gallery and add it to the scrollpane.I do this in this function.[code]Now everything works fine, and no problems occur.I do however get the runtime error TypeError: Error #1009: Cannot access a property or method of a null object reference. at fl.containers::ScrollPane/endDrag()It doesnt seem to affect my file, but I am sure it would be better to try and get rid of it.I think it has something to do with adding my movieclip to the main movieclip, and maybe.I am not removing it when I add a different movieclip.Whenever I add a movieclip to the main one, I use container_mc.addChild(...);Does addChild check to see if a movieclip already exist, and remove it if it does? Or do I need to remove my clips beforehand?
View 2 Replies
Feb 28, 2011
I have a MovieClip called chipmovie which I have exported to a class method called ChipMovie, when I try and add it to another movieclip, for some reason it doesn't display.
I have checked Export for ActionScript and Export in Frame 1.The code that adds it to the MovieClip is as follows:
public function addChip(chip:Number)
{
var newChip:ChipMovie = new ChipMovie();[code].....
In the output it says:
init y = -151 height is 0
for all the ChipMovie objects I try to add.
View 2 Replies
Apr 24, 2010
I'm trying to split my stage into 2 sections
- bubbleZone
- menuZone
so I have created 2 sections and turned them into movieClips. On the first bubbleZone movieClip I want to add multiple "bubble" movieClips which will only appear in the bubbleZone movieClip. See code below. However, the bubbles seem to be appearing all over the stage and are hidden by the bubbleZone movieClip. Is there anyway to make the bubbleZone movieclip pretty much just a background for catching events and then tying the individual bubbles to just the bubbleZone so they don't appear anywhere else on the stage?
var bubbleZone:BubbleZone = new BubbleZone();
bubbleZone.vx = 1;
bubbleZone.height = 600;
bubbleZone.width = 820.8;
[code]...
View 2 Replies