Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Make TextField Clickable Links To _blank Instead Of _self?


I have a movie that contains a TextField object set to show HTML, which can contain some URLs. When a user clicks on a URL, I want the new page to open up in a new window (or tab), instead of always in _self, which of course replaces the movie. I've trace'd the htmlText contents, and see TARGET="" where it's building the clickable links, which I assume the browsers interpret as the same thing as _self. Is there some better way to change the target for any URLs, short of doing a search and replace of the htmlText field?

Thanks for any help, this one has stymied me for months and will prevent a lot of likely tech support headaches when we release this applet into the wild.

Dan




ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 02-07-2007, 02:11 PM


View Complete Forum Thread with Replies

Sponsored Links:

Dynamic XML Menu Links--How To Make Target='_self' ?
Hello! I am a NOOBIE with actionscript, and I am working with a dynamically-loading XML menu, which works fine, except for one little problem. That is, that all of the menu links were set up to open in a new browser window, using getURL(this.data.href, "_blank");. When I try to change "_blank" to "_self", the problem remains. I would like all of the links, when clicked on, to open in the same browser window. Here is the code that refers to this:

Code:

/* this method, initMenu, loops through the menu items and their respective
sub navigation items and builds the movie clips. */
private function initMenu(nav_array:Array):Void {
// create a reference to the current class.
var thisObj = this;
// create variables which we will use to position the menu items.
var thisX:Number;
var thisY:Number;
for (var menuIndex = 0; menuIndex<nav_array.length; menuIndex++) {
// My edit for correct Positioning
if (menuIndex == 0){thisX = 13; thisY = 5;}
if (menuIndex == 1){thisX = 141; thisY = 5;}
if (menuIndex == 2){thisX = 335; thisY = 5;}
if (menuIndex == 3){thisX = 526; thisY = 5;}
if (menuIndex == 4){thisX = 618; thisY = 5;}
if (menuIndex == 5){thisX = 729; thisY = 5;}

// for each main menu item attach the menu_mc symbol from the library and position it along the x-axis.
var menuMC:MovieClip = this.m_parent_mc.attachMovie("menu_mc", "menu"+menuIndex+"_mc", menuIndex, {_x:thisX, _y:thisY});

/* store the current menu item's information within the MovieClip so you always have a reference to the sub navigation and the current menu item's link */
menuMC.data = nav_array[menuIndex];
// add a reference to the current menu movie clip in the class' m_menu_array Array.
this.m_menu_array.push(menuMC);
// set the caption on the main menu button.
menuMC.label_txt.text = menuMC.data.caption;

// create a new movie clip on the Stage which will be used to hold the submenu items.
var subMC:MovieClip = this.m_parent_mc.createEmptyMovieClip("submenu"+menuIndex+"_mc", (menuIndex*20)+100);

// set the sub menu's X and Y position on the Stage.
subMC._x = thisX;
subMC._y = menuMC._height;

// set a variable in the submenu movie clip which stores whether the current sub menu item is visible
subMC.subMenuVisible = true;
// call the hideSubMenu method which hides the sub menu item.
hideSubMenu(subMC);
// within the sub menu movie clip store a reference to the menu movie clip
subMC.parentMenu = menuMC;
// hide the sub menu movie clip on the Stage.
subMC._visible = false;

// set a variable which we will use to track the current y-position of the sub-navigation items.
var yPos:Number = thisY;
var temp_subnav_array:Array = menuMC.data.subnav_array;
/* for each sub menu item, attach a new instance of the link_mc MovieClip from the Library, set the text for the link and increment the yPos counter. */
for (var i = 0; i<temp_subnav_array.length; i++) {
var linkMC:MovieClip = subMC.attachMovie("link_mc", "link"+i+"_mc", i, {_x:0, _y:yPos});
linkMC.data = temp_subnav_array[i];
linkMC.label_txt.text = linkMC.data.caption;
linkMC.onRelease = function() {
getURL(this.data.href, "_self"); //***
trace(this.data.href);
};
yPos += linkMC._height;

}
// draw a slight 1 pixel drop shadow around the sub menu using the drawing API
var thisWidth:Number = subMC._width+1;
var thisHeight:Number = subMC._height+1;
subMC.beginFill(0x000000, 0);
subMC.moveTo(0, 0);
subMC.lineTo(thisWidth, 0);
subMC.lineTo(thisWidth, thisHeight);
subMC.lineTo(0, thisHeight);
subMC.lineTo(0, 0);
subMC.endFill();
//
menuMC.childMenu = subMC;
thisX += menuMC._width;
}
// define the onRollOver and onRelease for each main menu item.
for (var i in this.m_menu_array) {
this.m_menu_array[i].onRollOver = function() {
thisObj.showSubMenu(this.childMenu);
};
this.m_menu_array[i].onRelease = function() {
getURL(this.data.href, "_self"); //***
// trace(this.data.href);
};
}
}
The code mark with *** is where I have changed it from "_blank" to "_self".
Any help will be greatly appreciated!

View Replies !    View Related
HTML Links Cause Whole Of Dynamic Textfield To Be Clickable
I have a dynamic text field and i am brining in text from a txt file with links embedded. I have HTML checkbox turned on for the textfield.

All the links work ok

i have about 10 in the dynamic text field

The problem is that the whole of the textfield has become clickable.

Each of the 10 links has a 3 line gap between them and i only want the mouse to be able to click on the lines of text and not the gaps in between the links.

cant understand it

any help would be gratefuly recieved




gilesb

View Replies !    View Related
GetURL _blank Acts Like _self, Really?
I redid my home page and I'm confused because when I use


Code:
on(release) {getURL("http://mcaldwel.mystarband.net/", _blank);}
on(rollOver) {_root.rollText="Mike's Bobo Site";}
on(rollOut, dragOut) {_root.rollText="";}
why does this load up his page as if I had used _self, I've spent 2 hours on this, trying different things, and then another 45 minutes answering questions I can help with... now won't somebody get their brain around this for me?

http://www.ironmallet.com

View Replies !    View Related
_blank, _self, _parent, _top ?
Could someone tell me what is the difference between _blank, _self, _parent, _top. i have a few images that i used the loadMov () to go to other swf files. they work BUT, they seem to play on top of the flash file that was there at first. my code is:

on (release) {
loadMovieNum("Automation3.swf", 1);
}
I know it has something to do with the 1 but i don't know exactly what it means. Do i go to 2, 3, 4, 5, ...... which one would allow me to look and the swf by itself?

thank you

View Replies !    View Related
GetURL: Why Does _blank Work, But Not _self?
I can't get my getURL to work. It works when I use "_blank" but not when I use "_self" or "_parent" or "_top" or leave it empty. What's the deal?

I've got it right off the main timeline. I've also tried putting it within an onRelease function.

So, this doesn't work:

Code:
getURL("images/aboutus.jpg", "_self");
But this does:

Code:
getURL("images/aboutus.jpg", "_blank");
Any ideas? Thanks a bunch!

View Replies !    View Related
SWF/XML To Open _self Instead Of _blank HTML Page
I have a SWF placed on NTML page and consisting of several images controlled by XML document. When I click on an image, I want current HTML page be replaced by a new one, but instead, it opens a new browser window.
Can you help me?
XML and AS are attached.

Thank you!

View Replies !    View Related
How Can I Make Textfield Created In AS That Is Clickable
hello friends, just wondering how can i create dynamic textfield in actionscript that is clickable so that i can put onRelease event on it. here is my code..

textContinue();
function textContinue(){
var mcTxtContinue:MovieClip = this.createTextField("tContinue", this.getNextHighestDepth(), 195, 138, 200, 40);
tContinue.border = true;
mcTxtContinue.onRelease = function():Void{
trace("Click Movie");
}
}

how can i make textfield created in AS that is clickable? in this code i reference the textfield to movieclip but im seem it did not adopt the behaviour of movieclip.. any suggestion.. thanks

View Replies !    View Related
Can Some1 Please Explain _blank,_self,_parent,_top In Small Words?
I am a somewhat intelligent man. I know how to fill out an application at McDonald's I can write my name etc.etc. , but when it comes to those _blank,_self,_parent,_top they are like Criptonite for Superman.

I understand blank opens a new page.How about the rest. Can you help me please.
ThanX a bunch. Lots of great karma coming your way.
T.

PS but explain like you're explaining to your grandmother.

View Replies !    View Related
Read Folder Directory Via PHP, And Make Clickable Links To Each File
I'd like Flash to read a directory via PHP. (That part i have done). But I want each file name in that directory to be displayed in flash, and each of those file name need to be clickable so the user can then navigate to that file in the browser.

Any ideas?

Thanks!

Scott

View Replies !    View Related
Make Clickable Movieclip Un-clickable
I'm working on the card matching game from flashgameu, in which a deck of cards with pairs of identical cards are layed out face down and the player selects pairs in an attempt to match them. (Same project as in a post from last night.)

The project is originally set up such that, when two selected cards match, they are removed from the stage. I changed this a bit -- I leave the cards in place, and change their alpha to 0.25.

The problem is that simply changing the alpha value and keeping them on the stage maintains the player's ability to click them. When clicked, they turn back over.

I want to take these matched cards "out of play" somehow while keeping them on the stage.

Here's the code:


Code:

package {
import flash.display.MovieClip;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.utils.getTimer;
import flash.utils.Timer;
import flash.media.Sound;
import flash.media.SoundChannel;
public class Matching10 extends MovieClip {

private static var numRows:uint = 3;
private static var numCols:uint = 4;
private static var numCards:uint = numRows * numCols;
private static var cardWidth:uint = 85;
private static var cardHeight:uint = 85;
private static var gap:uint = 10;
private static var horizSp:uint = 95;
private static var vertSp:uint = 95;
private static var horizScrOff:uint = 800 / 2 -((numCols * cardWidth) + (numCols - 1) * gap) / 2;
private static var vertScrOff:uint = 600 / 2 -((numRows * cardHeight) + (numRows - 1) * gap) / 2;
private static const matchPoints:int = 100;
private static const missPoints:int = -10;
private var scoreField:TextField;
private var score:int;
private var bestScoreField:TextField;
private var bestScore:int;
private var textStyle1:TextFormat;
private var textStyle2:TextFormat;
private var textStyleClock:TextFormat;
private var gameStartTime:uint;
private var gameTime:uint;
private var gameTimeField:TextField;
private var gameScore:uint;

private var firstCard:Card;
private var secondCard:Card;
private var cardsRemaining:uint;

private var flipBackTimer:Timer;
private var waitToFinishTimer:Timer;

var firstCardSound:FirstCardSound = new FirstCardSound();
var matchSound:MatchSound = new MatchSound();
var missSound:MissSound = new MissSound();
public function Matching10():void {
init();
}
public function init():void {
// set background
var bkgd:Sprite = new Sprite();
bkgd.graphics.beginFill(0xD8BFD8);
bkgd.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
bkgd.graphics.endFill();
addChild(bkgd);

// make a list of card numbers
var cardlist:Array = new Array();
for (var i:uint = 0; i < numCols * numRows / 2; i++) {
cardlist.push(i);
trace("cardlist 1 = " + cardlist);
cardlist.push(i);
trace("cardlist 2 = " + cardlist);
trace("cardlist.length = " + cardlist.length);
}

// add card placeholders showing only the back (first frame of Card)
cardsRemaining = 0;
for (var x:uint = 0; x < numCols; x++) {
for (var y:uint = 0; y < numRows; y++) {
var c:Card = new Card();
c.stop();
c.x = x * horizSp + horizScrOff + c.width/2;
c.y = y * vertSp + vertScrOff + c.height/2;
var s:uint = Math.floor(Math.random() * cardlist.length);// get a random card face
c.cardface = cardlist[s];// assign the face to the card
cardlist.splice(s, 1);// remove that face from the list
// c.gotoAndStop(c.cardface + 2);
c.buttonMode = true;
addChild(c);
cardsRemaining++;
c.addEventListener(MouseEvent.CLICK, clickCard);
}
}

scoreField = new TextField();
addChild(scoreField);

score = 0;
scoreField.x = 15;
scoreField.y = 15;
showGameScore();

gameTimeField = new TextField();
gameTimeField.x = 650;
gameTimeField.y = 15;
addChild(gameTimeField);
gameStartTime = getTimer();
gameTime = 0;
addEventListener(Event.ENTER_FRAME, showTime);

}
public function clickCard(event:MouseEvent):void {
var thisCard:Card = (event.target as Card);// what card?

if (firstCard == null) {
firstCard = thisCard;
thisCard.startFlip(thisCard.cardface+2); // turn card over
playSound(firstCardSound);

} else if (firstCard == thisCard) { // clicked the first card again
firstCard.startFlip(1); // turn it back over
firstCard = null;
playSound(missSound);

} else if (secondCard == null) {
secondCard = thisCard;
thisCard.startFlip(thisCard.cardface+2);

// compare first and second
if (firstCard.cardface == secondCard.cardface) {
playSound(matchSound);
firstCard.alpha = 0.25;
secondCard.alpha = 0.25;
firstCard = null;
secondCard = null;
cardsRemaining -= 2;
score += matchPoints;
showGameScore();
if (cardsRemaining == 0) {
MovieClip(root).gameScore = score;
MovieClip(root).gameTime = clockTime(gameTime);
waitToFinishTimer = new Timer(2000, 1);
waitToFinishTimer.addEventListener(TimerEvent.TIMER_COMPLETE, goToEndFrame);
waitToFinishTimer.start();
}
} else {
score += missPoints;
showGameScore();
flipBackTimer = new Timer(1000, 1);
flipBackTimer.addEventListener(TimerEvent.TIMER_COMPLETE, returnCards);
flipBackTimer.start();
playSound(missSound);
}
} else {
returnCards(null);
firstCard = thisCard; // select the first card in the next pair
firstCard.startFlip(thisCard.cardface+2);
}
}
public function returnCards(event:TimerEvent):void {
firstCard.startFlip(1);
secondCard.startFlip(1);
firstCard = null;
secondCard = null;
flipBackTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, returnCards);
}

public function startOver(event:MouseEvent):void {
MovieClip(root).gotoAndStop("start");
}

public function showGameScore():void {
scoreField.text = "SCORE: " + String(score);
textStyle2 = new TextFormat();
textStyle2.font = "Myriad Pro";
textStyle2.size = 16;
textStyle2.bold = true;
textStyle2.color = 0x0000FF;
textStyle2.align = TextFormatAlign.LEFT;
scoreField.setTextFormat(textStyle2);
bestScoreField = new TextField();
bestScoreField.text = "BEST SCORE: " + String((matchPoints * numCards / 2));
addChild(bestScoreField);
bestScoreField.x = scoreField.x;
bestScoreField.y = scoreField.y + 20;
bestScoreField.setTextFormat(textStyle2);
bestScoreField.autoSize = TextFieldAutoSize.LEFT;

}

public function showTime(event:Event):void {
gameTime = getTimer() - gameStartTime;
gameTimeField.text = "Time: " + clockTime(gameTime);
textStyleClock = new TextFormat();
textStyleClock.font = "Myriad Pro";
textStyleClock.size = 16;
textStyleClock.bold = true;
textStyleClock.color = 0x0000FF;
textStyleClock.align = TextFormatAlign.RIGHT;
gameTimeField.setTextFormat(textStyleClock);
}

public function clockTime(ms:int) {
var seconds:int = Math.floor(ms/1000);
var minutes:int = Math.floor(seconds/60);
seconds -= minutes * 60;
var timeString:String = minutes + ":" + String(seconds + 100).substr(1,2);
return timeString;
}
public function goToEndFrame(event:TimerEvent):void {
MovieClip(root).gotoAndStop("gameover");
}

public function playSound(soundObject:Object) {
var channel:SoundChannel = soundObject.play();
}
}
}
My first thought is that maybe? the card can be converted from a movieclip to a simple graphic? A bitmap? I have no experience with this so I don't know if it's possible. Perhaps the answer is much simpler. But I'm at a loss.

Thanks,
Tim

View Replies !    View Related
TextField.scroll And '_blank', Maybe A Bug?
So, I'm using Flash 8, publishing for player 6 (tho changing that doesn't help) and using As 2.0.

I have a dynamic, html formatted, textbox that has a simple pager that does this:

textBox.scroll=textBox.bottomScroll+1;

when you press a button. The problem comes when I put links in the textbox that have the '_blank' target to open them in new windows. When I come back to the textBox, not only has the textBox.scroll changed from whatever it was to the first textBox.maxscroll (18, in this case), but it just keeps going to the same first condition. In other words, it stays on the same page.

Anybody else ever have this problem?

View Replies !    View Related
TextField.scroll And '_blank', Maybe A Bug?
So, I'm using Flash 8, publishing for player 6 (tho changing that doesn't help) and using As 2.0.

I have a dynamic, html formatted, textbox that has a simple pager that does this:

textBox.scroll=textBox.bottomScroll+1;

when you press a button. The problem comes when I put links in the textbox that have the '_blank' target to open them in new windows. When I come back to the textBox, not only has the textBox.scroll changed from whatever it was to the first textBox.maxscroll (18, in this case), but it just keeps going to the same first condition. In other words, it stays on the same page.

Anybody else ever have this problem?

View Replies !    View Related
Clickable Links
Before I say anything, Just like to say Hello all a newbie here

Ok Iv just setup a home page ( flash ) which has a few off site links on , my problem is they are not clickable , can anyone help me with the code to make them clickable in the XML file,
Dont shoot me down because this is Probably very easy but Im stuck

Thanks in advance

View Replies !    View Related
Clickable Textfield
Ahoi, ahoi!

Ok, here's my issue. I have a Sprite that contains 3 dynamic textfields that act as my navigation. I populate the individual textfields from an xml document. My problem is that I want the text to be clickable by showing the hand cursor.

I can get the hand cursor to show, but I can't get the listener to fire with the MOUSE_DOWN. If I change the event listener to be that of the Sprite object, it works, but not the way I want it.

Here's my code


Code:
var container:Sprite = new Sprite();
container.x = container.y = 100;
container.buttonMode = true;
container.useHandCursor = true;
container.mouseChildren = false;

var mytext:TextField = new TextField();
mytext.text = "HELLO WORLD!";
mytext.name = "textBox1";
mytext.mouseEnabled = true;
mytext.selectable = false;
mytext.addEventListener(MouseEvent.MOUSE_DOWN, geturl, false, 0, false)

container.addChild(mytext);
addChild(container);

function geturl(evt:Event):void {
trace(evt.target);
}
How do I make the textfields clickable? What am I missing?

Me baffled.

View Replies !    View Related
Html Links Are Not Clickable Under Flash
I have a drop down navigation in flash. The wmode is set to transparent. The flash layer is the top layer so when you mouse over the navigation, it covers the html underneath. The flash navigation links work, but the html links only work in the newer IE browsers. The links do not work on a Mac in Safari, Mozilla or Firefox. Is there any way to get the links under Flash to work in the other browsers?

View Replies !    View Related
Text With Scrollbar And Clickable Links
I know here in this page there are a few tutorials about
scrolling text but I want also to add links to the text inside.
Anyone knows about a good tutorial??

Thanks!

View Replies !    View Related
Making A Datagrid With Clickable Links
I'm trying to pull an XML list into a Flash file (got that part) and make each item in the resulting datagrid list a link to different PDF files (that's the part I DON'T have). I would think you'd build the url right into the XML, but I can't figure out how to use it to make the cells clickable. Any help would be much appreciated.

View Replies !    View Related
Flash Chat Clickable Links.
Hey, I am using a chat script that I downloaded from here:

TUTORIAL LINK: http://www.sephiroth.it/tutorials/flashPHP/flash_chat/ (script can be downloaded for free without signing up at the end of the tutorial)

This script is very basic (and I like it because it IS basic) but I would like to add a feature that will make it more convenient to use. Before I say anything let me tell you how the script works:

User A types and sends a message in flash
flash sends message to read.php
write.php sends the message to mysql db
read.php checks db for new messages and sends to flash
flash displays it to the user

Very simple and basic.

Right now if you type in a URL it sends it to the database exactly how to user has typed it. No HTML formatting. I would like to make it so that it IS html formatted. I have wrote a function in write.php so if it recognizes a URL it sends it to the database in HTML format. So if someone types:

http://google.com

it would go into the database as


HTML Code:
<a href="http://google.com">http://google.com</a>
Now the problem for me is my huge lack of knowledge in Flash. The flash displays this text AS IS without parsing the html. So the end user sees the HTML and not the clickable link.

I have done some research on google and I have read to click the icon that says render as HTML. The icon is already clicked. I am kind of stumped. It is a very basic flash file and I am sure any of you here can understand it since I was able to understand atleast some of it with my limited skills.

If anyone can help me out here it would be a HUGE favor. Thank you so much for your time!

View Replies !    View Related
Links Form Text File Not Clickable
I have created this link

<A HREF="javascriptpen_window('http://www.website.com/index.cfm%3Fid=161%26page_id2093')"></a>

in a text file and loading that txt file into flash. Here is the problem. Using IE 5.5 most of the computers work, but on others the text link doesn't work. I seem to have narrowed it down to the problem being the javascript function. When I use just a straight forward URL it works , but when I have the "javascriptpen_window(' . . . . " it seems to work on some computers, but not others. I know that I have to use URL encoding for special characters, but that I have already done for the "?" and the "&" in the url string so that is working fine. I am just really puzzled by why it works on some computers and not others. Anyone out there feel my pain? Thanks in advance for your help :-)

View Replies !    View Related
Problem With Clickable Links Within RollOver MovieClips
Hi, hope someone can help!
I'm designing a Flash interface for the homepage of a site, with links to a number of HTML pages. The problem is these links are held in a number of different rollOver movieClips. And these movieClips expand over another movieClip when they're rolled over. Each of the movieClips has links. I can get all the menu movieClips to expand on rollOver, but when the mouse moves over the text links within the rollOver the menus collapse as it thinks the mouse has rolledOut. My code in the main timeline looks like this…
b5_mc.b4_mc.onRollOver = over2;
b5_mc.b4_mc.onRollOut = out2;

function over2() {
_level0.b5_mc.gotoAndPlay(2);
}

function out2() {
_level0.b5_mc.gotoAndPlay(11);
}

where b5_mc is the movieClip for the menu and b4_mc is an invisible button inside b5_mc which acts as the target area for the rollOver.

the flash movie as it is and the .fla file are here…

http://www.f7creative.co.uk/robot.html

any help much appreciated!

View Replies !    View Related
FLASH Transparency-stacking + CLICKABLE Links Behind It
Greetings guys...

i have been playing around with the wmode transparency attribute of our beloved flash player and i have reached the following conclusions:

1. it's supported under IE5+ and Mozilla 1.0+ (Win32 family) in terms of transparency (meaning that the html content actually shows through-behind the stacked-by-means-of-css FLASH MOVIE) yet...

2. only under IE6 (Win32) can you click links behind the flash movie, links that you can see through the movie. i have tried clicking links under IE5+ and Mozilla and i can't do it...When i approach the links the mouse pointer doesn't transform into a hand, as it is suppored to, and i cannot click the links, or any html content that is behind the space occupied by the flash animation

how can i have both transparent-stacked above all flash movie AND clickable links behind it under IE5+ and Mozilla....???

any help would be greatly appreciated....

View Replies !    View Related
How To Load Clickable Links From External Text File
I can load text from a text file into a dynamic text box but I want the text to be clickable so that It will open a new window to that clickable link.

View Replies !    View Related
Clickable Links Not Working Inside Of Pull Down Slider
Hi All,

I built a pull down slider box that works using the mouseover events. However, the link I put in the slider box won't work... perhaps because I'm tieing up the mouseover events with an on(rollout) command... I dono... but I don't see a way around this.

My .FLA file is here: http://dev.sheridan.edu/Test/Slider/...own_puller.fla


Any suggestions?

Thanks!!,

John

View Replies !    View Related
Transparent Flash Issues - Links Underneath Not Clickable
I have a transparent flash animation over an html page. The links below the animation (on the html page) are, however, not clickable. I know that this is an issue that is going around. Any ideas?!

View Replies !    View Related
Help With Vertical Scrolling Dynamic Text That Can Be Seperate Clickable Links.
Can someone help me please?

I am wondering how to make a movie clip that contains automatic vertical scrolling dynamic text(from an external .txt file)

I dont want to press buttons to scroll text, I need it to be constantly scrolling, then loop once the text has been read from the external txt file.

I also require each line of the dynamic text to be clickable links that will take each line of text to a specific link.

Can anyone help me with this, I would be really grateful for any instructions?


Thanks

Michael

View Replies !    View Related
Help With Vertical Scrolling Dynamic Text That Can Be Seperate Clickable Links.
Can someone help me please?

I am wondering how to make a movie clip that contains automatic vertical scrolling dynamic text(from an external .txt file)

I dont want to press buttons to scroll text, I need it to be constantly scrolling, then loop once the text has been read from the external txt file.

I also require each line of the dynamic text to be clickable links that will take each line of text to a specific link.

Can anyone help me with this, I would be really grateful for any instructions?

Ive uploaded a zip file containing fla and swf i found which shows vertical scrolling text. However if i move any of the graphics and text field clips around the stage the text cannot be seen anymore. why is this? can you put all of the items on the main stage in a movie clip so i can resize and move the scroller around the stage?? I tried this but again the text disapeared when i exported the movie? Is this due to the x + y co ordinates in the scripting?

How can you adjust the size of this scroller without this happening?

Can the scrolling text be taken from an external file and each line of text be a seperate hyperlink?


Follow this link (copy and paste it into your browser window, DONT click on it):

http://www.geocities.com/freeeky/vert_scrolltext.zip



Thanks again

View Replies !    View Related
I Am Trying To Make A Swf Clickable
I made a swf it is a small animation that I want to be able to click on and go to another page in my site. Some one else told me to make an invisiable button and with just the hit state and put it in the top layer of my movie with a on release action. Well I tried that and can't get it to work.
Please help

View Replies !    View Related
How To Make MC Clickable
hi all. here is what I am trying to do. I have 4 MCs in the _root - then i load an xml file. when loaded i pick out attribute values and assign to the dynamic text fields i have within MCs. Then again I verify the xml node attribute for boolian value. if the attriute value is true in xml then i change the MC color to green and make it cliciable. If the attribute value is false in xml, then I change the MC color to yellow. pretty cool huh. i am having trouble. can you help me please. here is halfway script...
---------------
art_xml = new XML();
art_xml.ignoreWhite = true;
art_xml.onLoad = function() {
var artElement = this.firstChild;
_root.b1.bid_txt.text = artElement.attributes.bid;//b1 is MC and bid_txt //is dynamic text field within MC b1
if (artElement.attributes.sta == "AV") {
myClr = new Color(_root.b1);
myClr.setRGB(0x009900);
reserveNow();
} else {
myClr = new Color(_root.b1);
myClr.setRGB(0x990000);
}
_root.bidTxt.bidTxt.text = artElement.attributes.bid;
function reserveNow(){
this.onPress = getURL("http://localhost/site/kickme.asp?id="+artElement.attributes.bid, "POST");
};
};
art_xml.load("art3.xml");
---------------
the trouble is making the MC clickable in xml value is true.
krs

View Replies !    View Related
Is There A Way To Make A Button Not Clickable
Hello everyone,

I was wondering if there was a way to stop a button from being clickable. Lets say the user has been idle on a site for 5 minutes. I want to flash movie to through up a translucent cover on the buttons and make the buttons not clickable.

Thanks in advance

View Replies !    View Related
Want To Make My FLash NON-CLICKABLE
For some reason.....some of my flash in my website is clickable, and points to no where. I want to be able to disable this feature......How do I make this happen. I can not see where this is configured when I publish the flash........

Thanks much
Gotchabebe

View Replies !    View Related
[F8] How To Make Preloader Clickable(URL)
So i have this preloader/movie thing and i want to be able to click on it at anytime and it will load my websites url,so how do i do this?

thanks

View Replies !    View Related
Make Image Clickable?
Is there any way to load an image file into a movieclip so that when it appears
you can evoke the onPress function.
I have this class which attempts to do this.
The image shows up fine but when I roll-over with the mouse the handcursor doesn't appear and when I attempt to drag it it sits there lifeless and inert.
The following is the relevant code:

ActionScript Code:
private function createImageObj():Void{
    loadMovie(this.__file,"imagecontainer");
    attachMovie("imagecontainer", "__ImageObjClip", getNextHighestDepth());
    attachMovie("imageitem", "__ImageObjClip", getNextHighestDepth());
    arrange();
    MakeImageObjItem(__ImageObjClip);
}
private function MakeImageObjItem(mc)
{

    mc.hitArea = mc.myhitArea;
    mc.onPress = function():Void{
        this._parent.xdif=this._parent.getX()-_root._xmouse;
        this._parent.ydif=this._parent.getY()-_root._ymouse;
        trace("this._parent.xdif= "+this._parent.xdif+"this._parent.ydif= "+this._parent.ydif);
        this._parent.setSelected(true,this._parent.__unselectNieghbours);
        this._parent.__hasDragged=false;
        startDrag(mc);
    }
    mc.onRelease = function():Void{
        stopDrag();
        this._parent.__hasDragged=true;
        this._parent.createImageObj();
        this._parent.arrange();
        this._parent.setLocation(_root._xmouse+this._parent.xdif,_root._ymouse+this._parent.ydif);
    }
"imagecontainer" and "imageitem" are both movieclips in the Library.
"imageitem" contains a transparent instance of another movieclip to be used as the hit area.
-Any ideas?
-Mulligan

View Replies !    View Related
Make The Thumbnails Clickable
I have a problem. Below is the code of action script i got. It is like a circular clip. When we move the pointer towards screen ends the files start to rotate and do so in the intended nice manner. However the problem is how to make a lick work.

I want to know what modifications to do in order to make the thumbnails clickable. I must also be able to define the path. Please help. I am a newbie in this


Code:
/ Code Credit: Lee Brimelow
// Tutorial Reference URL: www.gotoandlearn.com
// Modified by www.flashmo.com

stop();

// total is length of label_list OR link_list
// OR total frames inside "flashmo thumbnails"
var total:Number = 12;
// length of label_list array and length of link_list array must be equal
// to length of frames inside "flashmo thumbnails" movieclip

var label_list:Array = new Array( "041_horizontal_scroller", "042_vertical_scroller", "043_intro", "044_intro", "045_elastic", "046_thumbnail_xml", "047_present", "048_vertical_menu_xml", "049_horizontal_menu_xml", "050_star_effect", "051_star_motion", "052_design");

var link_list:Array = new Array("http://www.flashmo.com/preview/flashmo_041_horizontal_scroller", "http://www.flashmo.com/preview/flashmo_042_vertical_scroller", "http://www.flashmo.com/preview/flashmo_043_intro", "http://www.flashmo.com/preview/flashmo_044_intro", "http://www.flashmo.com/preview/flashmo_045_elastic", "http://www.flashmo.com/preview/flashmo_046_thumbnail_xml", "http://www.flashmo.com/preview/flashmo_047_present", "http://www.flashmo.com/preview/flashmo_048_vertical_menu_xml", "http://www.flashmo.com/preview/flashmo_049_horizontal_menu_xml", "http://www.flashmo.com/preview/flashmo_050_star_effect", "http://www.flashmo.com/preview/flashmo_051_star_motion", "http://www.flashmo.com/preview/flashmo_052_design");

var radiusX:Number = 330;
var radiusY:Number = 90;
var centerX:Number = 400;
var centerY:Number = 140;
var speed:Number = 0.005;
tn_group_mc._visible = false;
info.text = ""; fm_label.text = "";

for( var i = 0; i < total; i++)
{
var t = tn_group_mc.duplicateMovieClip("tn"+i, i);
t.tn_mc.gotoAndStop(i+1); t.tn_shadow_mc.gotoAndStop(i+1);
t.fm_label = label_list[i];
t.fm_url = link_list[i];

t.angle = i * ((Math.PI*2)/total);
t.onEnterFrame = mover;

t.fm_button.onRollOver = function()
{
fm_label.text = "Title: " + this._parent.fm_label;
info.text = "URL: " + this._parent.fm_url;
}
t.fm_button.onRollOut = function()
{
info.text = ""; fm_label.text = "";
}
t.fm_button.onRelease = function()
{
getURL( this._parent.fm_url );
}
}
function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = this._y /(centerY+radiusY);
this._xscale = this._yscale = s*100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale) + 100);
}
this.onMouseMove = function()
{
speed = (this._xmouse-centerX) * 0.0001;
}

View Replies !    View Related
AIR How Do I Make These Clickable/Linkable?
I have been working so long on this problem and I need some help. I am using browseForDirectory to open a directory, then the files in the folder that the user chooses from are shown in a list. My problem is that I don't know how to make these items in the list clickable so I can open them back up in a browser. The highlighted part shows where the list is being populated.

Can someone please help me?

Here is the code:


import flash.filesystem.*;
import flash.events.*;
import fl.controls.*;
import flash.display.*;
import flash.text.*;

browse_btn.addEventListener(MouseEvent.CLICK, browseFiles)

function browseFiles(e:Event):void
{

var file:File = new File();

file.addEventListener(Event.SELECT, dirSelected);
file.browseForDirectory("Choose a folder");

function dirSelected(e:Event):void
{
info.text = file.nativePath;

var desktopNodes:Array = file.getDirectoryListing();
for (var i:uint = 0; i < desktopNodes.length; i++)
{


var f:File=desktopNodes[i] as File;
if (f.extension=="htm"||f.extension=="html")
{
list.appendText("
" + desktopNodes[i].name);

}

}



}

}

If Someone could help me out it would be wonderful, thanks guys.

View Replies !    View Related
Make A Swf Clickable In JS/HTML
I've got a .swf banner that doesn't link anywhere. I don't have the .fla and there is no way I can get hold of it. I know I can use JS or HTML to make it clickable, I just don't know how... Please can you tell me

View Replies !    View Related
Please Help: How To Make An Image Clickable?
Please help me out....

I'm trying to make a bitmap image clickable so that it opens a new window. But I can't do it. I already have my actionscript set up but it still doesn't work.

This is how the image look like:
http://www.geocities.com/jocksteady/Mainloader2.swf

Please view my file and tell me what I'm doing wrong....

http://www.geocities.com/jocksteady/mainloader.zip

Thanks.

View Replies !    View Related
Can't Make My Banner Clickable
i've inserted this code to the one of my ketframes

Code:


_root.onRelease = function()
{
getURL("http://domain.com", "_self");
}



to make my banner clickable, but it does nothing. why?

View Replies !    View Related
How To Make Text Objects Clickable
(hope it's true there are no dumb questions here)
i am learning flash, using insane flash animator 2.5
trying to make a navbar and would like to make the individual text items clickable - to open a new url when the user clicks on the word
and have no idea how to start - i'm guessing i need to use one of the action elements but which one? and how? if anyone uses this darned thing or knows where there might be a step by step tutorial for TOTAL newbies like myself i would appreciate it very much

View Replies !    View Related
How To Make Dynamic Text Clickable?
Hi All,

I have a set of lines from an XML file loaded into variables. Now, I can display those in a textbox, but I want each sentence to be clickable so that in a different textbox, some more text about the same subject appears. I know how to get the information I want, I just don't know how to make those headlines clickable, and at the same time have them in a dyunamic textbox.

Can anybode help me?

This is the code I have so far:

Code:
var myLoadVars = new LoadVars();
myLoadVars.load("faq.txt"); // The asp file generates a long string of [variablename=varvalue] all separated by ampersands (&)
myLoadVars.onLoad = function(succes) {
Qarray = new Array(10);
Aarray = new Array(10);
Qarray[0] = myLoadVars.vraag1;
Aarray[0] = myLoadVars.antwoord1;
Qarray[1] = myLoadVars.vraag2;
Aarray[1] = myLoadVars.antwoord2;
Qarray[2] = myLoadVars.vraag3;
Aarray[2] = myLoadVars.antwoord3;
Qarray[3] = myLoadVars.vraag4;
Aarray[3] = myLoadVars.antwoord4;
Qarray[4] = myLoadVars.vraag5;
Aarray[4] = myLoadVars.antwoord5;
Qarray[5] = myLoadVars.vraag6;
Aarray[5] = myLoadVars.antwoord6;
Qarray[6] = myLoadVars.vraag7;
Aarray[6] = myLoadVars.antwoord7;
Qarray[7] = myLoadVars.vraag8;
Aarray[7] = myLoadVars.antwoord8;
Qarray[8] = myLoadVars.vraag9;
Aarray[8] = myLoadVars.antwoord9;
Qarray[9] = myLoadVars.vraag10;
Aarray[9] = myLoadVars.antwoord10;
vragenHTML = "";
for (i=0;i<10;i++)
{questions = questions + "> " + Qarray[i];
}
scrollerbox.text = questions;
//trace(questions);
}


Now, how do I make the sentences in the Qarray clickable to show a detail of that question (the answer) in another text box?

Hope you can help.

best,
- jaron

View Replies !    View Related
How Do I Make A Flash Banner Clickable?
After having Flash MX installed on my PC for about 1 year and a half I finally dediced to really try to learn Flash. For the first time today I learned how to use frames and layers, very different to Paint Shop Pro and Fireworks. I have a banner with motion tweens that I want to put on my site and I want to make it clickable, meaning that when users click on the banner they are taken to the page I specify. I clicked on the actions windows and can't see where should I start... I inserted getURL and every time I view the banner it automatically takes me to the URL I entered.

How do I make a banner clickable?

View Replies !    View Related
Text Buttons, How Do I Make The Whole Bit Clickable?
So, I created some text, broke it apart, effected it, and converted it into a symbol. Now, when the cursor is over the text, it only turns into a little clickable hand thing when it is directly over the stroke. How do I make it so that the general region of the navigation text is clickable, and not just the actual lines of the letters?

Thanks!

Roger

View Replies !    View Related
How To Make A Movieclip Clickable Under Another Clip
OK, I have a thumbnail menu that is initially hidden by another movieclip. When the user mousesover that topclip, it fades to 0 alpha, revealing the thumbnail menu (and when the user rolls out, the topclip fades in to 100 alpha). However, I find that when faded out, the thumbnail menu doesn't respond to actions...I thought reducing a clip to 0 alpha would essentially eliminate it from the stage? If not, how do I workaround this?

View Replies !    View Related
[F8] Load Pictures And Make Them Clickable
Hello! I made a class extending MovieClip, which I create in the 1st frame like:

PHP Code:




import MyClass;
pics = attachMovie(MyClass.id, "pics", 0);







This works. Now I want to load some pictures:

PHP Code:




pics.doInit();







and if a click occurs on one picture, the function onClickPic should be called:


PHP Code:




dynamic class MyClass extends MovieClip
{    static var id = (id="__Packages.MyClass ")+(Object.registerClass(id,MyClass )?"":"");

        public function    doInit():Void
    {    for (...
        {...    
            pPic = createEmptyMovieClip("pic"+nCount, nCount);
            pPic.loadMovie(sUrl); // sUrl: URL of a picture to be loaded
            pPic._x = ...
            pPic._y = ...
            pPic.onPress = this.onClickPic;
        }
    }
    
    public function onClickPic()
    {    trace("clicked");
    }    
}







The pictures are loaded and appear, but I can not click them.

What could be the problem?

View Replies !    View Related
[F8] How To Make A Dynamically Loaded JPG Clickable?
Hi all,

I've got an XML loaded image gallery with scrolling thumbs that, when a thumbnail is clicked, a larger image is loaded. However, I want to make it so the larger image is clicked, it launches a new window. I can post my AS but I just wanted to throw some feelers out there to see if anyone could help?

Thanks

View Replies !    View Related
How To Make Hover Over Buttons Clickable?
Hi,

I have the following problem:

I have a button which when you hover over displays 2 other buttons.
I want these button to be clickable, but as soon as the mouse leaves the first one, the two others disappear too quickly...

Sadly nothing I tried solved this, hopefully you know a easy solution!

Thanks!

View Replies !    View Related
[CS3] Way To Make Button Non-clickable When Your At Its Section?
Please take a look at this site I made, see how when you click on a pages button and you go to the page you can click the button again and it replays the page animation?

Is there some way to make a button stop working once your at the pages section?

The site
http://www.nitwr.com/

Thanks!

View Replies !    View Related
Make A Link From An Array Clickable
Hello guys...

I have this code which generates new movieclips based on content inside an array. I am able to to get the data in, but i don't know how to make my weblink (from array) clickable....

Below is the code if anyone could help me out:
----------------------------------------------------------------


activity = [
["22.–24. Juni", "Die große Kraftprobe", "info goes here" , "http://www.styrkeproven.no"],
["26. Juli – 4. August", "Olavfesttage", "info goes here" , "http://www.olavsfestdagene.no"],
["25.–29. September", "Kammermusikfestival", "info goes here", "http://www.kamfest.no"]
];

var nItems:Number;

var yPos:Number = 0;
var xPos = 20;


var h = createEmptyMovieClip("navn", _root.getNextHighestDepth());
var d = createEmptyMovieClip("info", _root.getNextHighestDepth());


nItems = activity.length;

for (var i = 0; i < nItems; i++ ) {

var t = h.attachMovie("mc_activity","mc_activity"+i,i+1);

t.mc_activity_date.theDate.text = activity[i][0];
t.mc_activity_text.theText.text = activity[i][1];
//do i have to insert the activity[i][3] to a textfield???

t._x = xPos;
t._y = yPos;
yPos = yPos + 40;

t.onRollOver = over;
t.onRollOut = out;
t.onPress = Press;

var p = d.attachMovie("mc_info","mc_info"+i,i+1);
p._x = xPos + 140;
p._y = t._y;
p.description.text = activity[i][2];
p._alpha = 0;
}



function over()
{
v = this.getDepth();
s = d.getInstanceAtDepth(v);
s._alpha = 100;

}

function out()
{
v = this.getDepth();
s = d.getInstanceAtDepth(v);
s._alpha = 0;

}

function Press()
{
//getURL (???????????);

}

View Replies !    View Related
How To Make Text Boxes Clickable
Greetings all. Just a quick question for all you experts:

I have a movie clip which has 3 different text boxes inside it. I want to make each text box clickable similar to a hyperlink in HTML (clicking on text box 1 takes you to one website, clicking on text box 2 takes you to another website, etc.). Right now my code is as follows:

ActionScript Code:
MyMovieClip.gotoAndStop(2);

MyMovieClip.TextField1 = "Click Here For Example 1";
                   
MyMovieClip.TextField1.onRelease = function(){
        getURL("http://www.somerandomwebsite.com");
}
               

MyMovieClip.TextField2 = "Click Here For Example 2";
MyMovieClip.TextField3 = "Click Here For Example 3";

So, you will see that I have 3 different text fields (labelled TextField1, TextField2, TextField3. Something is obviously wrong with my onRelease function, so my question is how can I make TextField1 clickable and send you to www.whatever.com when you click on it? Am I using the right approach in the first place? If not, please suggest an alternate method to do this. Thanks in advance!

-Eric

View Replies !    View Related
Make Dynamic Text Non-clickable
Hi Guys,

I need to learn how to make dynamic text non-clickable, like those in loaders. Any Ideas...?

Thanks in Advance

View Replies !    View Related
Make Dynamic Text Non-clickable
Hi Guys,

I need to learn how to make dynamic text non-clickable, like those in loaders. Any Ideas...?

Thanks in Advance

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved