ActionScript 3.0 :: Add GetURL To A Tweening Button?
Jun 12, 2010So I made a sliding menu bar by following a tutorial, and the author of the tutorial didn't include how to add a MouseEvent.CLICK to getURL.[code]...
View 1 RepliesSo I made a sliding menu bar by following a tutorial, and the author of the tutorial didn't include how to add a MouseEvent.CLICK to getURL.[code]...
View 1 RepliesI have a problem with the script below:On stage are two movieclips for triggering the tween of a third movieclip.There is also a dynamic text saying "text [1] of [5]"The problem is that if I trigger the tween while its already tweening, it will keep changing the count of actualText but not tween corresponding.-Is it possible to deactivate the triggering mcs -Is it possible to make the count of actualText when the tween is done.
//vars
var totalTexts = 5;
var actualText = 1;
var boxStart = 25;
[code]....
I'm using a MC(dock_mc) to works like a dock, and inside this dock, have some color buttons (like laranja_btn), but if i use the tween animation, the buttons don't work animore, if i remove the tween code, buttons back to work.
Code:
dock_mc.laranja_btn.onRollOver = function() {
dock_mc.cor_txt.text = "Laranja";
trace("Over");[code].......
I have modified simple photo gallery tutorial through XML at [URL] click on a thumb and an image scrolls in. Now I'm trying to add a link to the image - but can't get the url from the xml to the image.
Here's the XML-file (pics.xml)
[XML]
<?xml version="1.0" encoding="utf-8"?>
<images><image>
<pics>pics/utrechtmedia.jpg</pics>
<sites>sites/utrechtmedia.jpg</sites>
[Code] .....
I'm trying to add a simple getURL script to a simple text button-- should be really simple, right? But when I select the instance of the button on the stage it says the current selection cannot have actions applied to it. This, despite the fact that I am able to open an old .fla that has the same type of button and it does have a getURL action applied. What gives?
Flash version 9.0 (CS3 Professional)
What I want to do is take the value of $MyState in the php code below..
PHP Code:
<?php
$MyState = $_GET['MyState'];
?>
[Code].....
I know that I need to do something with Loadvars, but all of the tutorials I've tried aren't working. how to get this php value into my flash file button's getURL?
How to write the GetURL function to a button in AS3?
View 6 RepliesI try to create a flash menu; where every button on the screen operates as a simple getUrl() link. Because of this, I have taken the following steps:- Create new document.- Create a symbol on the canvas.- convert is into a button Symbol- Double Click the button and adding events for up, down, over by clicking F6 on each frame.- back in scene one, I right click the button and open the Action panel- Adding the Script: "on release { getUrl('index.html'}- Press ctrl + enter to test the move ! ( index.html exists in the same folder as the flash file.)
View 1 RepliesI'm working with some XML-supplied data, with a variable number of elements. I'm using a loop to add instances of a symbol for each element via attachMovie. But something is preventing my URL action from getting properly assigned.
When I do this:
ActionScript Code:
itemY = 0;
urls = [];
[Code].....
They have been made following a tut from Flash_db.I have not been able to test the PHP script yet so no probs with that , but the problem lies in my Flash movie.
The submit button uses a getURL action, but Flash cannot seem to find the PHP file, even though they are in the same folder.
I would like to create a button in Flash with a getURL that can be easily edited by using an XML source.
View 1 RepliesHow can I make this button wait 10 seconds before it does the getUrl?
Code:
process.onRelease = function(){
getURL("/our-process/brand-building","_self");
[code].....
I am trying to make a getURL() that doesn't utilize a button, at a certain frame in the timeline (after a movieclip). I understand that getURL() no longer exists in Actionscript 3 but if anyone can explain to me how to write an action that will allow me to open a URL in its _parent frame after a certain amount of time
without clicking.
How can I make this button wait 10 seconds before it does the getUrl?[code]...
View 6 RepliesI'm having a strange problem with getURL. in my flash file, i have two buttons one for an email link and another one for a site link here is the code
[Code]...
when i test it in flash (Ctr+enter) only the button linking to the site works, but the email button doesn't work. And when i preview it in html, only the the email button works, but the site button doesn't work.
I've been trying to get a bit of control over the "getURL" action. I want the window that pops up to be a particular size, centered and have the maximize button accessible (it always seems to be greyed-out).
heres the code I've been using:
on (release) {
getURL("javascript:openNewWindow('http://www.google.com','thewin','height=600,width=400,max imize=yes,toolbar=no,sc
[Code].....
I've tried a few of the components that are supposed to make this easy but, I haven't found one that works properly yet.
I'm getting the following error: Motion tweening will not occur on layers with ungrouped shapes or on layers with more than one group or symbol. I don't have any ungrouped shapes (it's all text), each layer has 5 instances of only one symbol (keyframes), no objects are grouped and text is all static text.
When watching the animation, the first word (web) looks fine, on the second word (design) the tween fails on the last couple of frames of that clip (the blur filter disappears), the third word (and) is OK, and on the forth word (development) the blur filter is not applied to the last 16 frames of that clip.I broke each animation into its own MC thinking that was causing the issue, but that didn't fix anything.
I have been searching Google trying to find a solution to my problem with no joy, so I thought I would post in here to try my luck.I have created a small movie which can be found here, [URL], the problem I have lays with the button at the top of the movie titled "Click Here to Create Your Canvas". I have 'Publish Previewed' in Flash and the button works fine - changing on mouseover and opening link, however when viewed in HTML the button changes as intended but the link does not open on release.
the Action code used is as follows:
[Code]...
I need to have a button load it's GetURL() deal from an external file. XML? Txt?
View 2 RepliesI have a .swf file containing a navigation bar and also an animation. I was going to use getURL on the nav buttons so that a different html page would launch onRelease. The animation in the swf file that contains the nav buttons plays as soon as the swf is loaded and there's also a movie clip in the file which continues its animation even after the file has loaded and played. As each of the nav buttons are pressed and the correct html page loads, I don't want the entire swf file to reload and therefore play the entire animation again as it did on the home page, but instead I just want it to appear as though it's already loaded but I do want the separate movie clip in the swf file to continue to play. Is there any way to make this happen?
Also, I wondered what code I'd need to make the current page nav button appear in a different state to all the other buttons to make a "you are here" effect.
if i wanted a flash button when clicked on to open a html page in a i-frame how would this be done? what would the script be for this particulare action?
View 6 RepliesI have been using TweenLite for all of my easing. I was wondering what the code is for having a button inside a movieclip not active while the movieclip is tweening.Then when the movieclip does finish tweening the button then becomes active.
View 2 RepliesI'm running macromedia flash mx, and I'm trying to make a linkable swf by following this procedure: I select the object and then convert it to symbol. Then I choose " button " Right click at the object---> actions ---->[+]--->browser/network ----> getURL. I type my url and choose 'self" target.
When I test movie the hand symbol appears at first, but when clicked it turns to arrow. Exactly the same happends when I appload the swf and of course there's no link ...
am i publishing the movie incorrectly? It works great when I preview the flash file (cntrl+enter), but after I publish it and insert it into the html (in dreamweaver), the file shows up and animates perfectly, but when clicked, no link... It doesn't do anything
View 3 RepliesI have some buttons on a stage that when click change the scale and the position of another movieclip sitting on the stage. All works well but I'd like to make it bit more....cool
Is it possible to tween, maybe with an ease, between the current position and the position when the button is clicked?
[Code]...
how to identify the tweening name, if running more tweens on the screen, For example... creating few circle and animating randomly on the screen. I want to remove the circle when the tweening class finished...
here my codes...
------------------------------------------------------------------------
var MC:MovieClip;
for (var i:int=1; i<=10; i++) {
MC=new mcircle();
MC.id=i;
[code]....
how can i remove circles when the "removeCircle" function called ?
I currently have a flash file and it all works fine, but I'm about to update it and it will become a little complicated to update the way I have set it up.
I have 15 pages (going to be updated to 40pages soon) and a side menu, clicking on one of the tabs in the menu will animate the relevant page onto the stage. Here is the code I am using[code]...
I have imported two images from PS to Flash in PNG format. They are the perfect size and ready to use (i.e. not scaling these images). When I convert them to movies, the animation looks great in Flash, but when I export them they only look good when I have the HTML settings set to "Best". If I don't have this setting on, it looks like crap (i.e. very jagged). These are photos btw, not vector images or shapes.
The reason I want this to be optimized without the control of HTML is because I am creating web banners for advertising. When I submit my swf file to the webmaster, they basically will embed the swf with whatever settings they choose. If they don't have the setting on "Best", the file looks like crap. Allow smoothing is on.
1. When I import the PNG image, can I safely select JPG compression via the Bitmap Properties? Or do I need to keep it as lossless? If I select JPG, I can considerably reduce the filesize, although I'm not sure if that causes the images to look jagged as well.
2. Is there anything I can do outside the HTML settings to display my animations without the jagged edges? I need to keep my filesize under 50Kb which is pretty hard when working with photos and animation etc.
I know the basics of tweening with action script but I have a picture set in the center of the stage at x = 50. On a click I would like that picture move - 10 x from that position so it will end the tween at 40. On a different button I would like to do the oppositie, + 10 x to its current position so if it was at 40 it would be back to the start and if it was at the start it would be at 60.
View 10 RepliesI tried to refresh my little flash knowledge -- but I stumbled upon a problem with the new Flash CS4!
When I try to make different blur or alpha effect on one keyframe I got after making the motion tween -- Flash adjust the other keyframe as well (got the same reaction on both keyframes as if it was the same instance of movie clip -- and not as in old flash; the keyframes created separated or independent instances)
The only thing working for me is when I move the movie clip out of the stage on the first keyframe -- and it correctly move its position.