ActionScript 3.0 :: Manually Trigger A ColorPickerEvent?
Apr 11, 2011Is there a way to manually trigger a ColorPickerEvent?
View 1 RepliesIs there a way to manually trigger a ColorPickerEvent?
View 1 RepliesI need to trigger the hover state of a Flex button programatically, so that it looks like the user is hovering over it. There is a flex page about "Manually dispatching events":
[URL]
Which would work, but what I'd really like to do is change the style of the button without having to throw an event. How can I do this?
Similar to the below in javascript:
<input id="target" type="button" onclick="..." />
<script>
document.getElementById('target').click();
</script>
I'm doing it this way :
[Code]...
But get an error that connect_btn is not defined...
UPDATE
Yeah I'm trying to simulate a click event .
I have an application done in flash- on the main Scene Level, everything has only one frame but I have MCs and the like that are triggered by actionscript.There are quite a few nested functions on the main actions layer as well as an "onEnterFrame" function that reloads XML data in the background, etc... but that is not the problem.
The problem is, that at one point, I am calling a few MCs that kind of close up a section of the page like blinds- and then I want a text to appear ontop of that now closed area... but if I just write...
Code:
_root.TimelineFader.BlendeT1.gotoAndPlay(2);
_root.TimelineFader.BlendeT2.gotoAndPlay(2);
_root.TextAboveTimeline.theMessage_txt._visible = true;
...it all happens simultaneously, of course.I guess I could check for "BlendeT1"'s (or T2's) current frame (since it's an MC)... but how do I wait while that MC runs / until it reached a certain frame? How can I keep the rest of the actionscript in the main function from continuing?
We bought this Flash template to save time:to make this siteI knew a template would limit us (especially since I only know HTML/a little CSS), but of course, we need a few tweeks. To save time (and if anyone is interested), I have uploaded the source files so you can see the structure here:The flash file is set up like this:Fla file for all the image souces & layoutIndex.html File has some sort of fancy javascriptText.html file is the editable file where non-flash-knowing dingbats like me can just edit the text and POOF! Magic!I know I have bastardized them from the original and some stuff is probably wonky.The biggest problem is that the "thumbnails" that you click on at the starpage are auto-generated, cropping the top left 100x100 square. I don't know why this is the case, and honestly, I think it looks awful.
Is there any way to manually set the thumbnail images, so they are cropped artistically rather than randomly? I asked the template tech support and they told me to "make my images 100x100". I did that for the first blue logo, and it looks like CRAP! Sure, I have the icon I would like, but when someone goes to browse the gallery, they get a 100x100 icon displaying instead of a lovely fullscreen pic.
write down the formulas that flash MX uses when you use the functions tan/sin/cos...I am trying to get a good grasp on these things and it
View 12 RepliesIt's just a pure curiosity of mine . I'm using flash to create movie clip objects and never thought about creating them programatically. But today I came across this articlevertheless, there's no official explanation of the process.What if I have e.g. 5 images, and I wanna turn them into a short piece of animation. How can I do it using pure actionscript 3?
View 5 RepliesI have a candlestick chart that is working great when the numbers being dealt with are large but when the numbers are small the vertical axis starts at the very top of my data and ends at the very bottom. For example if my max number in my XML is 12 and my min is 11 the charts top is 12 and the charts bottom is 11 with 11.2, 11.4, 11.6, 11.8 in between. How can I force the chart to do 22 to 1 on the vertical axis ({maxgraph+10} and {mingraph-10}).
View 1 RepliesI have a menu that is built using its own AS3 class, when a link in this menu is clicked it fires a function according to some variables passed in from an external XML file.
The menu is made up of four subsections and I want the user to be able to jump to the parent of that subsection from a button that is completely separate from that menu.
What I'd theoretically like to do is trick the parent button into thinking it's been clicked when the user clicks one the buttons in this other menu.
Is this even possible? I'm tearing my hair out trying to think of a work-around, but I have to admit that it comes to passing variables, never mind passing them between classes!
I need help into handling an animation imported in FLV format which I have a 3D object rotating 360 degree in about 100 frames.I would like to control the rotation myself maybe using a drag scroll system in order to back and forth between frames manually
View 3 RepliesIs it possible to manually set the timer count? Atm i've got a timer that ticks for 30 seconds displaying an image every 10 seconds and I want to make a button that goes directly to the second image when it's clicked.
View 7 RepliesIs it possible to manually add an array of files to a FileReferenceList to upload/download? Rather than selecting from browser()? I need to download a number of images from my server, run some scripts with switchboard, then upload them back to the server, all automated.Is this possible using FileReferenceList or would I need to build some sort of ftp app with sockets?
View 2 RepliesI just started working with flash CS3 and know the basics of actionscript (3.0).I learned a lot by reading most of "Foundation flash CS3 for designers"by Tom Green.I found the following tutorial to create a nice image gallery I want to use for my online portfolio :http:[url]....The problem is that I'm using as3.0 for my website in Flash.I can read the code and understand what it does,but I'm still not able to manually convert it to as3.0.I'm going to try coverting it myself. It will be a good lesson for me to get a better understanding of the scripting process. The only thing I'm afraid of is there will be really a lot of changes (I really don't know) I know already a few changes:
_root -> this
_x (and _y, _alpha etc.) -> remove underscores
Code: Select allthis.createEmptyMovieClip("container",1);
will become:[code].........
i have n nos of btn's on stage .on clicking any btn i want to duplicate a movie clip on stage "circle_mc" & place d copy with equal spacing along y axis...i dont want to manually put the actions on each btn.the actions can be put on the timeline ...like btn.onRelease = function(){actions}the btns r given instance names btn0,btn1...so on..
View 6 RepliesI'm importing an image that I'll use as my pointer(arrow) in a speedometer. My problem is that I need to manually set the movieClip's registration point so that I'll get the rotation right. If I manually drag the image on stage and use F8 to convert it to a MovieClip, I can set the registration point in the dialog box popping up. The only thing I'm trying to do is just that, but with ActionScript since I create this thingie dynamically
View 3 RepliesSo far my code takes hex codes out of tweets containing a certain hashtag, and draws a square of that hex code colour. If someone were to tweet a new set of hexcodes while you were looking at the site, you would have to manually refresh the page to see the new squares.
[Code]....
I've often seen on various websites headings that were created from Flash-based text. A good example of what I'm referring to is on vancouver2010.com , most notably on pages other than the homepage. I was wondering if anyone knows if there's a way to do this automatically with a text generator perhaps, or if I need to manually create each SWF file by hand in Flash if I wanted to do this. I've also seen headers created that appear to have come from a generator of sorts that are just images.
View 2 RepliesI have a swf containing 3 scenes (all individual external swfs) at 10 second intervals. This is how I do it:
[Code].....
So after the 10 seconds are up, it goes to the next frame, where I have the same script, with another Timer variable (MyTimer2), loading another swf. Same for the 3rd scene.
All is fine, until I need to manually change scenes. I have 3 buttons, each representing a scene. When the user clicks on any of them, the scene will change to the one selected. I think you have a good idea how it works.
Now, as you might have seen it coming, the manual "override" messes up the original looping Timers. I currently have gotoAndPlay("frame") on each button, and this causes 2 Timers to run at the same time (the current Timer, and the new one).
I have two columns: the left one is a Canvas containing an mx:Tree and the right one is a Canvas containing a Canvas (to allow for scrolling) of some custom Sprites that go along with the tree nodes on the left. I made the right Canvas scrollable (horizontal and vertical) and I want the vertical scroll to also scroll the left Canvas so that the tree nodes line up with their representations on the right. The scrolling portion works fine and when I embed with wmode="window" there are no problems. Unfortunately, the customer requires dynamic HTML to overlap the Flash at times and when using wmode="opaque" or "transparent", there are issues. The scrolling still works, per se, but Flash does not seem to redraw either Canvas appropriately. The Canvases become out of sync and artifacts often remain on the right side.I catch a scroll event on the right column and update the scroll position on the left column like so:
public function onTimelineScroll(scrollEvent:ScrollEvent):void {
leftColumn.verticalScrollPosition = rightColumn.verticalScrollPosition;
}
[code].....
I am trying to use the AxShockwaveFlashObjects.AxShockwaveFlash object in a console application in C#. To do that, you have to set the obj.OcxState to something. I looked at how the Forms designer does that, and it does it this way:his.flash.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("flash.OcxState")));I looked in resources and there is nothing there.My question is, how can I create an AxHost.State manually so I can set the OcxState of my flash object to it?I see that the constructor of a State takes a Stream, int, bool, and a string. But I don't know what to put in the Stream (or the int, bool, or string) to create it.
View 1 RepliesHow to choose the webcam/camera manually in Adobe Air? In Flash it's working through this:
Security.showSettings(SecurityPanel.CAMERA);
Is there something like that in Adobe Air?
I've been working on an iPhone app developed with Flash CS5 that will stream the camera view to a window on the app screen. The camera code is as follows:
cam.setMode(600, 400, 25);
cam.setQuality(0, 100);
vid = new Video();
[Code]....
I set the iPhone to stay in a portrait orientation constantly by setting stage.autoOrients = false and stage.setOrientation( StageOrientation.DEFAULT ). However, the camera still displays as if the phone was flipped 90 degrees to the left. How can I change it so the program stays in portrait orientation and the camera is oriented correctly?
I have a very simple movie that loads an external jpg into a blank "loader" movieclip via a XML file.
Is it possible to animate this image via manual tweens or am I limited to animating it via the Tween() class?
I have a depth issue with two movie clips. One of the movie clips I am creating is created with the createEmptyMovieClip function. the other I've embedded onto the 1st frame manually.The one I have embedded manually will not show on top of the one I've created in code. I've tried giving minus values to the one created in code and the manual one still
View 2 RepliesBasically I have manually built these MC's onto the stage. I want to delete one of them when an event is complete.
Here is how it looks. Keep in mind it doesn't work at all. I guess the catch is that these MC's are manually placed on stage I get an error msg: 1120 access of undefined property.
Code: Select allMyGallery.Pic1.removeChild(LB);
its built like this
MyGallery.Pic1.LB
I have some text which I want to make look like it is being written on the page... Is the only way to do this to just use a mask that follows an invisible pen stroke manually?
View 1 RepliesI have manually created a empty mc on the maintimeline named 'loadme'. I have my buttons in a movieclip that is on stage and within that mc i have the follwing code to one of the buttons:
[Code]....
I get an error 1119 when I run the swf. Also, is it possible to declare the variable for 'loader' on the maintimeline and then use it in my buttons mc?
I have manually created a empty mc on the maintimeline named 'loadme'. I have my buttons in a movieclip that is on stage and within that mc i have the follwing code to one of the buttons:
knowbtn.addEventListener(MouseEvent.CLICK, knowclick);
var loader = new Loader();
function knowclick(event:MouseEvent):void{
loader.load(new URLRequest("about.swf"));
loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, handleContentLoader);
this.gotoAndPlay("buyingoff");
} function handleContentLoader(event:Event):void {
this.parent.loadme.addChild(loader);
}
I get an error 1119 when I run the swf. Also, is it possible to declare the variable for 'loader' on the maintimeline and then use it in my buttons mc?
I have a standard combobox that dispatches a collection event when the dataprovider finishes initializing:
my_cb.addEventListener( CollectionEvent.COLLECTION_CHANGE, getMyStuff );
Then I have a custom component that also has a dataProvider. How do I get it to dispatch a collection change event when its dataprovider finishes loading?From what I've read, I can't do it. Will dispatching a propertychangeevent work?
UPDATE:I have a custom component that I call 'SortingComboBox' but it is not a ComboBox at all; it extends Button and I set is dataProvider property to my arraycollection, model.product (which is an arraycollection). how I use the dataProvider in that component:
code
[Bindable]
private var _dataProvider : Object;
public function get dataProvider() : Object
{[code]..........
In the createChildren() method of this component, I use this:
BindingUtils.bindProperty(dropDown, "dataProvider", this, "dataProvider");
The dropDown is a custom VBox that I use to display labels.