ActionScript 3.0 :: Trace Just Part Of A E.target.name?
Jul 9, 2009
can i trace just part of an e.target.name? I'm using an array to create multiple instances on stage of a movie clip. so for example, i have "apple1", "apple2", "apple3", etc. So if i pick up "apple1" and trace the e.target.name, i'll get "apple1". but what if i just want to trace just the "apple" part? Can I ask AS3 just to read the first 5 characters (in the big picture i want to compare items in a drag and drop type game)? I'm not 100% sold that this is the best approach of how I want to do this...but now curiosity has me at least interested.
View 3 Replies
Similar Posts:
Mar 4, 2008
For some reason when i test the movie the trace part displays in the output without me even clicking on my_button?
PHP Code:
my_button.onPress = function() { _root.clicked = true; } if (clicked == true;) { trace("clicked is true"); }
View 4 Replies
Jun 2, 2009
It's about targeting movie clips... In AS2, you just target a movie clip like so :trace (FirstMc.ChildMc1.ChildMc2.ChildMc3._x) // Will send out the x position of ChildMc3 But is AS3, i see that there's a function called getChildByName('put child name here'). But what if it's such a long way to go to that child??? Does it have to be:
FirstMc.getChildByName("ChildMc1"). getChildByName("ChildMc2"). getChildByName("ChildMc3").x
That just seems to tedious and I'm sure Adobe thought of a clean way of targetting??
View 11 Replies
Nov 7, 2009
have two of the same MovieClip on the stage, both with different instance names.However, when I trace evt.target.name it comes up as a default name such as "instance 1".Has anyone every expreienced anything like this before?
View 4 Replies
May 29, 2009
I am having issues with a global array. I have an actionscript file called MyGlobal.as at the same level as my main FLA:
[Code]....
I am able to trace that first element while trace is called within the function... but if I try to trace that first element outside of the function it is "undefined". Do I need to return the array at the end of the function? I tried that but I cant seem to get it working correctly.
View 4 Replies
Nov 9, 2011
I've been playing with prototype a bit and I've noticed that either it isn't as static as it should be or that some functions are protected from altering, or that in some cases the prototype actually extends a function. For example, I was trying to modifiy the global trace function to output the current time of a trace action, something like this :
Code:trace("lulu"); // output 12:48:17.286 lulu I DID achieve something close to it, but it seems that I haven't actually modified the global trace function, but rather it's "_root" counterpart,
[Code]...
View 3 Replies
Nov 14, 2009
ive got a loaded xml list for an mp3 player. from playing track1, when i select track 2, it traces "track1" but then after a second click it traces "track2" and stays on that. the actually music for track2 does load on the first click though, but not the trace. anyone know why on the first click it would still trace the previous track? here is the code for that function...
[Code]...
View 9 Replies
Dec 21, 2004
take a look at the results of these traces:
trace(imgGal); //traces "1"
trace(itemClip1._y); //traces "32"
trace(itemClip[imgGal]._y); //traces "undefined"
why does the last trace not trace "32" like the second trace? I want to insert the variable "imgGal" onto the end of the mc "itemClip", how can I do this?
[Code]...
View 11 Replies
Aug 8, 2006
var dane:Array = new Array();
dane_xml = new XML();
dane_xml.ignoreWhite = true;[code]....
and this last trace gives me undefined while trace(temp) gives me what I want
View 7 Replies
Mar 9, 2011
Ok perhaps ive bitten off too much here...I know you are not supposed to parse xml/html to regex but the thing is there just arent many other options.Im using AS3.im parsing the source of textflowlayout text to a different format.
string to parse :
< fontFamily=Verdana encoding=unicode fontWeight="bold"> some text < fontFamily=Verdana encoding=unicode > some text < fontFamily=Arial encoding=unicode fontStyle="italic"> some text < fontFamily=Arial encoding=unicode fontWeight="bold" fontStyle="italic"> some text
what i really need is:
< fontname=Verdanabold encoding=unicode> some text < fontname=Verdana encoding=unicode > some text < fontname=Arialitalic encoding=unicode > some text < fontname=Arialbolditalic encoding=unicode > some text
logically i think of it as taking apart the string into substrings
checking if there are fontWeight or fontStyle in the substring
if there is then appending the font name with the weight or style so so that the font name becomes font NameWeightStyle.then rebuilding the string.The font could be any font with variouse styles or weights..so far:
pattern = /<(.*?)>/gixsm;
var matches:Object = pattern.exec(str);
var finalstring:String = "";[code]...........
View 1 Replies
Mar 11, 2012
I'am looking for a flv/video player which allow to seek for not loaded part of the video,just like on youtube.
View 1 Replies
Sep 29, 2003
On the attached exercise, is it possible to stop further items being dragged onto a target when the target box is full?
View 1 Replies
Nov 28, 2011
What is the difference between target and currenttarget in flex?What is the difference between Target and Current Target in Flex especially in mouse events.
View 2 Replies
Aug 30, 2010
qi have a movieclip which is added to the stage:
var profileholder:profileHolder=new profileHolder ;
inside of profileholder is another movieclip(infoBtn) that acts as a button.when the mouse is over profileholder i want to do something with infoBtn like:
//profOver is the over state of profileholder
function profOver(e:Event) {
e.target.infoBtn.alpha=1;
}
this doesn't work and brings up this error:ReferenceError: Error #1069: Property infoBtn not found on flash.display.Loader and there is no default value.
at main_fla::MainTimeline/profOver()
i also tried:
function profOver(e:Event) {
var item:profileHolder=e.target as profileHolder;
item.infoBtn.alpha=1;
}
and get this error:TypeError: Error #1009: Cannot access a property or method of a null object reference.
View 1 Replies
Mar 14, 2005
i don't know why this isn't working.i got a button. and when it's pressed, i need it to go and play a frame in a movie clip. i'll test it and then when i click on it, i get this:
Target not found: Target="whoweare" Base="_level0.instance20.instance48.instance49"
this is the code that i am using:
on (press) {
tellTarget ("whoweare") {
gotoAndPlay (51);
}
}
View 14 Replies
Feb 16, 2005
so, i'm making an animated rollover, and i get an output error that says this:
Target not found: Target="_root.icon01" Base="_level0"
i have no idea what the base="_level0" means.
View 1 Replies
Jul 26, 2009
Here is the code I have in my flash
System.useCodepage = true;
send_btn.onRelease = function() {
my_vars = new LoadVars();
[code]....
I need help figuring out how to add the PHP part, I have no idea about how to script it. I looked over some tutorials but I just don't understand it. I got this code from when I was in college, I used it before but I can't find the original PHPcode I used. It's for my website, just a simple email form with a name, email, and message
View 2 Replies
Apr 9, 2009
I am using a template that the buttons have actionscript in them already. I tried replacing "get url" with "gotoAndPlay" a certain frame. I need the button to go to frame 113 after i click on this button.
on (rollOver) {
if (_root.link<>p) {
gotoAndPlay("s1");
[Code].....
View 2 Replies
May 13, 2009
I'm constructing a site, at least I'm trying :P I made a part with photoshop but now I'm continuing in iweb because I thought oh it's ease to insert a photo page, because that's the only reason. I'm a little bit a noob in html and php and so on and also in flash so that was the solution at least that was wath I taught... :roll: this is how it looks in iweb:that is how it should look on the internet, it does as you can see here:but when I click on a picture to enlarge normally you should get a nice screen but I have this:As you can see that is a problem, everything moved and so on
View 1 Replies
Aug 12, 2009
Ok i have been making a website and i need to put a preloader in that loads my website. I have downloaded 3 different preloader and replaced the pic that they had in with my own and when i do that it either no longer works or it has a white screen until about 50% then it does work! WTH is going on??????
View 7 Replies
Nov 3, 2009
What i am trying to do is when i click on a part of an img to delete it.[code]i read on setpixels and getpixels but this did ot help.
View 2 Replies
Oct 21, 2010
I have the attached image of a bioreactor. I want to animate the area marked with the red outline (and a cross) to be filled with a bluish transparent liquid. I am trying to create an animation for students to show how the residue in the bioreactor behaves and I have to show the animation in a real picture (cant draw).
View 9 Replies
Sep 23, 2011
I am needing to export portions of my timeline as separate .mov files. Exporting the entire thing at Best quality yields too big of a file. Does anyone know how to do this from within Flash pro?
View 1 Replies
Jun 4, 2010
Is it possible to alter this code to only print a certain area of my page?[code]...
View 1 Replies
Jun 18, 2010
i'm using jpeg encoder script. in the script example, a movie clip is converted to jpeg. differently i want to convert the stage but only some part of it such as x:320-500, y:0-600. is it possible?
[Code]...
View 3 Replies
Nov 25, 2009
i have this output in the url HTML Code: [URL] how can AS3 read the 1 in (subcat=1) part of the url?
View 2 Replies
May 4, 2011
I have a string:"newImageContainer_mc_0"
And I only want the 0 at the end, how do I strip the String so that I only take from it a character or a group of characters?
View 6 Replies
May 15, 2009
They show their work as the page�s background which can be resize with the browser window, but their navigation always stays the same.I know how to achieve the resizing effect, but it resizes the whole stage including navigation.
View 2 Replies
Jun 7, 2009
And also is there a way to print a part of flash contents of maybe entirely compose the stuff (image that is) you give to printer.In my case i have a flash in which contains to pictures (basicaly even and odd page of a book) and other stuff. I want to add printing functionality. Also i want user to be able to choose what to print - whole flash, both pages or just one of them
View 2 Replies
Apr 22, 2009
I'm using Adobe Flash CS4 for the first time to try and make an animation set to music (like the opening scene of an anime). I need to listen to specific portions of the song so that I can match the timing of my animations.
I know that you can press Enter and it'll Play, but I don't know how to start listening to the music at the frame I want. I also don't know how to stop the music once it starts playing.
I also know I can do Ctrl+Enter to Test Movie, but that always starts playing my animation from the very beginning.
I want to know how to watch/listen to a specific part of the animation, without having to play it stop to finish.
View 1 Replies