ActionScript 2.0 :: Linking Dynamic Buttons To The Content

Jun 14, 2007

If I make buttons using....

[Code]...

I have the button tracing "this.digit" which is the number assigned to each button, can't make it link to the content. Do i need to "push" the number to an array...or similar?

View 1 Replies


Similar Posts:


Use SWF Address Deep Linking While Adding Dynamic Meta Content?

Aug 19, 2010

I have a flash site which reads deep links from the URL, then using c# asp.net we read the url and write the appropriate meta tags for the page being requested. [code]...

View 1 Replies

ActionScript 2.0 :: Dynamic Buttons And Their Content?

May 1, 2009

I have a solution for this already, but it involves a million if/else statements so I was wondering if there's a way around this. Here we go.I'm making an RSS reader that displays posts in Craigslist. All the info I need is loaded into flash and immediately tossed into arrays. Well take the links[] array for our example.

I count the amount of links
for(i=0;i<links.length;i++){
and I make my boxes to hold the info

[code]......

View 2 Replies

ActionScript 3.0 :: Can Buttons/assets Be Loaded Externally And Referencing Dynamic Content By Name

Jul 30, 2009

I have a widget containing a number of displayobjects, i.e. up arrows, down arrows, tab 'buttons', backgroundrectangularblocks, sliders, company logos etc.I am currently creating these displayobjects using the graphics class with parameters taken from an external file, things such as fontsize, font, colour, width, height e.t.c and adding them as children of "container" sprite objects for easy manipulation and referencing later can these assets be loaded in their entirety externally, rather than being created using graphics class draw methods (which I want to avoid) as some of the things I need to design cannot be created in pure actionscript very easily (if at all?), and then used or do they always have to be in the library and instantiated from there?

if the first question is yes they can be loaded externally, this question probably isn't needed; however, if I have to put the items in the library and recompile each time a client wants to use say a curved blue up arrow instead of a yellow one and then decides he wants a yellow circle instead then how do I write the code to do the following:-Say on my first ever compile I have 'upArrowBtnset1' in the library, I instantiate it and use the instance name to access it in the usual way using standard code,

upArrowBtnset1.addEventListener.... container.upArrowBtnset1.scaleY = .3 e.t.c

Now if they send me a second set of 'upArrow' graphics they want to use I could either update all the upArrowBtnset1 assets with the new graphics meaning the original set is no longer available to the client and I would either have to hold a "original set" FLA file with the first set of arrowbuttons or I could import these to the library as upArrowBtnset2 and a third set they send as upArrowBtnset3 and so on each time I am sent some new assets; I would then recompile them into the SWF and adjust the references to the new assets within the code. In the code, for each instance of "upArrowBtnset1" I would have to rename them to "upArrowBtnset2", recompile and send it back to the client.

Because I have already abstracted the font/colour/size choices out to an external file, they can change that as much as they like without a recompile which is what we want. The problem comes if they want to use set1 again and haven't kept the original "set 1" compiled SWF. It would be easier to abstract the 'setchoice' also to the external file. The SWF would over time build more and more available sets that they could use by just changing an external variable.

For example, if the designer wants to use set 1 on Monday, set 2 on Tuesday and set 3 on Wednesday I want to make it so they can just adjust an option in an external file to "setchoice = 3" for weds instead of either having to recompile the swf each time or they have to have 3 versions of the SWF for each asset set. The idea is that as more and more assets are added in, they have more and more choices. Ideally, in an external file there would be a list of assets and links to where they are loaded from. (i.e question 1 above).

If I have an external file (say XML) which holds the setchoice option that the designer wants to use (say they want set3 today) my 'generic' code has to be something like upArrowBtn(setchoice).scaleY and every instance in the code where that object is used I append the 'setchoice' as chosen by the designer from the external file where (setchoice) is retrieved from something like var setchoice:String = "set3"; from the external file (I am currently abstracting all the adjustable variables to a configuration.as file. I will work on using an XML later when the principle of external files works (I hope!);

Is it possible to import assets from external sources and then use them in the SWF as if they were in the library? The loader class? Is this just fraught with danger I wonder.

Essentially I am being asked to remove as much as I can from the SWF so that if the client wants to change the positioning of things on the stage or the text on buttons or change the style of the buttons or the company logo they don't have to come back to us to ask for a recompile of the SWF for each tiny adjustment. Inevitably SOMETIMES a recompile will be unavoidable (such as if they want the widget to suddenly be twice as wide (i.e. the stage). My code already handles some of this using stage.stageWidth and then positioning objects relative to other objects already on the stage using this value and centred so that just changing the document properties is all I would have to do and everything else adjusts proportionally. I am trying to make this as reusable as possible with as little effort from myself as possible to save our company wasted time.

After all that waffle, my question is this, if I can't load all my buttons and assets and things externally, how do I write the code for this:- I have a library asset called upArrowBtnset1 and another called upArrowBtnset2. Instantiated with say upArrowButtonset1 and upArrowButtonset2 The code would normally be upArrowButtonSet1.x = 100; upArrowButtonSet2.y = 300; but I need it to be upArrowButton(setchoice).x = 100; upArrowButtonSet2(setchoice).y = 300; where (setchoice) comes externally from var setchoice:String = "set1";How does the code change if the (setchoice) string was named not at the end i.e 'button(setchoice)UpArrow'?

ActionScript Code:
var numClips:Number = 5;
for (var i:Number = 0; i < numClips; i++)

[code]....

I need to do something like, getChildByName("mainTab"+i).addChild(myMovieClip) ? or maybe this["mainTab"+i].addChild(MovieClip)?Is it possible without using .name?

View 0 Replies

ActionScript 3.0 :: Linking To Content - Go To The File Via The FTP Address And Access It

Jan 25, 2009

I am building an e-learning module and including a movie. I have uploaded the move to an FTP site, and am now trying to find the URL of the file, but I cant. I am new to this so I'm sure I'm doing something wrong but I cant figure out what it is I am trying to use [URL] I can go to the file via the FTP address and access it that way, but not via the HTTP rout

View 3 Replies

ActionScript 2.0 :: Edit Dynamic Content And Modify The Content And Save It All Within Flash?

Oct 1, 2007

how it is possible to edit dynamic content and modify the content and save it, all within flash.I have tried some experiments in the past and have got the text to change etc which is easy but i need a way to save the content so the next time anybody sees the flash it will have the latest content until i change it again.

View 2 Replies

CS3 Next Buttons - Linking To Next Frame

May 20, 2009

I have got a very simple flash timeline, on each frame is a different page of a book. There is four pages alltogether. I am trying to create 'next' buttons so that the user can flick through the book.

This is the code I have used:

stop();
btn_1.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler1);
function mouseDownHandler1(event:MouseEvent):void {
gotoAndStop(2);

[Code]....

View 1 Replies

Buttons Not Linking Correctly?

Jul 7, 2009

This was created with frames in dreamweaver and the nav bar and index page movie are swf files. When you click on the pages in the nav bar it redirects to the index page. It does this the majority of the time and every now and again when you click it will go to the actual page.The way it is set up in dreamweaver, it has the nav movie in the top frame and the content in the bottom. All I did was change the old i.p address to the domain name because our host changed. I did nothing else and then this started not working correctly.I have checked and double checked all links in flash and they work from the swf but when it is loaded in the browser it does that weird linking to the index again. This is the code in flash to link to the pages:

on(release) {
getURL("http://www.fostersfreeze.com/Food.html","_top");
}

[code]....

View 4 Replies

Actionscript 3.0 :: Linking Buttons To SWF?

Aug 5, 2009

Is there a way to link a button to a .SWF file and if not is there a way to import an .fla file into a new scene of a different .fla file and then link the button to that scene? I am kind of a beginner to actionscript but I know some basics and am willing to learn.

View 1 Replies

ActionScript 2.0 :: Linking Buttons With MCs?

Apr 7, 2008

I'm having trouble figuring how to get the buttons to reference the correct imageBox and position the imageHolder. The imageHolder is a movieclip on the main stage and inside of that are a series of imageBoxes attached for each image. You can click on each image and the imageHolder will move and the images will enable and disable. If you click on a button the current image will fade but then return to 100% alpha. It's not completing the disableImages function.

You can view a swf of it HERE. Probably viewing it will be better than anything I can describe.

This is the actionscript for enabling and disabling images and for positioning the imageHolder: ActionScript Code:

function disableImages() {
for (i=0; i<imageTotal; i++) {
imageHolder["imageBox"+i].enabled = false;

[Code]....

View 3 Replies

ActionScript 3.0 :: Linking The Invisible Buttons?

Feb 18, 2009

I have created 3 invisible buttons over a graphic. Each has its own button layer and action layer. For each action layer I have used:

my_button1.addEventListener(MouseEvent.CLICK,clickHandler1);
function clickHandler1(event:MouseEvent):void{
navigateToURL(new URLRequest("

[code]....

When I test the movie I see the hand icon so I know it's an invisible button, but when I click on it, it goes out of the flash play like it wants to go to a browser, but nothing happens. When I upload the files I can see the hand icon again, but nothing happens when I click on the link. I tried the changing the .html file that it is housed in to an .htm file, but that didn't work either.

View 8 Replies

ActionScript 3.0 :: Linking Flash Buttons?

Aug 27, 2008

I am new to this. I have followed several tutorials with noluck. I am using action code 3. I want to link an invisible buttonto an url. I placed the code in the layer with the button.Thefollowing code I have used, but then follows the error message. Ican't figure it out.1180: Call to a possibly undefined method on.1120: Access of undefined property release1180: Call to a possibly undefined method getURL.

View 2 Replies

ActionScript 3.0 :: Buttons: Linking To Other Websites?

May 2, 2009

I am currently working on an outdoors project. You can view the website here to see what I mention below.
 
The problem I am running into is that I want the Yahoo, Camospace, and Myspace logos to link to their respective websites when clicked.
 
All of the current action scripts I have found do not work for me at all.
 
I am using Flash CS4 v10, action script 3.0

View 6 Replies

ActionScript 3.0 :: Linking Buttons To Scenes?

Nov 7, 2010

Im making a flash program about pancakes (random I know). I have a "Mainmenu" scene and then a "Recipe" scene. I have a button on my mainmenu which takes me to the recipe page when I click it, the code behind the button is

"stop();btn_recipe.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);function mouseDownHandler(event:MouseEvent):void { gotoAndStop(1, "Recipe"); }"

Then when I arrive at my recipe page I have a button which will take me back to my MainMenu, the code behind that button is:

"stop();btn_home.addEventListener(MouseEvent.MOUSE_DOWN, mouse5DownHandler);function mouse5DownHandler(event:MouseEvent):void { gotoAndPlay(1, "MainMenu"); }"

So I run my program and the first button works and takes me to recipe page but the button to get to the main menu does nothing, click it and no response or anything

View 3 Replies

ActionScript 3.0 :: Linking The Buttons To Pages?

Feb 9, 2011

I have laid out the four pages that I wish and have created a button for each page on each page.I was told a simple stop script would stop the pages acting like a movie.I entered:
 
14:00PM
stop(); 
function button1_clicked(e:MouseEvent) :void{    gotoAndStop("home");}
function button2_clicked(e:MouseEvent) :void{    gotoAndStop("about");

[code]....
 
which I was told would accomplish this and link the buttons to the relevant pages. When I test the movie the buttons start flickering as well as the images.....

View 2 Replies

ActionScript 2.0 :: Linking Buttons To Movieclips?

Jan 11, 2009

how to link moviclip to rotating buttons. the experiment button is working but do not know how to link the others.

View 1 Replies

ActionScript 3.0 :: Linking Buttons To Thumbnails

Oct 4, 2009

i'm just a newbie....i want to link a button to some moving thumbnails...this is the code

[Code]...

View 0 Replies

ActionScript 3.0 :: Buttons Linking To Only One Scene?

Jan 11, 2010

So I have 3 buttons. One button links to an animation, the second button links to a different animation, and the third one shows the links. The first button works properly, but when I click on the second button, it goes back to the animation that is shown at the first button. How do I fix this? Here is my code for the first button:

button2.addEventListener(MouseEvent.MOUSE_DOWN,mou seDownHandler);
function mouseDownHandler1(event:MouseEvent):void {
gotoAndPlay(1, "random");
}

I have made sure that the button's instance name is button2, and that the scene name is "random".

Here is my code for the second button:

button3.addEventListener(MouseEvent.MOUSE_DOWN,mou seDownHandler);
function mouseDownHandler2(event:MouseEvent):void {
gotoAndPlay(1, "random1");
}

View 2 Replies

ActionScript 3.0 :: Buttons Linking To Different Movieclips?

Mar 19, 2011

basically I had a situation arranged where when a button was clicked and flash would then display a certain image by jumping to a label on the timeline, and by clicking a different button a different image would be shown. this was working pretty well but for layout reasons I had to split these buttons and the timeline that they relate to up into separate movie clips. obviously the buttons dont do anything now, but what i'm hoping to find out is how I can link these items back up despite them being in separate movie clips. is this possible?

View 0 Replies

ActionScript 3.0 :: Linking Buttons To Movieclips?

Mar 27, 2012

1. I have very little flash experience, but have been tasked with creating a presentation.

2. I have decided that if each slide was a movie clip, it would keep my timeline tidy.

3. In the attached fla, you will see there are 2 slides, with (green squares) for buttons. The purpose of the button in the first slide is to advance to the second movieclip in the timeline and the purpose of the button in the slide2 movie clip is to go to and play the label "start" from the first movie.

However, nothing I do seemed to work. I'm hoping someone can talk me through it so I can replicate the button functions throughout the file for multiple movieclips / 'slides'

I've attached a txt file with the URL to where the .fla can be downloaded

View 9 Replies

ActionScript 2.0 :: Advanced Buttons Linking?

Aug 13, 2007

I have made some advanced buttons and want to use then to navigate to a different frame in the site this is what have

b1.onRelease = function() {
this.gotoAndStop(10);

View 1 Replies

ActionScript 3.0 :: Linking Pages Together Via Buttons

Jul 19, 2010

why my 3 pages are not being brought up when i 'ctrl enter'. I am making an online game with 3 pages - an instructions page, game screen and end game screen and do not know why my initial page is not opening.It is sending me the error message:Error #1010: A term is undefined and has no properties.at MainClass$iinit()[code]

View 1 Replies

ActionScript 3.0 :: Linking Buttons To Scenes

Feb 22, 2011

I am relatively new to Flash development. I have a scene that contains 3 buttons that are movie clips. I am trying to link each button to a seperate scene but no matter what script i use the buttons do not click through to the new scene.

Each scene consists of 20 frames that need to play when each button is clicked on, so rather than using gotoandstop i am trying to use gotoandplay to a specific frame within each of these scenes.

View 1 Replies

ActionScript 2.0 :: Linking Buttons To A Movieclip?

Jun 22, 2004

i have a movie in which i have 3 movieclips..lets call them MC1, MC2, MC3.In this movie i have 3 buttons linking to respective movieclips.but the button does not show any actionso far i have the actionscript on the button is:

on (press)
{
targetPath('MC1')

[code].....

View 2 Replies

ActionScript 2.0 :: 4 Buttons Aren't Linking Correctly?

Apr 22, 2009

It seems that my 4 buttons aren't linking correctly or something.I'm linking with labels, like this:

Code:
on (release) {
gotoAndPlay("intro");
}

The links go like this: Home, Photos, About Us, Contact Us.Here's what's wrong:

1.) If I click on About Us from the homepage, it goes to Photos instead.

2.) If I click on Photos while I'm on the Photos page, it goes to some unknown frame before the photos label, and stops where I don't even have a stop placed.

View 3 Replies

Buttons In My Drop Down Menu Aren't Linking

Jun 25, 2009

I made a drop down menu following the tutorial here. My problem is that the drop down buttons don't link to the respective scenes. Their rollover states work.

When I work on the drop down menu movie clip directly from the library, the button links work.[code]...

View 1 Replies

Linking Buttons Inside A Flash Movie

Aug 31, 2010

I'm currently attempting to link buttons to other frames in the movie. I've tried tutorials and just can't seem to get my code to do what I want. The issue is that the buttons are inside a movieclip, and I'm trying to link them to frames in the main movie (Scene 1).

View 6 Replies

Professional :: Cant Get Buttons To Work After Linking Back?

Jan 6, 2010

The buttons in the flash movie also link to movie frames in the flash and external html pages. Once movie plays and stops, all links work fine, the links to the anchors and the links to the other html pages, however when I try and link back to the flash movie from an external html page, to specific frames in the flash movie, the html link will link back to flash movie frame fine, however once your back in the flash movie, none of the buttons in the movie work anymore.I have embedded the flash movie in an HTML and published it with anchors,"home, about, events etc.used this code for several buttons in the flash linking to frame anchors in the movie:

///////////////////////////
home_btn.addEventListener (MouseEvent.CLICK, handler);
function handler (event:MouseEvent):void

[code]......

View 6 Replies

ActionScript 1/2 :: Error With Linking Flash Buttons

May 23, 2010

i m using flash  player 8 and when im trying to make a link button of my ready  tamplate im getting an error. i program the link action like this:
  
on(release) {
getURL("http://www.carmela-gallery.net");

 
but for some  reason i get this error when i press the check for errors button:
 
**Error** Symbol=About us, layer=Layer 1, frame=1:Line 1: Mouse events are  permitted only for button instances on(release) {Total  ActionScript Errors: 1      Reported Errors: 1
 
and of curse the link isnt  working when i test it. will be be happy if you help me to get forward  with this problem. let me know how we get forward with it.

View 8 Replies

Flash :: Professional - Linking Xml Links To Buttons

May 26, 2010

I am in a bit of a bind here i am struggling to link my xml links to flash buttons. Here is my xml:

[Code]....

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved