ActionScript 2.0 :: Asfunction Breaking The Scroll Buttons?
Jun 15, 2005
when my asfunctions are called from text loaded in from xml, it stops my up and down scroll buttons working properly (when you click on the scroll button and then release it, you have to move the cursor by at least 1 pixel before the button will work again).
I've gotten to chapter 5 in my AS 3.0 classroom book but I need to use wisdom today (CHAPTERS before I gain it for myself),I need to create a custom scroll bar with buttons that function just like the UIScrollBar but more visually suited to our projects. the boss demands it.
I found several tutorials on creating the custom scrollBar, however, they don't include the buttons and I'm unable to find a tutorial on how to create a button scroller (I figured I could link them both to my "info_txt" after creating them separately). how to create an AS3 text scrollBar WITH buttons? how to create a nice scroll effect with buttons(if creating the scroll bar and buttons apart then linking them to the same text field is not possible or a faulty way to accomplish this).
I have set up a small application which has a movieClip (named "GuruQuestions") with a mask over it, a scrollbar which you can grab and drag and currently, it does precisely what I want it to do.
However, my boss has decided he no longer wants a 'click and drag' scrollbar, and would instead like just 2 buttons to scroll, so essentially, when the user hovers over the button, it scrolls.
I have found several threads about using this method with dynamic text, but none for using a movieClip.
How would I use ASFunction with dynamic texts? Can someone gimme a example (code not .fla)...How would I display the IP address of a person with flash?Complicated:A person views my signature. It shows the IP Address of a person along with a input box for their name. They type in their name. How would I make it so that, after a name is typed in and a button is pressed, both the name and the IP address are sent to a file? Only I can view the file. Well, the file could be called list.php or list.txt...and then I can CHMOD it so others can't view it...
I am working on a simple scroller rite now. What it is suposd to do is scroll a row of buttons to the left when you go over the left button and to the rite when you go over the rite button. i am pretty sure i have the wright syntax but i alwasy get an error.
I have a pretty large which was coded using AS2 in about 2006 so I'm trying to make a few changes using AS2 which I'm pretty rusty on. I have a swf which loads an xml file into a textarea in flash and it all works well. I have to link some images which appear in the xml file but those images have to be links to external sites and that is where I am running into problems with my asfunction. Here is the code.
I am trying to load text and image through a external .txt-file using the asfunction. So far I have managed to load the text but not the image. (The image is baseline so it should work).
I'm trying to get my website updated, which normally would not be a big deal, except that during the course of updates, I discovered my site was created using AS1 and now I have to convert to AS3, which seems like a foreign language to me. I'm making progress, except that my latest problem relates to custom buttons.On a couple of my pages I made a static text box into a movie clip and placed it behind a mask. I made custom buttons to fit into the look and feel of my site, which control the "text box movie clip". I don't want to use the generic "UI Scroll" that Flash gives you (even though it's probably the easy way out) because it doesn't fit with my site design.I was given code to use for my buttons, but I get an error when I test my movie.The error I get is an 1120 Error: "Access of Undefined Property" on lines 3 and 14.[code]
1. Remove the menu buttons I don't need... How can I do this?
2. If you view it in your browser, you'll notice after trying to scroll through some of the content that the scrollbars in the flash are a little messed up.. it's not easy to notice but bothers me..
3. How can I take the Website By Joey Khan (at the bottom) and make it either highlight or glow or popout or something so that it's obvious that you can interact with it when you rollover it?
4. On the contact page, the red confirmation/error text that appears under the form when you make an error or send the message, it does not com through correctly, I'm not sure what's wrong their.
how to make some scroll buttons. Not like a regular scrollbar button, but just two graphics that have a rollover function. I got the buttons to work except that I can't get it to stop. Here is the code I wrote:
[Code].....
Once I rollover, it keeps going forever unless I rollout, but it doesn't stop at 43 or -167. It only checks the boundaries at the start of a rollover, but I thought it would run the function every 10 milliseconds to see if I had passed the boundary.
I'm updating my website and found out that I originally created it using AS1. I now need to update to AS3 and am having difficult time learning AS3 or even catching on to the basics. On two of my pages, I created a static text box, which I turned into a movie clip to have controlled by buttons. I got my down button to work, but I'm still having a problem with my up button. I can get it to work if I use the same code as my "down", but then my movie clip text continue scrolling down, instead of up. Here is my current set up:
Movie clip controller that is 3 frames: Frame 1: stop action Frame 2: blank Frame 3: gotoAndPlay(2);
I've had a look over the numerous infinite menu threads but I can't seem to find what I'm after. I need to adapt the menu so that it will work with a left and right scroll button rather than the mouse position. I have got this working but the problem is the menu does not move with easing or inertia. This is what I need to do.
I have created a long horizontal movie clip. Inside it are 22 buttons for a company history timeline. On the mouse over I want it to scroll in accordance to the mouse location so I used this code:
yearHolder.onRollOver = function(){ var leftLimit:Number = -(yearHolder.year_mc._width - btnMask._width); var rightLimit:Number = -5; this.onEnterFrame = function(){
[code].....
In order to get the buttons to work I created a function then called the function for each button with the instanceName for the argument:
function buttonAction(instanceName:Button,buttonYear:Number ){ instanceName.onRelease = function(){ itemNumber = buttonYear;
[code].....
Now the buttons work when then the yearHolder.onRollOver functions are commented out but when the scrolling is working (not commented out), the buttons do not work.
I am using a scroll bar for a menu. However, I keep getting error 1120. I selected all of my menu buttons, and created a new symbol, with instance name "content". When I compile, I get 1120, error Access of undefined property. I am assuming this is because, my buttons are now associated with the scroller content area. My question is basically, how do you get buttons to work inside of a scroll area?
Clicking on the html tag with asfunction doesn't work this way. I have to move the function part inside the myTextcontent.myMenu timeline to make it work. Instead of moving the function inside the movieclip which asfunction is targetting I would like to keep it all together. Is this possible? Perhaps some way to add a '_parent' code to ik looks for the function in the same layer as the asfunction line? Or some html back slashing so it moves up the 'tree' so it finds the function in the same timeline?
<a href='asfunction:loadText,"+msgA[0]+",,"+msgA[0]+newline+msgA[1]+newl ine+msgA[2]+'Contact: '+msgA[3]+"'>"+msgA[0]+ How do I make "Contact" appear as Bold text?
How would I use ASFunction with dynamic texts? Can someone gimme a example (code not .fla)...How would I display the IP address of a person with flash?Complicated: A person views my signature. It shows the IP Address of a person along with a input box for their name. They type in their name. How would I make it so that, after a name is typed in and a button is pressed, both the name and the IP address are sent to a file? Only I can view the file. Well, the file could be called list.php or list.txt...and then I can CHMOD it so others can't view it...
I am looking to make a flash 'gallery' in which you would use buttons to scroll through the images, much like this: [URL] Only using buttons to scroll, instead of the mouse position.
so the problem is that i was following instructions for making scrolling text with a custom button. and i put the following script (the instances are scrollUp_btn and scrollDown_btn):[code]and afther that i auto-checked it and (besides not working in the preview) it indicates these errors:[code]then i switched the '}'s for '{'s or viceversa but it shows me the opposite error. what's wrong ?
I am trying to edit this CoverFlow made in flash, however I do not have enough ActionScript / Flash knowledge to do what I need to do.
The CoveFlow currently uses a scroll-bar for navigation and a XML file for the images and text.
I have successfully been able to remove the scroll bar, but cannot build the buttons to replace it. From my understanding, I need flash to have a button variable stored, then detect how many CoverFlow slides there is in the XML file, assign and create a button for each slide. And then position the buttons bellow the image slides in a horizontal line.
As you can see the buttons needed are pretty basic, just blue circles. However the ActionScript modifications needed to achieve this are beyond my ability.
Also attached is a .zip with the CoverFlow files that I am having trouble modifying.
I've set up a scroller that scrolls an MC up or down with two different buttons (up and down). When you press up, the MC rises 390 and when you press down, it lowers 390. The issue I'm having is that if you hit the button while it is scrolling, it screws up the scroller and scrolls off values. Here is the code that I'm using:
I'm scrolling a masked MC, which is basically a grid of thumbnails with a few rows. Right now, it works beautifully by scrolling row-to-row if the up/down buttons are pressed only after the tween has finished. However, if I press the up or down buttons in succession before it finishes scrolling, the positions get all messed up because it will start the motion tween from the current y position, which is halfway through a scroll.
Code: new Tween(holder,"_y",mx.transitions.easing.Strong.easeOut,holder._y, holder._y+scrollAmt,1.5,true);
That is basically the only code in my onRelease function.
I've thought about 2 ways of tackling this problem:
1: to disable the up/down buttons while the tween is taking place.
2: to NOT have the tween start from the current y position since that is the root of the problem. But I think this is impossible due to the nature of the purpose of the function.
I have created two scroll buttons for my dynamic text field, following this guideMy problem is, that you have to click the buttons many times to scroll down to the end.How do you make it possible to "Press and hold" the mousebutton instead?My code is as follows:TextField name: scrollableTextButton Up Code:
Code: on (press, release, keyPress "<Up>") { currentScroll = scrollableText.scroll;
I am trying to edit this CoverFlow made in flash, however I do not have enough ActionScript / Flash knowledge to do what I need to do.
The CoverFlow currently uses a scroll-bar for navigation and a XML file for the images and text.
I have successfully been able to remove the scroll bar, but cannot build the buttons to replace it. From my understanding, I need flash to have a button variable stored, then detect how many CoverFlow slides there is in the XML file, assign and create a button for each slide. And then position the buttons bellow the image slides in a horizontal line.
As you can see the buttons needed are pretty basic, just blue circles. However the ActionScript modifications needed to achieve this are beyond my ability.
I have attached a .zip file with the CoverFlow files that I am having trouble modifying.
I have had a look at this link:And this is exactly what I need to be able to click on an image wrapped in an <a> tag which comes from my XML content.I have added my image, added the <a> tag to the image and when I fire it up in AS2 and mouse over the image, the mouse cursor changes to the hand as is meant to.I've added my function, which when clicked on, should call a trace to check that it's working and it's not happening and no doubt it has something to do with the path of where my function sits. I have moved this around now to several places without any joy.If I test this on the root, in a simple scenario, it works. My page however sits on the 6th frame of the root timeline and this is where I believe things are going wrong.
I want the to use the 'edit_pizza' or the 'add_pizza' function whether i am editing or add a new order. So i am checking if "aktOrder" is set (or filled because it is an array) and setting 'clickFunction' the name of the function.Afterwards i put that in the string which will be added to "windowText.htmlText" at the end. By tracing 'clickFunction' i see that it is 'add_pizza' which is right. But in the string it doesn't work.