Dynamic Link Rollovers
I hope this is the right place to ask this. How can I add simple rollover effects (i.e. change color and underline) to linked text in a dynamically loaded text field? I'm using the new fCMS. I'm assuming this is done with the AS of the text field, but I have no idea how to do it. Thanks!
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 02-23-2006, 03:00 PM
View Complete Forum Thread with Replies
Sponsored Links:
Dynamic Rollovers - HOW?
This is a project from last year that I'm finally getting back too. My boss wants me to recreate the page peel ad effect like advertised here. http://www.peelawaycorners.com/deep-discount/
He doesn't want me to purchase the software but rather recreate the effect as a training exercise. So, I have created the animation but lack a few elements. The biggest issue is making the size of the rollover change.
The ad has a small rollover when you first see it. When you rollover it, it peels down. You can then click anywhere on the larger section. The problem is when you move your mouse off the small corner, the ad rolls back up. I need the size of the rollover to increase with the size of the ad so users can have their mouse anywhere on the ad without it rolling back up.
Any ideas??
View Replies !
View Related
Help With Dynamic Rollovers In AS3
im sort of a flash cs3 noob. i've been using flash 4 (believe it or not) forever and have much to learn about . so be please gentle.
so im trying to create a simple button that changes color when rolled over and and fades back to normal when the mouse leaves the hit button. simple enough.. i also want it to dynamically load an external jpeg so that i can use the same .swf file many times on one page so i only have to change the variable in the html, using javascript i think.
i think i'm half way there but i have 2 problems:
1) when my .swf loads i have to roll the mouse over the button for my external jpg to appear. once i do that it appears to work fine.. it just doesn't show up initially when it first loads.
2) i'm calling for the specific .jpg right in the actionscript code. i think i'd rather call for a variable so that i can use the same .swf over again for a different image.
so here's the code that i'm using.. if it helps i uploaded the .fla file, the before and after rollover images, and one .jpg file that i'm working with. thanks in advance to anyone who can help. i will be forever in your debt.
------------------------------------------------------------------------
import fl.transitions.*;
import fl.transitions.easing.*;
var images:Array = ["before.jpg", "after.jpg"]
// image 1
var image1:Loader = new Loader();
image1.load(new URLRequest(images[0]));
addChild(image1);
// image 2
var image2:Loader = new Loader();
image2.load(new URLRequest(images[1]));
image2.alpha = 0;
addChild(image2);
stage.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
stage.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
function mouseOverHandler(e:MouseEvent):void
{
image1.alpha = 0;
image2.alpha = 1.0;
}
function mouseOutHandler(e:MouseEvent):void
{
image2.alpha = 0;
image1.alpha = 1.0;
var myTween:Tween = new Tween(image2, "alpha", Strong.easeIn, 1, 0, 5, false);
var imageRequest:URLRequest = new URLRequest("bird.jpg");
var imageLoader:Loader = new Loader();
imageLoader.load(imageRequest);
addChild(imageLoader);
imageLoader.x = 10;
imageLoader.y = 10;
imageLoader.addEventListener(MouseEvent.CLICK, doSomething);
function doSomething(Event:MouseEvent):void
{
var _link:URLRequest = new URLRequest("http://www.google.com");
navigateToURL(_link);
}
}
View Replies !
View Related
Rollovers And Dynamic Content
I have a bunch of rollovers. What I want is each time you roll over one, it displays a different picture. I was told that instead of embedding the picture in the .swf, they should come in from outside the .swf in order to keep the file size small. Where do I start?
thanks
-jay
View Replies !
View Related
Why Are My Dynamic RollOvers Getting Stuck?
Why are my dynamic RollOvers and RollOuts getting stuck? Can you help? If you want to download the files go to www.e-twilley.com/organic.zip.
AS2:
#include "mc_tween2.as"
bg._alpha = 0;
organic_xml = new XML();
organic_xml.ignoreWhite = true;
organic_xml.onLoad = function(success) {
if (success) {
var pieces_xml = organic_xml.firstChild;
var total = pieces_xml.childNodes.length;
for (var i = 0; i < total; i++) {
_root.container.duplicateMovieClip("container"+ i,i);
aa = _root["container" + i];
_root.attachMovie("item", "item", 1000, {_x:100, _y:(10*i)+1, _alpha:0});
_root.item.duplicateMovieClip("item"+ i,i+100, {_alpha:0});
aa.inside.loadMovie(pieces_xml.childNodes[i].attributes.pic);
aa.xSlideTo(pieces_xml.childNodes[i].attributes.picx, 1.5, "easeInOutQuint", 0);
aa.ySlideTo(pieces_xml.childNodes[i].attributes.picy, 1.5, "easeInOutQuint", 0);
bg.alphaTo(100, 1, "linear", .3);
aa.id = i;
_root["shape" + i]._visible = false;
_root["container" + i].hitArea = _root["shape" + i];
aa.onRollOver = function(){
_root["item" + [this.id]].title_txt.text = pieces_xml.childNodes[this.id].attributes.mytitle;
_root["item" + [this.id]].price_txt.text = pieces_xml.childNodes[this.id].attributes.price;
_root["item" + [this.id]].text = pieces_xml.childNodes[this.id].firstChild.nodeValue;
_root["item" + [this.id]]._x = pieces_xml.childNodes[this.id].attributes.boxx;
_root["item" + [this.id]]._y = pieces_xml.childNodes[this.id].attributes.boxy;
_root["item" + [this.id]].alphaTo(100, .5, "linear");
}
aa.onRollOut = function(){
_root["item" + [this.id]].alphaTo(0, .05, "linear");
}
}
} else {
trace("Error loading organic.");
}
// clean up after ourselves
delete organic_xml;
}
XML:
<organic>
<rollover
mytitle="ORYZA TOP"
price="$88"
pic="images/oryza.png"
picx="270"
picy="0"
boxx="0"
boxy="7">This loamy hue makes us think of planting spring bulbs.</rollover>
<rollover
mytitle="TESS HARDING BLOUSE"
price="$218"
pic="images/tess.png"
picx="0"
picy="0"
boxx="275"
boxy="7">Milkweed pods puff silken strands into the wind; these silk ruffles do their best to follow suit.</rollover>
<rollover
mytitle="LAUREL CANYON BLOUSE"
price="$88"
pic="images/laurel.png"
picx="134"
picy="142"
boxx="340"
boxy="233">Is this the color of dawn touching the horizon, or the sun fading in the West?</rollover>
<rollover
mytitle="SALT SWIRL V-NECK"
price="$118"
pic="images/salt.png"
picx="268"
picy="314"
boxx="245"
boxy="218">Not at all unlike a patch of puffy cumulus clouds.</rollover>
<rollover
mytitle="CACAO FLOWER DRESS"
price="$448"
pic="images/cacao.png"
picx="0"
picy="203"
boxx="200"
boxy="282">Did you know you can pluck up to 60 cacao beans from a single fruit?</rollover>
<rollover
mytitle="SPOTTED CHIPPER WEDGES"
price="$378"
pic="images/spotted.png"
picx="437"
picy="89"
boxx="138"
boxy="120">Multi-season pieces are the talk of little birdies. Wear these with tights now, or pair with a floaty skirt when the mercury rises.</rollover>
<rollover
mytitle="THRUSH PEEP-TOES"
price="$278"
pic="images/thrush.png"
picx="269"
picy="483"
boxx="147"
boxy="383">Thrushes are migratory birds, noted for their beautiful songs.</rollover>
<rollover
mytitle="CIRCLE ART NECKLACE"
price="$248"
pic="images/circle.png"
picx="224"
picy="274"
boxx="147"
boxy="425">Circles symbolize renewal. This necklace is perfect to wear during spring, when nature is coming back to life.</rollover>
<rollover
mytitle="JOVIBARBA SATCHEL"
price="$365"
pic="images/jovibarba.png"
picx="475"
picy="373"
boxx="187"
boxy="468">Jovibarba is a genus of succulent plants and means "Beard of Jove," referring to the Roman god Jupiter.</rollover>
<rollover
mytitle="GLIMMERWOOD RING"
price="$128"
pic="images/glimmerwood.png"
picx="410"
picy="8"
boxx="118"
boxy="7">Chunky and eye-catching, this is the perfect unexpected finishing touch to a dressy outfit.</rollover>
<rollover
mytitle="SITAR BANGLE"
price="$258"
pic="images/sitar.png"
picx="0"
picy="140"
boxx="104"
boxy="130">In a brilliant play on textures, chunky wood harmonizes with gold and garnets.</rollover>
</organic>
View Replies !
View Related
How To Make Dynamic Text Rollovers?
yea this isnt totally impossible is it ? or maybe ive just been up too long working ..but can you get your dynamic text to have a rollover color? i have it so that i can control movieClips with dynamic text but i want the text to be like a button with a rollover effect ...solution?
thnx
nemo.
View Replies !
View Related
Rollovers For Dynamic Text Links
Hi Everyone,
So I've got a client who is asking for hover states on text links that are being created dynamically from either a .txt file, database or XML file (that hasn't been determined yet).
I've never had to play too much with dynamic text from external files other than some basic .txt file stuff. I know that you can use html and that gives you the basic html type link rollovers but I think my client would rather see something more graphic for the hover state.
My questions are these: 1) is this possible? 2) if so.. any ideas how? links to tutorials or articles would be great. Thanks in advance everyone.
slan,
Pat
View Replies !
View Related
Multiple Rollovers Using Dynamic Images
Hello anyone, everyone, someone........
I've got 12 buttons in my portfolio that are multiple rollovers...........when you hover over a button it changes color and a dynamic image pops up on the page next to it.
I used the Kirupa tutorial on loading dynamic images and it worked great in loading the image, the problem is when I hover OFF the button, the image stays put and won't unload........leaving me with an overlapping mess of images by the time all 12 buttons have been pressed/viewed.
I'm sure it's as simple as "unloadMovie" or something, but me being novice to Actionscript I can't make it work properly.
Here's the original code that works properly:
on (rollOver) {
loadMovie("portfolio1.jpg", "Web1");
}
Now what would the next statement be that would unload(?) the image from the page when I hover OFF the button?
Jay
View Replies !
View Related
Loading Dynamic Text On Rollovers & Parsing The Data.
Need Help,
I've been trying to call in text dynamically on rollover.
I just want to use one text document with multiple variables, and have multiple invisible buttons that access different variables in the text document as user rolls over. I did something similar to this in AS2. using LoadVarNum, but things are different in AS3.
I was able to load my TXT doc, but i only want it to show when data is called.
Get the btn's rollover working, but I'm stuck on how to parse out the data for the rollover.
// instantiate the URLLoader class
var loader:URLLoader = new URLLoader();
// Set the URLLoader's dataFormat property to the static constant shown
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
// load the text file, making sure the path itself is an instance of URLRequest
loader.load(new URLRequest("sample.txt"));
//btn. & listener w' rollover
cp_home_txt.addEventListener(MouseEvent.ROLL_OVER, over);
cp_home_txt.addEventListener(MouseEvent.ROLL_OUT, out);
//loading in parsed data text1
loader.addEventListener(Event.COMPLETE, function(evt:Event):void {
content_txt.text = evt.target.data.text1;
}
)
//I put a trace here for now, but i don't know what function should be in place to call data.
function over(evt:MouseEvent):void {
trace("over: " + evt.target.name);
}
function over(evt:MouseEvent):void {
trace("out: " + evt.target.name);
}
I want to eventually use an XML, but TXT docs are what I have now. Can someone out there please help?
Thanks
JD
View Replies !
View Related
Can Dynamic Text Have An Embedded Link? Or HTTP Link?
I'm using the Flash scroll bar componet, which uses dynamic text, and I want to link part of my dynamic text to a specific frame in my moive. - Is it possible?
- I've tried and it doesn't allow the 'Go TO' funcion.
so,
I created another HTML page and SWF to display the specific SWF screen that I want to show up - now I'm trying to link my dynamic text to '_self' so that when the link is clicked it will look like it is in the same site.
When I use the dynamic text and create the link, it appears to be ok/workable in the Properites panel, but when published, it doesn't work.
View Replies !
View Related
RollOvers Whos Parents Also Have Rollovers
I'm creating a self-hiding nav bar like the Start bar on Windows when it is set to auto-hide.
I have it set to retreat onRollOut, the problem is, when I roll over one of the menu items, it triggers the onRollOut of the parent bar and it retreats.
Any suggestions on how to handle this?
View Replies !
View Related
Dynamic Link Inside Of Dynamic Menu
hello, I am having a problem adding links dynamically inside of a menu that was created dynamically. Look here to see the movie. All of the menus are created dynamically with a for loop iterating through an array. As each menu is created I want the links to be created also. For this i have used nested for loops. My problem is labeling the link text. Here is all of my code.
ActionScript Code:
stop();
function default_location(){
topX = 10;
topY = 5;
bottomX = 10;
bottomY = 590;
bar._x = topX;
bar._y = topY;
}
default_location();
//number of menus
var numMenus = 6;
var menuTop = new Array();
var locationY = 5;
var locationX = 10;
//define the menu headings
var top0 = "New Home Buyer Program";
var top1 = "Franchise Opportunities";
var top2 = "Broker/Realtor Program";
var top3 = "Mortgage Broker Program";
var top4 = "Home Builder Program";
var top5 = "Company Info";
var menu0 = new Array();
//New Home Buyer Program Menu Items
menu0[0] = ["Get the Home of Your Choice Now", "www.nhba.com"];
menu0[1] = ["The NHBA Application Process", "www.nhba.com"];
menu0[2] = ["Find an Office", "www.nhba.com"];
menu0[3] = ["Complete an Application", "www.nhba.com"];
menu0[4] = ["Check the Status of Your Application", "www.nhba.com"];
menu0[5] = ["Available Property Specials", "www.nhba.com"];
//Franchise Opportunity Menu Items
var menu1 = new Array();
menu1[0] = ["The NHBA Franchise Experience", "www.nhba.com"];
menu1[1] = ["NHBA for the Franchisee", "www.nhba.com"];
menu1[2] = ["Exclusive Tools and Technology", "www.nhba.com"];
menu1[3] = ["FAQ's/Resources", "www.nhba.com"];
menu1[4] = ["Franchise Facts", "www.nhba.com"];
menu1[5] = ["Discovery Days Registration", "www.nhba.com"];
menu1[6] = ["Franchise Testamonials", "www.nhba.com"];
menu1[7] = ["Apply to be a Franchsie", "www.nhba.com"];
//Broker/Realtor Program Menu Items
var menu2 = new Array();
menu2[0] = ["What Brokers & Realtors Need to Know", "www.nhba.com"];
menu2[1] = ["NHBA for the Realtor", "www.nhba.com"];
menu2[2] = ["Request Information", "www.nhba.com"];
//Mortgage Broker Program Menu Items
var menu3 = new Array();
menu3[0] = ["What Mortgage Brokers Need to Know", "www.nhba.com"];
menu3[1] = ["NHBA for the Mortgage Broker", "www.nhba.com"];
menu3[2] = ["Request Information", "www.nhba.com"];
//Home Builder Program Menu Items
var menu4 = new Array();
menu4[0] = ["What Homebuilders Need to Know", "www.nhba.com"];
menu4[1] = ["How Lease-to-Own Works for You", "www.nhba.com"];
menu4[2] = ["Request Information", "www.nhba.com"];
//NHBA Company Info Menu Items
var menu5 = new Array();
menu5[0] = ["Company Overview", "www.nhba.com"];
menu5[1] = ["Contact Us", "www.nhba.com"];
menu5[2] = ["Management Team", "www.nhba.com"];
menu5[3] = ["Corporate Media Kit", "www.nhba.com"];
menu5[4] = ["What People are Saying", "www.nhba.com"];
menu5[5] = ["Pride in Partnership", "www.nhba.com"];
menu5[6] = ["Privacy & Security Policies", "www.nhba.com"];
menu5[7] = ["Site Map", "www.nhba.com"];
var numMenusLeft = numMenus;
//Create the Menus
for(i=0; i < numMenus; i++){
bar.duplicateMovieClip("bar"+(i), i+1);
_root["bar"+(i)]._y = locationY; //sets the initial location
locationBottom = bottomY - (28*numMenusLeft); //sets the bottom location
menuTop[i] = [locationY,locationBottom,_root["top"+(i)]];//assigns the menuTop array with the instance info
_root["bar"+(i)].menuName_txt = menuTop[i][2];
_root["bar"+(i)].name = "bar"+(i);
_root["bar"+(i)].id = i; //assigned id as array index (id = 0, 1, 2....)
_root["bar"+(i)].up = true;
locationY += 28; //increment locations for next menu
numMenusLeft-=1;
var len = _root["menu"+(i)].length;
//trace(len);
var linkY = 45;
var obj = new Array();
x = i;
for (j=0; j<len; j++){
//THIS IS THE PART THAT IS NOT WORKING
obj[j] = _root["bar"+(i)].link.duplicateMovieClip("link"+(j), j);
//_root["bar"+(i)].createEmptyMovieClip("mc"+j, j);
//["mc"+(j)].createTextField("txt", j, 0, linkY, 130, 40);
trace(obj[j]);
//IT DOESNT ASSIGN THE TEXT TO THE LINK
obj[j].link_button.link_text.text = _root["menu"+(i)][j][0];
obj[j]._y = linkY;
linkY += 30;
}
_root["bar"+(i)].link._visible = false;
//trace(obj.length);
for (k=0; k<obj.length; k++){
trace("Link:"+k+obj[k]);
}
}
_root.bar._visible = false;
function moveMenus(button_id){ //button id is coming in as the array index (0,1,2...)
//loop through all of the menus
for (i=0;i<=(menuTop.length - 1); i++){
if(i<button_id){
if (_root["bar"+(i)].up == false){
easeUp(i)}
}else if(i == button_id){
if (_root["bar"+(i)].up == false){
easeUp(i)}
}else if (i>button_id){
if (_root["bar"+(i)].up == true){
easeDown(i)}
}
}
}
/*This is how to use the MX easing tween:
var tabUp = new mx.transitions.Tween(movieClip, "_y", mx.transitions.easing.Bounce.easeOut, beginCordinate, endCordinate, time);
*/
function easeUp(menu) {
var tabUp = new mx.transitions.Tween(_root["bar"+(menu)], "_y", mx.transitions.easing.Strong.easeOut, menuTop[menu][1], menuTop[menu][0], 12);
_root["bar"+(menu)].up = true;
}
function easeDown(menu) {
var tabUp = new mx.transitions.Tween(_root["bar"+(menu)], "_y", mx.transitions.easing.Strong.easeOut, menuTop[menu][0], menuTop[menu][1], 24);
_root["bar"+(menu)].up = false;
}
Any help would be MUCH appreciated.
View Replies !
View Related
Dynamic Link
Recently I was able to create dynamic text in a Flash movie using ColdFusion as the backend. Can anyone help me in creating a dynamic link to go along with it?
Thanks,
Ed
View Replies !
View Related
Dynamic Link? - Is It Possible?
Is it possible to have an array fill a get url call?
such as (which isn't working. How would one re-write this line so it acutallly works?)
code:
PrntLnkMC.onPress = function() {
getURL("images/IMG_"+myPhotos[numIndex]+".jpg",_blank);
}
The myPhotos[numIndex] is coming from script within the movie.....
any suggestions?
View Replies !
View Related
Dynamic Link
Hi,
I have an applicaiton to make in which i have to present dynamic links in flash. The links will be coming in from the database and thier number can vary. The data is coming in trhough an asp file.
My question is that, is that possible to create an applicaiton like this?. If yes then how?. what components will be used? remember i need to give caption of the links and on the back end actuall link path will be defined.
Please reply soon
Shamail.
View Replies !
View Related
Dynamic Link
I'm using a modified script I found on-line as my first venture into the duplicateMC world. (I need to build a shopping cart so I though this would be a good start).
This is the script below.
if (enregistrement >8) {
num = "8";
nextbouton = "ok";
} else {
num = enregistrement;
nextbutton._visible = 0;
}
xstart = "10";
n = 1;
while (n<=num) {
o = "url"+n;
newNamelink = eval(o);
P = "title"+n;
newnametitle = eval(p);
D = "desc"+d;
newnamedesc = eval(p);
// ......................
duplicateMovieClip("Mclink", "Mclink" add n, n);
setProperty("Mclink" add n, _y, 10.0+n*40);
set("this.Mclink" add n add ".mylink", newNamelink);
set("this.Mclink" add n add ".mytitle", newnametitle);
set("this.Mclink" add n add ".mydesc", newnamedesc);
set("this.Mclink" add n add ".myid", n);
n = n+1;
}
setProperty("Mclink", _visible, 0);
stop();
Now within the movieclip Mclink everything works fine and there is a button called bttnlink that has the following code inside.
on (release) {
getURL(mylink, "_blank");
}
Now the link works when a leave a text field to display the variable mylink in the Mclink movie clip that is being duplicated however the minute I remove it so that the user doesn't see the url but merely get's directed to the site when clicking It no longer works. Is there a specific way to target the bttn that I'm missing?
Any help would be greatly appreciated.
View Replies !
View Related
Link In Dynamic Txt Box
Hi,
I have dynamic txt boxes with scrollbars. I know how to link txt to an URL, but don't know if we can use "gotoAndPlay" as with button for text in dynamic txt box?
I don't want to create a hundred buttons since I have very long list in my dynamic txt boxes
Thanks for reply.
View Replies !
View Related
Dynamic Link?
I'm trying to create a dynamic link section, that will pull a message Title and Link from a database, and display the Title (which will link to the link when clicked). I have it displaying the title properly, but I don't know how to make the actionscript link the Title to the dynamic link. Here's the code I have so far (I'm sure it's not perfect ) The getURL area (8 lines up from the bottom of the code) is the area I'm needing help with. I tried telling it to link to "link" and "linktxt" but neither worked...so I'm doing something wrong. I also tried making a variable var dynLink = link and putting dynLink in the getURL code, but that didn't work either. These were all just guesses, since I've never needed to do this with actionscript yet.
Code:
theNews = new XML();
theNews.ignoreWhite = true;
var fadeTime = 1000// in milliseconds;
var defaultHex = 0x0066CC;
theNews.load('/admin/web_stories/xml.php'+"?cK="+random(9999)+1);
function Article( id, title, link){
this.id = id;
this.title = title;
this.link = link;
};
Color.prototype.setTint = function (r, g, b, amount) {
var trans = new Object();
trans.ra = trans.ga = trans.ba = 100 - amount;
var ratio = amount / 100;
trans.rb = r * ratio;
trans.gb = g * ratio;
trans.bb = b * ratio;
this.setTransform(trans);
}
Article.prototype.putOut = function(titletxt, linktxt){
_root[titletxt].htmlText = this.title;
_root[linktxt].htmlText = this.link;
};
function articleOut(xml){
_global.numArts = xml.firstChild.childNodes.length-1;
info = xml.firstChild.childNodes[at].attributes;
link = xml.firstChild.childNodes[at].firstChild.firstChild.nodeValue;
// trace(body);
link = link.split("
").join("
");
// trace(body);
currArticle = new Article(info.id, info.title, link);
currArticle.putOut("titletxt","linktxt");
delete currArticle;
delete info;
}
trace(_root._width);
theNews.onLoad = function(){
_root.gotoAndStop("noload");
articleOut(this);
at = numArts;
articleOut(this);
_root.createEmptyMovieClip("menu", 1000);
items = this.firstChild.childNodes;
to = Number(items.length-1);
for(a = 0; a>= -to; a--){
_root.menu.attachMovie( "menuItem", "item"+a, a);
_root.menu["item"+a].nametxt.text = items[to-(-a)].attributes.title;
_root.menu["item"+a]._y = -23*a;
_root.menu["item"+a]._y += 35;
_root.menu["item"+a]._x = 780-665;
_root.menu["item"+a].itemConst = Number(items[0].attributes.id)-1;
_root.menu["item"+a].itemNum = to-(-a);
_root.menu["item"+a].onRollOver = function(){
var colorful = new Color (this.background);
colorful.setTint(95,95,95, 100);
}
_root.menu["item"+a].onRollOut = function(){
var colorful = new Color (this.background);
colorful.setTint(70,70,70, 100);
}
_root.menu["item"+a].onRelease = function(){
getURL(link);
at = this.itemNum;
_root.articleOut(theNews);
}
}
_root.myScroller.scrollTarget = _root.menu;
}
articleOut(theNews);
View Replies !
View Related
Dynamic Link
hi! im trying to do a dinamic link for my dinamic thumbs gallery. But i dont know how to propagate it .
here is my function for my show next button
PHP Code:
//
rows = 3;
itemheight = 80;
itemx = 5;
//
starty = (rows*itemheight)/-2;
topb = _height/-2;
bottomb = _height/2;
easingstyle = "my_easing_here";
easingduration = .5;
//
clips = [];
items = [];
mc = [];
//
init();
//
function init() {
currentid = 0;
content_mc.setMask(mask_mc);
var sty = starty;
for (var i = 0; i<rows; i++, sty += itemheight) {
clips.push(content_mc.attachMovie("ListBoxItem_mc", "item"+i, i, {_x:itemx, _y:sty}));
}
}
//
function addItem(label, data) {
if (items.length<rows) {
clips[items.length].resize_btn.onRelease = function() {
_root.container.profile.loadMovie("profile/profile"+[data-1]+".swf");
};
clips[items.length].holder.attachMovie("foto"+[items.length]+"_mc", "foto"+[items.length], [items.length], {_x:28, _y:20});
//aki tambien
clips[items.length].txt_mc.label_txt.text = label;
clips[items.length].id = items.length;
}
items.push({label:label, data:data});
}
function shownext() {
if (currentid+1>items.length-rows) {
return;
}
function reorder() {
var sty = starty;
var i;
for (i=0; i<rows; i++, sty += itemheight) {
if (i<rows-1) {
clips[i]._y = sty;
} else {
clips[i]._y = bottomb;
clips[i].tween("_y", sty, easingduration, easingstyle);
}
var currentd = items[currentid+i].data;
clips[i].resize_btn.onRelease = function() {
_root.container.profile.loadMovie("profile/profile"+[currentd]+[currentid+i]+".swf");
};
clips[i].txt_mc.label_txt.text = items[currentid+i].label;
clips[i].holder.attachMovie("foto"+[currentid+i]+"_mc", "foto"+[currentid+i], [currentid+i], {_x:28, _y:20});
clips[i].id = currentid;
}
}
currentid++;
clips[0].tween("_y", topb-itemheight, easingduration, easingstyle, 0, reorder);
var sty = starty;
for (var i = 1; i<rows; i++, sty += itemheight) {
clips[i].tween("_y", sty, easingduration, easingstyle);
}
}
function showprev() {
if (currentid-1<0) {
return;
}
function reorder() {
var sty = starty;
var i;
for (i=0; i<rows; i++, sty += itemheight) {
if (i>0) {
clips[i]._y = sty;
} else {
clips[i]._y = topb;
clips[i].tween("_y", sty, easingduration, easingstyle);
}
var currentd = items[currentid+i].data;
//HERE IS MY PROBLEM ! I CANT GET A DINAMIC VALUE THAN PROPAGATE IN 3 ROWS
clips[i].resize_btn.onRelease = function() {
_root.container.profile.loadMovie("profile/profile"+[currentid+i]+".swf");
};
clips[i].txt_mc.label_txt.text = items[currentid+i].label;
clips[i].holder.attachMovie("foto"+[currentid+i]+"_mc", "foto"+[currentid+i], [currentid+i], {_x:28, _y:20});
clips[i].id = currentid;
}
}
currentid--;
clips[rows-1].tween("_y", bottomb, easingduration, easingstyle, 0, reorder);
var sty = starty+itemheight;
for (var i = 0; i<rows-1; i++, sty += itemheight) {
clips[i].tween("_y", sty, easingduration, easingstyle);
}
}
View Replies !
View Related
Link Dynamic URL
I am finding it difficult to word this and I hope I get it across OK. Plus it's late as usual.
My swf file is stored on the web server in say /images/swf/my_swf.swf
The web page I want to link to is stored in the same folder /images/swf/My_Page.htm
So if my_swf.swf is embedded in say Original.htm page in the /images/swf/ directory. When the visitor to Original.htm Clicks on the Button_btn they will be linked to the My_Page.htm with the following code.
ActionScript Code:
_root.Button_btn.onPress = function () {getURL("My_Page.htm", "mainFrame");}
My Problem is this. I have to store the My_Page.htm and the my_swf.swf where they are but the Original.htm is else where and has a number of other .swf's on it. So now when the Vistor click on the Button_btn the link tries to find the My_page.htm in the root of the Original.htm
How can I make the link in the my_swf.swf force the link to read from the root of the swf rather than the Original.htm?
Did that make sense
Cheers BaNa
g'night
View Replies !
View Related
Dynamic Link
Is it possible to put a link in a button dynamically? Loading via XML or Text file?
Any samples or any links that i can view.. thanks and regards to all...
View Replies !
View Related
Link Dynamic URL
I am finding it difficult to word this and I hope I get it across OK. Plus it's late as usual.
My swf file is stored on the web server in say /images/swf/my_swf.swf
The web page I want to link to is stored in the same folder /images/swf/My_Page.htm
So if my_swf.swf is embedded in say Original.htm page in the /images/swf/ directory. When the visitor to Original.htm Clicks on the Button_btn they will be linked to the My_Page.htm with the following code.
ActionScript Code:
_root.Button_btn.onPress = function () {getURL("My_Page.htm", "mainFrame");}
My Problem is this. I have to store the My_Page.htm and the my_swf.swf where they are but the Original.htm is else where and has a number of other .swf's on it. So now when the Vistor click on the Button_btn the link tries to find the My_page.htm in the root of the Original.htm
How can I make the link in the my_swf.swf force the link to read from the root of the swf rather than the Original.htm?
Did that make sense
Cheers BaNa
g'night
View Replies !
View Related
Dynamic Link
I am attempting to generate dynamic text that links to a scene and can't figure out the actionscript code, does anyone have any ideas? Thanks in advance.
View Replies !
View Related
Dynamic Link
Hi
I am doing a search page and when the results come in i dispaly 10 or so per page.
I dynamicly pull in the data through AMFPHP and so i have an array. The page numbers is also dynamicly created. Somehow i need to link the page number and the number in the array.
PHP Code:
function createPageLabels(noPages) {
x2 = 200;
d2 = 30;
pageVal = 1;
while (noPages>0) {
trace("creating page number");
_root.createEmptyMovieClip("canvas_mc", d2);
canvas_mc.createTextField("page", d2, x2, 573, 15, 18);
canvas_mc.page.text = pageVal;
canvas_mc.page.setTextFormat(pageTextFormat);
// starting the new page function
canvas_mc.onRelease = function(pageVal) {
trace("onRelease called");
trace("");
d = 13;
n = 1;
y = 230;
x = 50.3;
volumesLoop(i,a,n,x,y,d);
};
// end of the new page function
noPages--;
pageVal++;
d2--;
x2 = x2+15;
}
}
a = the array number
volumesLoop is the function that puts the results on the page
how do i set a = to the page number when you click on it. You cant just say
"a = pageVal" i have tried that.
Can anyone help please?
Hanu
View Replies !
View Related
Ahhhhhhhh....dynamic Txt Link?
Hi everyone,
posted this one at newbies but got no reply.....lets try again
I have a dynamic txt box in wich I load a external txt file. I wonder if it is possible to add links that point direct to Flash (so no ahref)
tanks alot
View Replies !
View Related
URL Link In Dynamic Text?
I need help with putting a URL link inside a dynamic text field. I tried to check the HTML box in the dynamic text tab and then I set the variable I was using for the text to have the html in it and then nothing came up. All I want to do is have a varible capable of setting itself to a different link according to a variable definition earlier. Help!!!! I don't know much about putting HTML in dynamic text boxes with variables.
View Replies !
View Related
Dynamic Link Change.....
I have a button on my site that i will change the link of everyonce in a while. How whould i change the url of it from an outside .txt file? i can do this w/ dynamic text fields using the loadVariables function, but when i try to implement it into the button, it never works.
here is some code i use:
in the frame actions:
Code:
loadVariables ("updates.txt", "");
in the button properties:
Code:
on (release) {
getURL (link, "_blank");
}
in updates.txt:
&link=http://www.thissite.com
why don't it work?
View Replies !
View Related
Link In Dynamic Text
Hello, is that possible to make a variable contain a link and then load it into a text field?
I've tried the following :
VarText = "<a href="http://www.site.com>Site</a>"";
But that didn't work because of the second " that end the variable.
Is that possible to have a variable containning a "? Maybe theres a character that I can put in front of the " to tell that it's not the end of the declaration and that I want the " in my variable?
What I want to do is insert a dynamic link into a text field, anybody knows how to do it?
View Replies !
View Related
Dynamic Text Box Link?
ok i've data coming from a data base onto this page:
http://ijsr32.infj.ulst.ac.uk/~10214.../dj_names.html
some names have links to mixes ont hem, e.g DJ Ryan
What im wondering is can i make the data in the text box a link? automatcially,
E.g : when u click on DjRyan his mix is a link, but when you click on JamesL his mix becomes a link
u get me? any help will be great!
thanks!
View Replies !
View Related
Dynamic Text Link
hi,
I'm try to make a link inside a dynamic text box, box have the option render as html and i use this code:
... funcionamento em <A HREF="situação"></A HREF> de rotina, ocasional ... (not english, sorry), but the word "situação" must be a link (open a external movie), why this dont work?
help me pls
View Replies !
View Related
Link Within Dynamic Text...
i load my text from external txt files, but they're quite big. When loaded, is there a possibility to use buttons that link to specific point of the loaded text so that the user doesn't have to scroll all the way down to the point they want...
View Replies !
View Related
How Do I Get The Value Of A Dynamic HTML Link?
Ok, I'm loading an extenal HTML formatted text file with links. I need to be able to "see" what the actual URL is they are clicking on.
For example:
If they click on College of Nursing from this link: "<a href="http://www.sc.edu/nursing/">College of Nursing</a>"
I need Flash to report back to me the actual URL "http://www.sc.edu/nursing/".
It launches the page just fine, I need the feedback of the actual URL so I can pass it to Director. I'm using MX2004 on both programs.
Thanks!
-Paul
View Replies !
View Related
How Do I Get The Value Of A Dynamic HTML Link?
Ok, I'm loading an extenal HTML formatted text file with links. I need to be able to "see" what the actual URL is they are clicking on.
For example:
If they click on College of Nursing from this link: "<a href="http://www.sc.edu/nursing/">College of Nursing</a>"
I need Flash to report back to me the actual URL "http://www.sc.edu/nursing/".
It launches the page just fine, I need the feedback of the actual URL so I can pass it to Director. I'm using MX2004 on both programs.
Thanks!
-Paul
View Replies !
View Related
Dynamic Link Problem
Hi Friends,
i m receiving a message text dynamically from a XML file. i want to make a link that when i click on this link, this message would show in a text field. can u plz help me....
thats my silly try......
news += "<a href='"+articles[i].link+"'>"+articles[i].headline+"</a>";
View Replies !
View Related
Dynamic Text With Link
i have a dynamic text box and i want to add a link to just a few words...i want the link to open a new window with pixel height and width that i determine...i know thats javascript but i can never really figure out how to do it right and this time i have no idea how to add that sort of script to a peice of dynamic text...i hope thats clear..please help
View Replies !
View Related
How To Link Dynamic Text
Hi. Very new to Flash - using Flash 8 Pro. I have a meeting this afternoon to throw around some ideas for using Flash on a website, and I'm in a crunch to figure out something that's probably pretty basic.
If you take a look at the .swf, my country map currently serves two functions:
1. rollover button displays some text information in a dynamic text box, when you mouseout it disappears.
2. clicking on the button takes you to the corresponding website.
My idea is to keep the mouseover/out as it is, but when you click on the button, it will keep the text visible in the dynamic text box, and the name of the school (text) will be the link instead. So once you click on the button, you can mouse over the text link and go to the website. (the button will also stay in it's green clicked state until you click on another button.)
My main question is how to make the text I'm sending to the text box in action script a link. I'll keep searching on here (just found out why my HTML pages don't load locally with Player 8), but if anyone can point me in the right direction I would appreciate it.
Thanks!
View Replies !
View Related
[mx04] Dynamic Link Help...
hi i have a site with external .txt files that upload dynamically. i have this code
<a href="http://www.flashkit.com">my link</a>
to create a link but i want to make it a different colour or even bold so it stands out amongst the text, i also want the link to open in its own window, at the moment its opening within my current flash site at that size, which i dont want...
can anybody help me pleeeeease
thanks alot
View Replies !
View Related
[F8] Dynamic Textbox Link
Hey Guys,
I'm working on a project that requires the user to click a dynamic textbox. When they click on the text in the dynamic textbox it brings up a movieclip from the library!! So my question is can a dynamic textbox have the attachmovie functionality, like a link, or can it bring in an external .swf file? ex: click a dynamic textbox or the link inside the textbox and bring in a movieclip from the library or an external .swf file.
thanks,
wlsn18
View Replies !
View Related
[CS3] Dynamic Link Loading
hi
i was wondering as to how to put a variable into a url.
I know this is wrong, but if some one could help me.
here are two examples of what i'm tryin to do.
Eg1:
================
Code:
on (release) {
loadVariablesNum("dyn_vars.txt", 0);
getURL("http://" + dynUrl, "_blank");
}
.......and inside dyn_vars.txt
dynUrl=google.com
-----------
Eg2:
======================
Code:
on (release) {
loadVariablesNum("dyn_vars.txt", 0);
loadMovieNum("['dynUrl']", 0);
}
...... and inside dyn_vars.txt
dynUrl=test.swf
--------------------
I know this is probably totaly wrong but i just need to know how to put a variable into a url.
View Replies !
View Related
[CS3] Dynamic Text URL Link
Thank you for your interest in my post!
My problem is trying to create a url link within my .txt file that loads dynamically into my Flash movie. Is there some html coding involved? If this is possible, will it be possible to do dynamic e-mail link too?
Thanks!
View Replies !
View Related
Flash8 & Php : Dynamic Value In Link
Hi friends,
I am trying to load simple image into flash through dynamic value from php.
PHP Code:
//fileA.php
<a href="fileB.php?image=image.jpg” target="_blank">ViewImage</a>
......
PHP Code:
<?
//fileB.php
$imageN=$_GET["image"];
echo "imageX=$imageN";
?>
<object classid="…..">
<param name="movie" value="imageX.swf" />
<param name="quality" value="high" />
<param name="FLASHVARS" value="imageX =<?=$imageN;?>">
<embed src="imageX.swf" flashvars="imageX =<?=$imageN;?>"></embed>
</object>
......
//imageX.fla
myLoadVars = new LoadVars();
myLoadVars.load("fileB.php");
myLoadVars.onLoad = function(success) {
if (success) {
trace(this.vk);
this.createEmptyMovieClip("thePic", 10);
loadMovie("gallery/images/"+this.imageX, thePic);
thePic._x = 20;
thePic._y = 20;
}
}
//Code Ends
On loading fileB.php result I get is “undefined”. Please help me to get the things right.
Thanks,
View Replies !
View Related
Dynamic Link Problems
Hello,
I'm trying to edit code i found that creates a dynamic list of links. The original loads a webpage via geturl, and i managed to tweak it so it loads external swf's in a container. So far so good. I wanted to mask the links to make the menu a bit more fancy, but the dynamic buttons(text) couldnt be covered or masked. So i found the simple solution by placing the menu in a movieclip and mask the movieclip. But now the swf's that are being called from the movieclip won't load anymore!!! And i can't seem to find the problem. I added a setproperty line that makes another mc disappear from the main to see if the code is disfuntioning as a whole, but that worked. So it has to be something who the swf's are being called.
So here is the code sets the links
Code:
text1 = "CARTE BLANCHE";
link1 = "mo/mo.swf";
text2 = "DJ MIX-IT";
link2 = "mix/media.swf";
Here the code that checks the number of links
Code:
n = 1;
while (length (eval("link" add n))>1) {
n = Number(n)+1;
}
total = n-1;
1 àä àä ode that makes the buttons
Code:
n = 0;
while (Number(n)<Number(total)) {
n = Number(n)+1;
dup = "button" add n;
duplicateMovieClip("button", dup, n);
setProperty(dup, _y, 14+n*22);
set("button" add n add ":linkname", eval("text" add n));
setProperty("button" add n add "/over", _visible, false);
}
stop();
Here the code that calls the swf's
Code:
on (rollOver) {
setProperty("over", _visible, true);
}
on (release, releaseOutside) {
// extract button number
n = substring(getProperty("", _name), 7, length(getProperty("", _name))-6);
location = eval("/:link" add n);
_root.ContainerClip.loadMovie("" add location);
}
on (rollOut) {
setProperty("over", _visible, false);
}
So i think it has to be in the last section. It woks in a main timeline, but not in a moviecli0
View Replies !
View Related
[F9] Dynamic Text URL Link
Thank you for your interest in my post!
My problem is trying to create a url link within my .txt file that loads dynamically into my Flash movie. Is there some html coding involved? If this is possible, will it be possible to do dynamic e-mail link too?
Thanks!
View Replies !
View Related
Dynamic Link With Xml Loading...
Ok, I have a featured news portion on my site. In the news via XML, I load an image and some caption text. Now I want to put a link in there with an id, so when I go to the next page, I can pull up the appropriate article.
Similiar to php link... index.php?id=34 but I want to do this in flash?
Any idea on how to do this?
View Replies !
View Related
|