ActionScript 3.0 :: Button On Click, Loads A Pdf In New Window
Aug 27, 2009
I am trying find the correct as3 code to make a button on Click, open a pdf in a new window. I have tried different ways, but when I add the code not only does it give me errors, but it makes my swf flip through all the pages instead of stopping on load. It is fine before I enter the code for this button. Just to let you know, this button is within a movie clip on the main stage. I really wanted it in a MC within another MC, but can't figure out where to put the code.
Should it go on the main timeline, where all the rest of the code is, or should it go within the MC?
I have read all threads and can not find a solution but i am not somebody with a lots of knowledge about actionscript so here is my problem i am using this script .
[code]....
the problem is that when i click on the first button loads ok but when click on second still showing the first movie clip in the back ,,,,, i have try everything without luck ,,,, i guess i need to keep reading but will like to find an answer to this situation ,
I am loading swf file on prev and next in my image gallery. its an xml driven gallery..its working fine.Now i want when i click on next and prev button it loads the swf but with different url.I came to know that it can be done by using deep linking.
I am creating a library like flash file for our game. I am using adobe flash cs5 with as3 and adobe indesign. I am still very new at flash(a real newbie) and i am wondering if anyone could help me in my problem.
i have a movieclip file named "mainPage". mainPage contains 6 buttons (with a cyrstal design) but lets focus only on 1 button. The 1st button contains the name Art_btn which calls the movieclip artBook when the button is clicked (which is my problem) . I have another movieclip named "artBook". the contents in my artBook are separated or written on each frames that could be called when clicked next or prev.
here is my prob. i dont know what is the right code that would call for artBook when Art_btn is clicked.i tried inserting codes such as loadMovie, gotoAndPlay and addChild but when I test it, the mainPage contents doesnt show up and it produces errors.
When the page loads, the first menu button (PORTFOLIO) is automatically OnClick. I want the user to be able to rollover it and click it when the page loads. I attached my file.
Take a look at this site. [URL] You notice when you click on a button the current 'site' you are on dissapears befor the next one loads. How is this done? It's like the code tells flash first to 'close' the current page and then load the page you clicked on.
Im trying to get my flash player window to close, when I click on a button. I have tried various code from the net but nothing seems to work. Im building in Flash CS4 on a mac.
make an graphic (just a box with text in it) be shown as default, then when the user clicks (either clicks the box or anywhere or a cross - anything!) the window is hidden, then if the user wants to see the box again, they can click a button saying 'show info'.
And I looked on the forums and found ( showthread.php3?t=66284" ) << I can't post links because my post count is too low .
But I tried that (both methods mentioned) and i can't seem to get them to do anything?
I just started out using autoscript 3.0. What I want is that when I click a button (with an image inside) it opens a new window with an enlargement of that image. I've already done the following: 1. Create new button 2. Set it's instance nam to appinvent_btn 3. Created new action layer. 4. Set up the following script in actionscript 3.0
appinvent_btn.addEventListener(MouseEvent.MOUSE_DO WN, mouseDownHandler); function mouseDownHandler(event:MouseEvent):void { navigateToURL(new URLRequest("???????????????????????????")); }
I downloaded a flash template and have modified it to suit our company but there is something that I can't do. When the file loads in the browser, music immediately plays and loops until you click a button to stop the music. On our video page, we have video that we need to play that has sound in it. How do I get the background music to stop when my video plays without having to go up and stop the music manually. The videos are loaded via an external XML document and there are no buttons in the FLA file to link code to. the website is [URL]
I have a gallery that has thumbnails, when I click on them, i want to load the pic next to them, and disable the rest of the thumbs until I click the large image to go back to the thumbs...right now it opens the image in its own window from an xml list..
function tn_click(e:MouseEvent):void { var mc:MovieClip = MovieClip(e.target); var s_no:Number = parseInt(mc.name.slice(8,10));
- When you click on a link in the bottom menu bar of my site, the new page opens at the bottom of that page (instead of the top).
As you can see (from the action script at the bottom of this post ), it's basically just turning on and off the visibility of the pages. So when you click on the Ethnography button, it makes that page visible and the page that you were on, not visible.
So when the button being clicked (the Ethnography button) makes the Ethnography page visible, the page location stays in the same place (aka - the bottom of the page). Is there a quick action script statement that I can add to the EventListener for the button that will tell it to open the new page at the top of the page?
I have built a full flash site were i have loaded the .swf into a dreamweaver page named index.html.
I then upload the index.html and the associated .swf file to my homepage.
Start up the webpage and all looks good.
I then update the .swf and upload the new one but the change does no show. I can see the change on my laptop, from another PC or if i type /index.html after the address.
I even deleted my index.html and the .swf and could still see the webpage on the same MacBook as it is created on (only).
I'm building a Flash website and have a question which should be really easy to answer.
- When you click on a link in the bottom menu bar of my site, the new page opens at the bottom of that page (instead of the top).
As you can see (from the action script at the bottom of this post ), it's basically just turning on and off the visibility of the pages. So when you click on the Ethnography button, it makes that page visible and the page that you were on, not visible.
So when the button being clicked (the Ethnography button) makes the Ethnography page visible, the page location stays in the same place (aka - the bottom of the page). Is there a quick action script statement that I can add to the EventListener for the button that will tell it to open the new page at the top of the page?
I have a button that I want to have load a movie when pressed. It works, howerver, the movie loads in a separate window instead of the the main timeline where I would like it to. How can I correct this? Here's how I have it scripted now:
Lets say i have a button on frame 1. And if you press it normal, you ll get to frame 2. But then if you click it on another way, you ll get to frame 3. How do i do that easy?! With another way i mean like shift click or ctrl click or is it an easier way?
I dont know what Im doing wrong, I have this for my servicios buttom:
on (release) { if (_root.currMovie == undefined) { _root.currMovie = "servicios";[code]....
and the same AS for my "portafolio" buttom, of course I changed the swf name.When I clic for example "servicios" it loads ok but when I clic after that "portafolio" it doesnt load, and viceversa, if I clic "portafolio" loads ok but after that if I clic "servicios" doesnt load,
I click on the booking link and everyhing loads just fine, however, if I click on it again it only loads partially. Can anyone tell me why this is and how to resolve?
On a menu I have various school subjects. I have a separate movie for each subject. When you click a subject on the menu; a coresponding movie loads on the stage.
The actionscripting is quite simple:
on (release) { loadMovie("Art.swf", "_root.Facilities"); }
Yet however I try I can't get the swf to load .
I realise I need to configure the target so the swf loads in the right place but I'm unsure if this is the problem.
I am currently doing a project that to create a full flash website. The website contains a preloader, an introduction movie, and dynamically loads external swfs when click the menu buttons. I am struggling with the preloader part. My preloader movie does not shown until 50% and disappears at 90%. I have searched for solutions on the internet for days but could not find any. I attached my source file as well as the swf.
i would like that my window opens and closes (opens: scale out; closes: scale in) not by clicking on the button but on the window itself.here are 3 applications of mine (schuifwindow, scroll and fotoalbum).
Grtz,Jan the man
here are 3 applications of mine (schuifwindow, scroll and fotoalbum). schuifwindow www.truevision.be/other/btn_home.flascroll www.truevision.be/other/scroll.flafotoalbum www.truevision.be/other/foto_album.fla only picture one (left up corner) has a X button (i dont want to use this button)
if you open up the TEST.swf you can see how I want my transition to look like.. everything works perfectly.. then if you open the Load.swf and click one of those red buttons.. it loads up the external swf.. but if you click another button it loads up the same external thing.the difference between Load.swf and TEST.swf is that in Load.swf is container in which the TEST.swf is loaded..
I created a movieclip animation that only activates when i rollover the movieclip button. I further extended the frames and created another frame animation that i active only when user clicks the button. So i have a roll over/out animation and click animation in the same movieclip in the same layer. Now the problem is that when i click on the button, its supposed to take me to another page, and it does, unfortunately without the click animation. That means after i click on the button its supposed to first finish the click animation and then go to another page. But when i click, it takes me to another page without showing the click animation
SO I tried the If function, but i seem to make a mistake somewhere and i dont know what to do. Now there is no error in script, but onw there is a problem in link, the button finishes the click animation but it does not go to the tarrgeted"about" frame. here's the code
Basically, I have a button and on click it displays a menu. I want to click that menu a second time and the menu closes. Currently, every time you click the button, the menu reopens. I pasted the Flex livedoc example below. If you click the button, the menu keeps reopening.Now, I rigged it up by setting a var to open and closed, so when clicking the button it does a check. However, if you click away from the screen, the HIDE event gets dispatched, and the menu closes. This messed up the open close var being set.
How could I make this Flex example below show the menu on button click, and then on a second button click, it closes the menu? Take into affect that if you click away from the menu, it closes it.Also, I played around with the MOUSE_DOWN_OUTSIDE event for the button and set the preventDefault, and the FlexMouseEvent event.cancelable is set to false.Changing to a PopUpMenuButton is not an option. I have to much skinning involved.Here is the Flex example:
<mx:Script> <![CDATA[ // Import the Menu control. import mx.controls.Menu;
I am building a flash interface and I would like a menu where it is hidden to begin with (just a tab). You click the tab to expand it, and click again to collapse it. I've made a movieclip with animation of the menu opening up and closing, but I can't seem to work out how I'd go about making the movieclip open and close properly.