[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

onRollover do this...

Posted on 2004-11-17
7
Medium Priority
?
262 Views
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!
Thank,s
Steve
0
Comment
Question by:SteveDallas
  • 4
  • 2
7 Comments
 
LVL 8

Expert Comment

by:sokhodom
ID: 12607336
if you want to have center popup you can try this:
http://www.kirupa.com/developer/mx/centered_popup.htm
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 ?
SokhodoM
0
 
LVL 8

Accepted Solution

by:
sokhodom earned 1600 total points
ID: 12607414
Is this what you looking for:
http://www.ntu.edu.sg/home2001/n0069866/test.swf

Cheers :)
0
 
LVL 39

Assisted Solution

by:blue-genie
blue-genie earned 400 total points
ID: 12612014
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.

blu.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 2

Author Comment

by:SteveDallas
ID: 12616977
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:
http://www.ntu.edu.sg/home2001/n0069866/test.swf
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.
Thanks,
Steve
0
 
LVL 8

Expert Comment

by:sokhodom
ID: 12617072
Great to hear that :) Will look forward to see your work Steve
Cheers :)
SokhodoM
0
 
LVL 8

Expert Comment

by:sokhodom
ID: 12617114
oh, btw, the code for the above movie is:
http://www.ntu.edu.sg/home2001/n0069866/test.fla

Sokhodom
0
 
LVL 2

Author Comment

by:SteveDallas
ID: 12649876
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 makeinstances.as
// Create empty movie clip to usea clickable region.
_root.createEmptyMovieClip("clickon_mc",0);
_root.clickon_mc.createEmptyMovieClip("hit_mc",0);
_root.clickon_mc.createTextField("click_txt",getNextHighestDepth(),1,1,790,440);
_root.hit_mc.createTextField("full_txt",getNextHighestDepth(),200,100,200,200);
_root.clickon_mc.click_txt.text="";
_root.clickon_mc.full_txt.text="Click to display full size";
this.clickon_mc.hit_mc.moveTo(0,0);
this.clickon_mc.hit_mc.beginFill(0xFF0000);
this.clickon_mc.hit_mc.lineTo(790,0);
this.clickon_mc.hit_mc.lineTo(790,440);
this.clickon_mc.hit_mc.lineTo(0,440);
this.clickon_mc.hit_mc.lineTo(0,440);
this.clickon_mc.hit_mc.endFill();
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 main.as :
// all instances mentioned here were created in makeinstances.as
//_root.createTextField("toptitlei",getNextHighestDepth(),1,1,250,50);
// Above has alrady been created in makeinstances.as
      
      
      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"
      toptitlei.setTextFormat(toptitlefmt);
}

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"
      full_txt.setTextFormat(fulltxtfmt);
}

this.clickon_mc.onRollOver = function()
{
      trace("This is the whole screen rollover");
      _root.clickon_mc._visible=true;
      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;
      clickon.mc.popbanner.size = 36;
      clickon_mc.popbanner.align = "center"
      clcikon_mc.popbanneri.setTextFormat(popbanner);
}      
      

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




0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
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 select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses

873 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