ActionScript 2.0 :: SWF Within Another Overwrites Values?
Nov 6, 2002
Action script for Flash MX I made this swf here from the random circle motion tute though slightly adapted, and want to use it as a cursor in another movie. The actual swf is smaller but appears bigger here for some unknown reason.
<hr>
<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="40" HEIGHT="40" id="swirl" ALIGN="">
[code]....
how do include the first swf in the main one so that it will follow my cursor as it doesnt seem to at the moment. I think that is because the 1st swf overwrites to x/y values in the main one?
View 3 Replies
Similar Posts:
Dec 30, 2009
I'm working with AS2 and running into a problem when loading a bunch of SWFs that share classes. I have a main SWF that loads several child swfs. The main and the children often share some core classes. The issue is that these SWFs were not all created at the same time, and some of the core classes have changed between SWF compilations. It appears that the first instance of any class to load gets used for all following references to that class - regardless of which version of that class was used in compiling the following SWFs.In AS3, the ApplicationDomain can be set to circumvent this issue, is there any that can be done in AS2 to avoid this collision/overwriting?
View 9 Replies
Jun 29, 2011
I have two dynamic text boxes on stage - strap1 and strap2 respectively.Both text boxes use the same font; just different styles. e.g strap1 is Arial regular, strap2 is arial black.In order to get a good anti-alias, I have embeded both fonts. The problem is that the top font overwrites the second. So instead of strap1 being arial normal and strap2 arial black, both textboxes are arial normal.
View 2 Replies
Dec 6, 2010
I've gotten these sliders to work but can't get the output values to add up. For instance, depending on the values for slider 1, 2 and 3, I need the total to show up in a separate text box. I keep getting a NaN message in the text box.Here's the code I have so far:
//item 1
sliderOne.width = 600;
sliderOne.value = 0;[code].....
View 3 Replies
May 18, 2010
I need to save email-id in my login form through the cookies. if I use shared object I am able to save but my requirement is need to save in cookies. How can I save? I got sample code from net. Attaching that code `package com {
import flash.external.ExternalInterface;
/**
* The Cookie class provides a simple way to create or access
* cookies in the embedding HTML document of the application.
[Code].....
View 1 Replies
Sep 4, 2011
I need to be able to compare the number of whole days between two dates in ActionScript, is this possible? I'd like to test if one date is 7 days or less after today, and if so is it one day or less (if it's before today this also counts).The workaround I have in place is using the .time part of the date field:
// Get the diffence between the current date and the due date
var dateDiff:Date = new Date();
dateDiff.setTime (dueDate.time - currentDate.time);[code].....
As I say - this is only a workaround, I'd like a permanent solution to allow me to check the number of whole days between 2 dates. Is this possible?
View 1 Replies
Sep 7, 2010
Is there anyway where I can pass the Array values (not the array collection values) to the Bar charts or column charts using flex 3.5...
here is the thing i want:::
I have array values like this,,
array1 = [23, 49, 40, 239, 20, 80, 39,49,120, 24, 31,41];
and i want to show these values on the Yaxis and months on Xaxis....
I have two Qns,
1) how can I pass this array to Bar chart or column chart.
2) how do I need to show months on Xaxis. beacuse I'm asking this regarding, I have kept a filters that even if we want to see some months or a particular months or perticalar span of months... there on Xaxis it need to change the months dynamically depending on the filters..... (for ex, on Xaxis the values should be (Jan, Apr, Jun,Oct) if i select the 3 months period filter....)
I have written a logic to collect the values of those particular months into an array, but not understading how to pass this array to Bar chart,, beacuse there I don't know what Xfield and Yfield to be given....
View 1 Replies
Sep 8, 2010
I am loading images and am getting their heights via trace but can't put them into an array to save my life.
Code:
var imageResArray:Array = new Array();//used to store image height
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, ImageLoaded);
ldr.load(new URLRequest(menuArray[c].iPath.toString()));
[Code].....
View 1 Replies
Aug 11, 2011
<header> <Games>true</Games> <Signup>true</Signup> <Support>true</Support> <Username>true</Username> <Password>true</Password> <Login>true</Login> <Language>true</Language> <Date>true</Date>
[code]........
View 7 Replies
Jan 18, 2010
In my code I have two variables I only want to use them one time and after that never again. The vars are newDraggerPos and newHolderPos. How is that done?
Code:
function moveRight(event:MouseEvent):void {
//trace(mcHolder.width);//6759
[code].....
View 4 Replies
Jul 17, 2009
how to remove duplicate values from xml although it successfully done using array but not in xml
here's my xml data looks like (list.xml)
Code:
<?xml version="1.0" ?>
<gallery>
<menu maker="adobe1" software="flash"/>
<menu maker="adobe2" software="photoshop"/>
[Code].....
View 5 Replies
Apr 3, 2008
I am trying to develop a flash map where i need to show avalue from the current url into the text field in flash. Theproblem is I need only some values from the url to be displayed indifferent text boxes.Say the url is http://ayushjain.in/staticDefault.aspx?northamerica=168&southamerica=1 &europe=10&africa=0I want to display the value of "northamerica", "eurpoe" &"africa" in the text boxes.This should be done as soon as the swf loads in the html
View 1 Replies
Jan 28, 2009
I have a for loop that goes through my recieved values from my server. How can I put all those values into ONE array? I have this now, but obviously the array just updates every time the loop returns.
View 3 Replies
Sep 1, 2010
I have an xml of numbers that I am using to power some dynamic bar charts..
I can easily pull out a string of all node values for variable area (SQMI)
trace(stsXml.Records.Record.SQMI.children());
the trace result looks like this
6729014724597803833449707411067084872157776104101113713121757
these values do not appear to be seperated but I am hoping they are (there should be 11 unique values here).
How can I sum the 11 values as extracted from my XML?
View 2 Replies
Aug 22, 2010
I have a value object, inside are lots of getters/setters. It is not a dynamic class. And I desperately need to search an ArrayCollection filled with them. The search spans all fields, so and there are about 13 different types of VOs I'll be doing this with. I've tried ObjectUtil.toString() and that works fine and all but it's slow as hell. There are 20 properties to return and ObjectUtil.toString() adds a bunch of junk to the output, not to mention the code is slow to begin with.
flash.utils.describeType() is even worse. I'll be pleased to hear I'm missing something obvious. UPDATE: I ended up taking Juan's code along with the filter algorithm I use for searching and created ArrayCollectionX. Which means that every ArrayCollection I use now handles it's own filters. I can search through individual properties of the items in the AC, or with Juan's code it handles full collection search like a champ. There was negligible lag compared to the same solution with external filters.
View 1 Replies
Jan 24, 2011
With 5 variables consist of a value, I would need to check if any value between fa to fe has a gap of 6 in integer as in f1=1, f2=0, f3=0, f4=7, f5=10; and between f1 and f4, which has a gap of 6.
var f1:int
var f2:int
var f3:int
[code].....
View 1 Replies
Mar 17, 2011
Can I pass values from fla to AS3. Example I have fla file where the xml faile loaded. Now I want to make button "Button 1" and "Button 2" now if I press the button it sent to AS3 values/variables.
private var xmlURL:String = "xml/Button1.xml";
After buttone 2 is pressed is
private var xmlURL:String = "xml/Button2.xml";
View 1 Replies
Jul 13, 2011
I'm using YQL to try and find band photos for a project I'm working on. If an image is found, it is returned in an XML response, and my flash code posts it. But if one is not found, I'm not quite sure how to tell flash not to do anything. Here's my code:
XML.ignoreWhitespace = true;
var groupPhotoXML = new XML (e.target.data);
var imgRef = groupPhotoXML.results.img[0].@src;[code].........
An unsuccessful attempt traces out as empty.
View 2 Replies
Dec 7, 2011
how to post some variables to a URL. Let's say the user has played a Flash game, packaged as an EXE or SWF embedded in HTML stored on the user's computer, not from some webpage, and would like to register the score by completing a simple form with just an e-mail address and pressing a button.
Would it be possible to do it even thought the Flash application is not on an active webpage?
View 2 Replies
Sep 10, 2009
I'm trying to get some values from xml file but want only those where "imagemdir = 1".[code]How can I save a variable with only those with match a filename?
View 9 Replies
Oct 1, 2009
I have the following actionscript so far:
Code:
//XML
var trades = new XML();
trades.ignoreWhite = true;
[Code]....
Basically, in my xml, I obviously have many more <TradesMan> values, but my trace is only showing me the very first one. How can I put all of my values in some sort of array so I target them from elsewhere within my flash file?
View 2 Replies
Oct 23, 2009
how do i add up the vales of the array: a and find the total sum.[code]how do i add the numbers of all the values here?
View 1 Replies
Nov 2, 2009
I have a class (Control.as) in which I load a external swf with loader. In my document class, I am initiating Control class and added it to the stage.I want to now scale my external swf with min and max values.
View 3 Replies
Nov 4, 2009
i tried to add numbers with the following code and it worksNumber(ary[0]) + Number(ary[1])but when i do sum with for loop it doesnt work, anyone knows why?
var total:Number;
for(var i:Number=0; i<ary.length;i++){
total += Number(ary[i]);
}
View 2 Replies
Nov 14, 2009
There are 5 "price" textboxes on a particular frame. On a separate frame someone chooses an item and it populates those textboxes. What I want to do is be able to add together all of the "price" textboxes to populate the "total" textbox. I have tried parsing each textbox as an integer and then making a function to find the total and populate the "total" textbox but this just isn't working. It still has the value of 0 when I export. If I try parsing as a number it gives me a NaN value.
View 5 Replies
Jan 11, 2010
like object.width = 20% but that does not work
View 9 Replies
Jan 12, 2010
So I have this if statement, the goal of which is to test whether or not any of the values in an array (all of which are numeric) are equal to the value of a certain variable. How might I do this? I know how to make the array, and how to set the values in the array, and how to use any one of them on its own (myArray[somevaluegoeshere]), but how do I use all of them at once? Is there a way to do this? Should I not use an array and instead use some other better way of which I do not know?
View 2 Replies
Apr 26, 2011
I'm trying to detect certain values in XML. This is my code:[code]For some reason, the first trace comes out as "21" (which is fine) but the second trace only outputs "1" when I want it so trace "2" and then "1". Why isn't it working?
View 3 Replies
May 10, 2011
Given any existing RGB color, what is the best approach to combine that color with another, giving the appearance that the first color has been "tinted" by the second? For instance say I had a datagrid cell with a background color of 0xEEAAFF: I now want to make it appear to have a 10% Green overlay applied to that color, in comparision to the other cells around it.For efficiency, I want to do this mathematically, not use some hack like making a semi-tranparent overlay sprite, or simply setting the color manually.
BTW I tried just adding an arbitrary value to the color (5000) which kinda worked, but some colors became shocking pink rather than a pleasant green tinting when their color bytes overloaded and flowed into the next byte. I know the solution is somewhere along these lines but my knowledge of hex math and how RGB values are calculated are pretty basic =)... is this what HSB format is for???
View 6 Replies
Jun 23, 2011
I got a MovieClip which will be a moving platform for a game. And I want to be able to just copy it and place in different places on my game map. But I would also like to give them different values such as, speed, distance to travel, and so on. In As2 I would put all code i needed for the moving platform to work, inside the MoviClip in it's first frame except for the variables, speed and distance which I would put on the MovieClip instead. In a "onClipEvent(load)". Then I could just copy my MovieClip and change those variables. But this do not work in As3 and I wounder if someone knows a good way to do this
[Code]...
View 6 Replies