ActionScript 3.0 :: Looping - Clickable FLV Preview - Click Event Not Being Recognized
Apr 10, 2009
I have tried the following code to create a thumbnail preview that loops and is clickable to go to a new page with a video gallery. The video plays anbd loops, but, it does not seem to recognize the mouse click i have a trace that isn't being triggered an nothing happens. code is below.
I have a movie clip on stage; instance name: "slide_mc" on the enterFrame of slide_mc, I fill slide_mc by using: this.attachMovie (_global.myNewCip,"newMC",1); // _global.myNewCip holds the linkage identifierThroughout my swf, I use attachMovie to swap out new movie clips in slide_mc like this:this.slide_mc.unloadMovie (); //clear contents of slide_mc slide_mc.attachMovie (_global.myNewCip,"newMC",1);There is a button on the movie clip I just attached to slide_mc. Its instance name is: "pause_btn"From the main timeline I try to detect a mouse click by using this
I have a movie clip (scrollBar) in my site that contains a line of other movie clips moving across the stage (scrollContent1-4). Only two of these are visible at a time, so I have lined them all up, repeated the first two at the end, and have the animation looping.
I want each of the scrollContent1-4 clips to be clickable. It's all fine on the first loop, but once the clip reaches the end and returns to frame 1 the clips are no longer clickable.
I have a method which registers an event listener to each of the MovieClips in an array I have. The method is inside a class, and so is the listener function. The problem is, I'm getting an error that's says "Access of undefined property handleNavToggle", even though is declared.
Basically I have a 2 swf files. Within the main swf i have a button that I want to call in a second swf when it is clicked. The code I have for this looks as below..
Btn_interiors.addEventListener(MouseEvent.CLICK,lo adGallery); function loadGallery(event:MouseEvent):void{ var l = new Loader(); addChild(l); l.load(new URLRequest("portfolio_interiors.swf")); }
The problem I am having is that when I enter the code and "Check Syntax" no errors appear, however when I preview the published swf and click the button, i get the following message....Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
To me this would seem to say that the swf I am trying to call in is not in the appropriate folder, but both of the files are in the same folder.
I have an ArcGIS map created with Flex. The labels created dynamically are the towns on the map. We have some PDF files that have some information about the towns on the map.
Is there a way to make those town labels clickable so that they can display the PDF information on a new page?
I am trying to learn JavaScript and I am wondering whether JavaScript has a event listener just like ActionScript's ENTER_FRAME. Basically, I want this event listener to listen "all the time" not just wait for any particular instance (mouse click, keyboard event) of event.
I'm having some trouble with getURL (I think). It works fine when I preview with Flash's html preview but it's not working on my server. It's pretty simple. [URL].selected1 is a user-defined variable pointing to a page: ie, when the user selects variable page1 the page to be opened is [URL]. Like I said, it works with Flash's preview, but not on my server(no 404 or any response). Does there seem to be a problem with my code or might I be overlooking a server error? Here's my code:
i used the codes from a game that i got from [URL]... its the hit the warrior game under the category of games (i cant post the link since i only have less than 50 posts >__<) i was able to make some minor tweaks for my project then i added a button with a syntax of gotoAndStop(<frame number>). it goes to a frame which has the same codes from [URL] but it loads a different MC. i have set the MC to load 8 times but instead, it only loads 3 or 4 times then it goes to the previous "game" then keeps on looping. i have also added stop(); inside the MCs that requires to stop. so now im clueless why it keeps on looping.
on clicking the Search Icon , a search bar will be visible (ON) if user click anywhere on the stage the search bar will be NO visible(OFF) OR user click on ICON again the search bar will be OFF but it Stage CLICK is triggered without clicking
I just started playing around with as3 and I have a function for mouse clicks that draws a shape on each click. However the mouse click event does not appear to work unless I click a movieClip object I placed in the middle of the screen. Is there a way to make the mouse click event recognize when I click anywhere on the screen?
I want to add a Single Clcik event and Double click event both on the same movie clip in as3 , its working but call both the event same time so how to fix it
I'm moving on to my next massive programming project and I'm trying to decide whether I should code it in as 2.0 or 3.0. I came across the new click event model in 3.0. Right now it's looking like a pain in the butt to me. So now I have to make a function and add it as an event listener? what the hell? What's the benefit? I understand stuff like this makes AS a more complete language but it's kinda annoying.
what should i do to get chart's data on the click of respective data Legend. suppose i have array [{id:123, label:sales, year:2010},{id:124, label:refunds, year:2010}]for a column chart which has year in x-axis and sales iny-axis.two legend showing labels sales and refund.What i want is to get the whole data (id:123, label:sales, year:2010) on clicking of the legend 'sales'.What should i do? I tried listening mouse click event and itemClick event.
I have a parent sprite that contains several child sprites. I have attached mouse click and mouse down event amongst others to the parent sprite. And in the listeners I check which child has been targeted using the "event.target" property. However It seems that the mouse click event does not trigger for some reason. Is it possible that the mouse down event is eating up the click event. Is this a know issue in as3 and is there a possible workaround?
why my function "replicaLoop" doesn't run?? I'm sure the function will work but it's not running
var replicaConnection:NetConnection = new NetConnection(); replicaConnection.connect(null); var replicaStream:NetStream = new NetStream(replicaConnection); replicaStream.play("replica.flv"); var replicaListener:Object = new Object(); [Code]....
I am trying to find a workaround to the problem of looping mp3 files, basically the silence in the transition (from end to start). I could use wav files but I need to load the file externally, which makes not possible to use wav. So I did this
HTML Code: var channel:SoundChannel = myMp3.play(); channel. addEventListener (Event.SOUND_COMPLETE, onComplete);
[Code]....
Edit: Now I know it is not a problem of flash, it is problem of the mp3 format itself.
i need to make one of these image scroller things, click the left arrow and all the images scroll left and the one in the middle gets bigger, scroll right and all the images scroll right and the one in the middle gets bigger, if an image reaches the either end of the stage it should re-position itself back at the end or beginning of the image line up.make sense?anyway, for the life of me i just can't seem to crack it, i've tried a few approaches but all seem a bit "in-line" i wanna use for loops and arrays and stuff.. but i'm not smart enough!
Ive made a movie that add strings from several input text fields to an array. This array is sent from the flash video to php. This is working fine when I preview the movie as Flash. The php script prints the variables as intended.
But when I preview it as html the arrays are all empty...
[AS] on (release) { number_of_attr1 = main._currentframe + 1; suggestions1 = new Array();
I'n new to AS3 and it's been a HASSLE to figure out some simples things i used to solve easily on AS1 and AS2...
I have a BUTTON called BOTAO82 which when having a MOUSE OVER event, should show a simple TEXT on a specific location of the screen (something explaining where that button will take you to).That button will have two events: MOUSE_OVER and MOUSE_CLICK.The CLICK i got it right...OK.The problem is the OVER. How can i SHOW the related TEXT when the mouse is over that button?
I have a list that as an arraylist as a dataprovider.It has an inline item renderer thet has image control. The click event doesn't work for the image ctrl.The code looks like this
If you press left click and dont release it, and then press right click (contextual menu appears) and then left click again, the first "drag" action is never released.
Its like, I need to make that my right click says: "hey left click, your job is done, you can go home now".