ActionScript 3.0 :: MovieClip Weird Behaviour Involving Sprites And Drag&Drop

May 6, 2011

I have created a movie clip called mc_Border comprising of a rectangular border and an empty movie clip called mc_SpriteContainer.I am trying to dynamically add a sprite to mc_SpriteContainer.Everything works fine until I drag the mc_Border.mc_Border behaves as it should but the sprite remains in position when mc_Border is dragged.I know this can be solved by adding a line to move the mc_SpriteContainer, but I thought that as it has been added to a MovieClip, its position should remain relative to the movie clip.Just wondering if I'm missing something. Below is the code that I am using to add the MC and the Sprite to the stage.[code]

View 0 Replies


Similar Posts:


ActionScript 3.0 :: Weird Error Involving Classes And Loaded SWF

Jan 28, 2010

My project is about a header.swf that calls a nav.swf (with a menu and other stuff) and also inits a slideshow through a Slideshow class.This is in header.swf:[code]I renamed the XmlParser class to "XmlParser2.as" (as well as other references to it) and then...it worked...what the hell was going on here?

obs: I tried that also: I commented all the code inside the "initSlideShow" function, keeping the XmlParser instantiation, and the nav.swf didn't show as well.

obs2 : i didn't had XmlParser.as imported cause it was in the root directory. ( i explicitely imported it and tried to compile but same thing happened)

obs3: nav.swf uses the XmlParser.as to load two menus, however I don't believe it has anything to do it since it's a file that is already compiled, at the point I try to load it into header.swf, right?

View 2 Replies

ActionScript 2.0 :: Weird Behaviour With ColorTransform And Nested Movieclips?

Jul 2, 2009

I'm getting nuts on a really weird problem using colorTransform.See hereThere is an parent_mc that contains several child_mcs. I use colorTransform to change the color of either one or more child_mcs or the complete parent_mc.When you change the color for the parent_mc like this:

Code:
trans = new Transform( parent_mc )
colorTrans.rgb = colorOut;

[code].....

View 1 Replies

ActionScript 3.0 :: Erractic Behaviour In Button Movieclip?

Mar 13, 2012

I'm working on my first button and, instead of making simple symbol buttons, I chose to make some complex stuf like animations for the rollover, rollout and click state. I've been following some tutorials on this of course, and I've completed my first button. The problem is that I'm getting weird erratic behaviour because of this Text (TLF) layer I've got (I animated color and size) in a classic tween.if I delete the layer, everything works great. I can't figure it out!

[Code]...

View 14 Replies

Use DragDrop In AIR Application?

Sep 5, 2011

I am building an AIR application which opens some specific documents. I want to enable dragdrop on this application. So that when application is running and user drag a file and drop that file on the application window, the application must respond to that event and must be able to perform some action.

View 2 Replies

Flex :: DragDrop Event Not Firing For TextArea Control?

Feb 2, 2010

I'm working on a simple view in my app that allows a user to drag an item from a list control and drop it onto a textarea.

Seems the dragEnter event fires just fine, but the dragDrop event does not.

View 1 Replies

Actionscript 3 :: Prevent Overlapping DragDrop Images In Flex

Apr 16, 2010

I am trying to create basically a puzzle in Flex Builder 3. I display images from an array onto a canvas that can be dragged and dropped around the canvas. My problem is that I don't want the images to be able to overlap each other. how to prevent this?? They can overlap as you drag but not when dropped, they need to "snap" to the nearest point that is not already occupied by another image.

View 1 Replies

Flex :: CurrentState Of Itemrenderer Refreshes On DragDrop Event?

Apr 2, 2011

I have a simple drag and drop, and wanted to change the state of the drop target on a match. It works as expected, but then there the state changes back to normal (or the itemrenderer is refreshing). I am guessing there is either an override that i need to do, or in need to flag it to not refresh, but having no luck.

MXML

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[Code].....

View 1 Replies

ActionScript 3.0 :: Create A New MovieClip And Add Sprites?

Jun 17, 2011

I'm attempting to create a new MovieClip and add sprites in using actionscript, the issue is i want them to form an animation and so would have to add the sprites on different frames.

The code I have I thought would work but then I realised you cant gotoAndStop further than the last frame that currently exists within a MovieClip - so all my objects are on the frist frame of the MovieClip. Meaning that I'd have to create frames when creating the new MovieClip.

ActionScript Code:
var mc:MovieClip = new MovieClip();
for (var i:int = 0; i < tilesForClip.length; i++) {
mc.gotoAndStop((delay * i) + 1);
var tile:Bitmap = drawTile(tilesForClip[i]);

[Code]...

View 4 Replies

Flash - Drawing Sprites Between Layers On MovieClip

Aug 10, 2011

Is it possible to draw a sprite, on a movieclip, on a specific layer? I have a MC I created in the Flash designer, and it has 3 layers on it, background, some layout stuff, and then some text. In actionscript i've created a Sprite object in code, drawn a rectangle on it, and added it to the stage with addChild (called from within the MC). The problem is, the sprite is always being drawn above all the layout stuff I added in the designer. Is there any way to add the sprite to the MC at a specific layer? In this case the background layer. I tried changing the z on the sprite and no effect.

View 3 Replies

ActionScript 3.0 :: If Statement Involving A 2 Tilelists

Jul 12, 2010

I'm having a problem with an if/elseif statement involving a 2 tilelists. I have 2 tilelists with two radio buttons. what's supposed to happen is when the original is selected then only one of the tilelists is visible and makes a image in all three movie clips when one is selected. when the other radio button is chosen then the both tilelists are visible and usable. the second tilelist changes the image on one of the movie clips independently. here is the code.

[Code]...

View 1 Replies

ActionScript 2.0 :: Flash8 Button Animation Glitch Involving AS

Apr 22, 2009

Edit: I'm Using CS4. I'm new to AS, but do have background in programming language. I can read and understand. So here is my problem. I'm working on TemplateMonster #16330. So I just want to add another page to the gallery section, and 3 is the default. Basically, button "3" has two version with slightly different code.

[Code]..

View 2 Replies

Actionscript 3 :: When Recursion Involving Asynchronous Operation Finishes

Oct 8, 2010

I have a recursive call which includes an asyn operation (file copy) .. I want to find out when the recursive call finishes (along with all asyn operations).

private function copyInto(directoryToCopy:File, locationCopyingTo:File):void
{
var directory:Array = directoryToCopy.getDirectoryListing();

[Code]....

View 2 Replies

Actionscript 3 :: Condition Statements Involving Coordinates, Adobe Flash?

May 5, 2011

've been trying to make a code in actionscript that will set a function to true if an object is moved to a specific part of the screen. The confusing thing is making the rule apply to when it's between a specific four coordinates (in this case, 165 and231 as the X coordinates, and 295 and 330 as the y coordinates; "honey" is the instance name of the symbol).I was given this code:

bool IsBetweenInclusive(int value, int lower, int upper)
{
return value >= lower

[code]....

View 2 Replies

ActionScript 1/2 :: Create An Animation Involving A Big Fast Zoom With A Little Rotation And Animating It On The Timeline?

Jun 19, 2009

I have to create an animation involving a big fast zoom with a little rotation and animating it on the timeline just doesn't cut it.I start with state 1 (see attached file state11.jpg) where there is an animation and then I want a fast smooth zoom until I reach State 2 (see attached file state2.jpg). In the first state the "map" occupies the entire screen, but when it reaches state 2 the map is inside a mask and the other elements will start appearing.how to create this zoom smoothly with actionscript? I am really lost here and I know somethings about actionscript but I just cannot do this and my timing is today...

Attachments:
state2.jpg
(149.0 K)
state11.jpg
(121.2 K)

View 2 Replies

Xml :: Xml - Different FireFox Flash Behaviour?

Jun 23, 2011

I have a flash component written in flex which reads a xml file and shows up its data. This works fine in IE and Chrome, but not in Firefox.When i used fiddler to check for the problem, it started working fine.And now i have come to the conclusion that when fillder is running in the background and i access the flash component it works fine (reads all the xml data and shows it up), but when i close fiddler and do the same....i get the following error, "Error reading {myfilename} file."

View 2 Replies

DataGrid Data And Behaviour Modification?

Sep 10, 2009

stop();
import fl.events.DataGridEvent;
function endEditHandler(evtObj){ trace(DataGrid_Main.getItemAt(evtObj.rowIndex)

[code].....

View 7 Replies

Arrow Up / Down Default Behaviour In A TextField

Jun 19, 2009

I am making a input field for keywords, and while the users writing I'm displaying suggestions for keyword on a list underneath the caret position.The input field is single line, so I am using the arrow up/down key to select a suggestion and Enter to insert it.And it's mostly working, with the big exception that the up/down key also changes the caret position to the begining/ending of the TextField.

I've tried using preventDefault() and stopImmediatePropagation() in the KeyboardEvent.KEY_DOWN event listener that I also use to change the selected suggestion, but that does not change anything.I checked the carret has not yet moved when KeyboardEvent.KEY_DOWN event is fired, bu visually I can see that it is being move before key is released (key up).

View 4 Replies

Flex - Security Behaviour In Adobe Air?

Apr 15, 2010

I am trying to load external SWFs in my Adobe AIR App. The loaded SWF is trying to access an URL to retrieve some informations via XML. When starting the SWF by itself it works fine. When loading the SWF from the File.applicationStorageDirectory i will get an Security-Error because the loaded App is executed in a local-with-filesystem Sandbox appareantly. First Question: Is there a way to change this? That the loaded SWF is running in a network Sandbox?

Since that first attempt didn't worked i've moved the SWF to the app:// directory.Now i'll get a Security-Error because there is no policy file on the Server available where the XML data should be retrieved. Second Question: Why is the policy file not necessary when running the SWF by itself, but is necessary when trying to load the data from the application Sandbox? What am i doing wrong?

View 1 Replies

Flex :: Alternative Behaviour Of && Operator

Mar 9, 2011

I've faced such situation. I've used to program in C#, and such code:

[Code]...

was asking both, condition1 and condition2 to be true (the case when they both are giving false and the end-result is true, could be achieved in other way). In Flex, same code would perform "some actions" if the both conditions are false. I just was wondering if is there any chance to make it break after finding first false in a queue, or I have no choice and should write nested if's?

View 2 Replies

ActionScript 3.0 :: SWF Behaviour Changes For No Apparent Reason

Sep 30, 2010

I have several two-sided ecards made with Papervision and TweenLite to flip them over.A couple of days ago the "flip" animation changed behaviour. This is in ecards I made several months ago. The ecards work OK but the PPV object is not positioned correctly.On the server, in IE the object is displaced to right and down by about 20 px. In FF it is displaced to up and left by about 10 px.In Chrome and Safari the display is OK.(Just to confuse you further, the display in FF is OK on my localhost).This effect seems to be local to my PC.

I have scanned for malware etc twice but nothing. I have the latest Flash player and browsers.

View 1 Replies

Put Links Into These Weird Buttons?

Nov 18, 2009

ive got a flash template, but its really difficult to edit. heres the thing: there are 4 main categories buttons, and when i click each categorie, 3 options appears. for example

[Code]...

green, blue, red and yellow are already with button codes, for when i click it, it opens their 1, 2 and 3 option buttons, but these 1 2 and 3 for each color are not links, and when i try to add a code to them, ALL of them get the same link, like their instances from the same thing. and when i try to set a button to be instance of another thing, all of them change again.

its really difficult and i've tried everything. even creating another box for these 1,2and 3, but when i create a box on this section, another 2 boxes are created at its sides.

View 2 Replies

Professional :: Adjust The Seek Behaviour Of An FLV In Playback?

Feb 2, 2010

How does one adjust the seek behaviour of an FLV in playback? youtube videos work the way I expect them to: As you click and drag the seek bar it shows you the current frame. Any of the players I have experimented with don't do this. What they do is show you a still frame and update the video window only after you release the seek bar.

View 5 Replies

Professional :: Undefined Display Behaviour With AS Animation

Mar 18, 2010

I'm currently dealing with a very annoying problem, for which I can't find any solution, because - as I think - it does not result from a AS coding mistake but more or less has to do with the rendering of the swf.I am generating a seamless tileable stripe out of a few symbols. Then I am creating an endless animation that scrolls that stripe up. The scrolling is implemented as follows: I'm creating a second BitmapData of 500pxl height, that with every frame scrolls all its pixels 10 pixels downwards and then copies the 10 "missing" pixels at the top from the appropriate position of the prepared seamless tileable stripe.

During the animation there seems to be (at least on less performant systems) some kind of flickering (stripes tthat look like the animation wouldn't use a seamless tileable stripe - ALTHOUGH IT DEFINITLY DOES!!!)...The only guess I have - that it could result from a unsynchronized rendering of the swf..To the right you see a section of the prepared seamless tileable stripe from which these 10 pxl sections are copied.

View 2 Replies

Professional :: Can't Find Rewind Behaviour In Tutorial?

Oct 27, 2010

working through the tutorial to familiarise myself with basic terms and concepts. I have been working through the behaviours section, assigning behaviours to the video buttons in the example. I've done the play and pause, but when I try to assign a behaviour to the rewind button, there is no rewind behaviour listed in the embedded video section of the add behaviours function. I am using education version 7.2.

View 1 Replies

Flex4 - Funny Behaviour From Adobe Transitions?

Oct 23, 2011

No matter what I do, my transitions won't work as expected. I'll explain the issues and then place the code at the bottom. There are 4 States in my application.

goButton is present only in "State1" and "State2". State1 and State2 are nearly the same, but the y property of the goButton is diffrent in each. So I've made a little transition that moves the Button back and forth. Good so far.

However, both "State1" and "State2" can also be Transitioned to "State3". But there's no goButton in "State3", so I've used the <s:Fade> and the <s:RemoveAction> effects to get rid of it.

[Code]...

View 3 Replies

Xml :: Flex Children() Method Strange Behaviour?

Feb 20, 2012

I have the following xml declaration:

public var reqData:XML = <root>
<Requirement ID="REQ-GEN-0.1" title="exigence gen 1" description="blabla 01" testable="true"/>

[code]....

View 1 Replies

ActionScript 3.0 :: Attach Button Behaviour To DisplayObject?

May 13, 2007

If I am using Loader to load external swfs, can I give them button behaviours?

View 12 Replies

ActionScript 2.0 :: Change The Behaviour Of A Movie Clip?

May 31, 2007

just wondering if there is a script that could let me change the way that a movie clip behaves, for example, I have movie clip "a" and in a certain frame I have the function;

a.onRollOver = function (){
gotoAndPlay ("that");
}

can I later have a script that removes the onRollOver property so that the movie clip is once again JUST a movie clip and not a movie clip button?

View 1 Replies

ActionScript 2.0 :: Animation Involving Balloons Floating In And Then Floating Out Again When A Condition Is Met

Mar 16, 2011

Having a problem with a little animation involving balloons floating in and then floating out again when a condition is met. There are two ways they can float in or out: from left to right, or completely randomly. I actually like it as coming in (left to right) and going out (random) but it's essentially up to the user.

Since I moved my Array sort code into the function that basically deals with telling the balloons to float off though, I've been having problems. Sometimes one or a couple of the balloons will not float off and I'm kind of boggled as to why. Because it works fine IF the Array sort part is outside this function, I'm wondering whether, when the for loop at the bottom starts running, the Array is still being sorted and that's why some balloons get left behind.

[Code]....

View 0 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved