onRollover do this...

Posted on 2004-11-17
Last Modified: 2010-05-18
Hi, I have created a hit area on a Flash movie clip and created a onRollover for that area. It works just fine and when I rollover, a trace statement comes up to show me that it is working. What I need to do now:
1. Have a large static text field,with borders, pop up in center of the screen, telling user to "click for a larger view".
This should also go away onRollout.
I have the onRelease button area working. I have tried several ways to do this and can't get it to work. It's the simple stuff that trips me up more!
Question by:SteveDallas
    LVL 8

    Expert Comment

    if you want to have center popup you can try this:
    but if you need simple version, you can convert the static textbox into graphic or movie. Then set its property to _visible=false; and set it to _visible=truen when the mouse is over.
    Can ?
    LVL 8

    Accepted Solution

    Is this what you looking for:

    Cheers :)
    LVL 39

    Assisted Solution

    there are many ways to create this effect, including using the createEmptyTextField to create a textfield in which you can assign the text, or 2. use a movieclip or graphic, as sokhodom most probably did.  If you use the first option, then in our onRollOut() handler, simply use the removeTextField() or if you use option 2, you can do it as per sokhodom, and set the visibility, or you can use a 2 frame movieclip where the first frame is empty (with a stop action) - and simply, on rollOver - send to frame 2, and on rollOut, send to frame 1.

    LVL 2

    Author Comment

    Hi, I have increased the points based on the great feedback. sokhodom, yes this is basically what I wanted:
    Is this what you looking for:
    blu, your suggestion also made me think more about what I am trying to do.
    I will post all of the completed working code,afterI try a few things in the next couple of days, showing what I did from the start. I will award points within 5 days.
    LVL 8

    Expert Comment

    Great to hear that :) Will look forward to see your work Steve
    Cheers :)
    LVL 8

    Expert Comment

    oh, btw, the code for the above movie is:

    LVL 2

    Author Comment

    I am still not able to scheive what I need on this. I alrady had the rollover working befoe posting here. Where the problem is, is getting a fucntion in the onRollover and on Reales to do what I want. BY the way, I do not do anything drag, drop etc on the Flash screen. It is all done in ActionScript 2.
    Here's what I need:
    1. onRollver (any area of the "whole screen", pop up a text field, red border, red text,arial,36 )
    2. If user clicks mouse button, pop up, in a new browser window, either another web page or another *.swf file.  
    Here is what I have so far:
    Within a file called
    // Create empty movie clip to usea clickable region.
    _root.clickon_mc.full_txt.text="Click to display full size";
    this.clickon_mc.hit_mc._visible = false;
    this.clickon_mc.hitArea= this.clickon_mc.hit_mc;      
    this.clickon_mc.onRelease = function()
    { trace("You pressed the enlarge screen button");

    ~~~~~~~ End of file ~~~~~~~~~~~~~~
    Within :
    // all instances mentioned here were created in
    // Above has alrady been created in
          toptitlei.textColor = 0x000000;
          with (toptitlei)
    {      toptitlei.text = toptitle;
          border = false;
          //toptitlei.autoSize = "center";
          //borderColor = 0xFF0000;
          wordWrap = false;
          var toptitlefmt:TextFormat = new TextFormat();
          toptitlefmt.font = "Arial";
          toptitlefmt.bold = true;
          toptitlefmt.size = 36;
          toptitlefmt.align = "center"

    this.clickon_mc.full_txt.textColor = 0x00FF00;
          with (clickon_mc.full_txt);
          clickon_mc.border = true;
          full_txt.autoSize = "center";
          borderColor = 0xFF0000;
          wordWrap = false;
          var fulltxtfmt:TextFormat = new TextFormat();
          fulltxtfmt.font = "Arial";
          fulltxtfmt.bold = true;
          fulltxtfmt.size = 36;
          fulltxtfmt.align = "center"

    this.clickon_mc.onRollOver = function()
          trace("This is the whole screen rollover");
          this.clickon_mc.popbanneri.textColor = 0xFF0000;
          with (clickon_mc.popbanneri);
    {      clickon_mc.popbanneri.text = "CLICK TO VIEW FULL SCREEN";
          clickon_mc.border = true;
          clickon_mc.popbanneri.autoSize = "center";
          clickon_mc.borderColor = 0xFF0000;
          clickon_mc.wordWrap = false;
          var popbanner:TextFormat = new TextFormat();
          clickon_mc.popbanner.font = "Arial";
          clickon_mc.popbanner.bold = true;
 = 36;
          clickon_mc.popbanner.align = "center"

    this.clickon_mc.onRollOut = function()
    { this.click_txt.setTextFormat(new TextFormat(null,null,null,false));


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
    Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
    The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
    The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now