Can dynamic text links (XML) pass arguements to movie clips?
I have a dynamic text field that i'm pulling a XML file into,
but I need the URL links within the XML to control a movie clip.
I've read that you can pass an arguement inside flash from within
the XML doc but i'm not positive how it would be done.
Any love on this one?
Hmm, this leaves a couple questions... Where would I put the
script/function, inside the <a href> tag? That could get out
of hand... like in-line CSS styles. And I have a URL node within
XML set-up so I don't know if this solution would work.
Similar Messages
-
Ok, I'm a real novice when it comes to code so I'm hoping
someone out there can help me.
I have a band site that I has tour dates loading via xml into
the flash site. The tour dates can be clicked on to take you to the
Venue's website. The problem, and I'm sure it's insanely simple is,
I would like the link to open a new browser window (target =
"blank"), Where in my code can I put this? I've gotten it this far
and I'm going nuts now...
Thanks in advance,
Mike.
See attached code://line 25 in your script:
window += "<a href=\"" + myarray
.link + "\">" + myarray.header + "</a><br>";
//change to
window += "<a href=\"" + myarray
.link + "\" target=\"_blank\">" + myarray.header +
"</a><br>"; -
How can I load an external SWF into a movie clip that's inside other movie clip?
Hi.
I creating my first flash (actionscript 3.0) website but I'm
stuck with a visual effect I want to create.
I have a window on my website called contentWindow. Every
time you click a button this window is supposed to leave the stage,
load the requested content and return to the stage.
The sliding window is a movie clip with 83 frames, 21 to
enter the stage, 21 to leave the stage again, 20 for nothing (its
just to simulate the loading time) and 21 to return to the stage.
Now my goal is, when the user clicks on a navigation button,
the window exits the stage, loads an external SWF with the content,
and then returns to the stage.
I've the "window" movie clip with an instance name of
"contentWindow". Inside there is another movie clip with an
instance name of "contentLoader". The content that the user
requested should appear inside the "contentLoader".
Now, when the contentWindow leaves the stage, I get this
error message:
quote:
TypeError: Error #1009: Cannot access a property or method of
a null object reference.
at rwd_fla::MainTimeline/trigger()
If I switch
"contentWindow.contentLoader.addChild(navLoader);" for
"contentWindow.addChild(navLoader);" it works fine, but the
external SWF doesn't move with the window.
How can I load an external SWF into a movie clip that's
inside other movie clip?Hi,
Recently, I have been putting together a flash presentation.
And I am just wondering if the following might help you, in your
communication with the said swf file:
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
onComplete);
function onComplete(event:Event):void
event.target.content.thinggy_mc.y -= 100;
Not the best example, but this allows you to target a mc
within an external swf file. I think if you look up this code, you
will have an answer ;)
Kind Regards,
Boxing Boom -
How can I put a slideshow on automatic with movie clips longer than 2 minutes?
How can I put a slideshow on "automatic" with movie clips that are longer than 2 minutes?
Inspector > Animate > start transition to Automatically and set the delay to the duration of the video clip.
-
Dynamic text link hover color change.
I have some dynamic text in Flash and I have a link with the text. Is there a way I can change the hover color without CSS? Here is my code.
thanks.
data=EASTERN CANADIAN DISTRICT<br><a href='mailto:[email protected]'><font color="#51884B">Mike Linnen</font></a><br>905-430-0955<br>Cell: 905-409-7159Disable the "Show border around text" option of your dynamic
text field.
Draw a rectangle with the color you want, & locate it
behind your dynamic text field. -
All dynamic text links going to same link even though URLs differ
Hi,
I just made a flash news scroller where the news headlines are dynamic text and have different urls provided in the link section. But when I click on any of them, they all go to the first link only. Am I supposed to set something here to stop it from doing so?
Any help appreciated.Ok, I figured out why all the links are going to the same page. Well all the other links are under the first headline, which I am making transparent for the others to appear, but not removing from the stage. Hence even though the first headline is not visible, it is still the top link on the screen, causing everything to go there.
Any suggestions on how I can make it appear below the newly visible headline?? They are all arranged one below the other. -
Can anyone help with this? I'm trying to get text on a screen
to link to documents (that will be on a CD, currently on my hard
drive) such as pdf, txt etc. Using Flash 9.
Thanks.Thanks again for your reply. Since my last posting, I have
gotten mostly everything figured out except the main issue, which
is creating a link to documents from text. In the following code I
was able to load dynamic text from an external txt file and I
inserted an html link in the txt file but I don't want to open a
browser link, but rather a file on CD or hard drive:
var textLoader:URLLoader = new URLLoader();
var textReq:URLRequest = new URLRequest("test.txt");
function textLoaded(event:Event):void
getStart_txt.htmlText = textLoader.data;
textLoader.load(textReq);
textLoader.addEventListener(Event.COMPLETE, textLoaded);
So everything looks good, except how do I get the html link
in the text file to open a doc instead of a url? Or maybe something
in your post will work.
Regarding buttons and code, this is from a Flash website:
"So you just started AS3.0 full of excitement and ready for
some coding challenges, you start coding your first button and
suddenly, horror, you end up with "WARNING: Actions on button or
MovieClip instances are not supported in ActionScript 3.0. All
scripts on object instances will be ignored." or "1119: Access of
possibly undefined property onPress through a reference with static
type flash.display:SimpleButton.", indeed the good old AS2.0 event
system is not working anymore in AS3.0: onClipEvent, onPress,
onRelease, onLoad, onMouseDown ..etc, have become things of the
past!!!
What happened? well basically the whole event handling system
has been revamped in Actionscript 3.0 and we are going to have a
quick look at it."
When I select a button in Flash 9, the error message I get is
"Current selection cannot have actions applied to it."
Thanks. -
Can Javascript text link in PDF?
Is there a way to insert a javascript text link in a PDF? I've added web links to text, but I just want to insert some javascript so when the user clicks on the text, it runs my script
I post problem in many forums but not got the best answer
any help would be greatly appreciated!
ThanksJust create a link with the Link tool and specify a JavaScript action.
George -
Can Dynamic Text Utilize Opacity?
I did a search on this forum for "opacity dynamic text" and
came up with nothing, so I apologize if this has been covered
before.
I have dynamic text boxes with scroll bars on a page. I made
a Movie Clip of all of them and I am fading from 0 to 100 opacity
in the timeline. When I scrub the timeline, it works. However, when
I publish, the text doesn't fade in. The scroll bars do and the
static text does, but none of the text boxes that are set to
dynamic.
I thought of fading a white rectangle (the background is
white) from 100 to 0 on top of the dynamic text, but I have some
animation going on in the background that would be covered as well.
Anyone have any ideas?
Thank you so much for your time.OK, I figured it out.
You have to select the dynamic text, click on the Embed
button, then click on Auto Fill, then click on OK.
Embedding the dynamic text lets it fade in/out.
Thanks, Scot! No problem, Scot. -
How can I convert my animation into a working movie clip that can be used with a new scene?
Hello all,
First and foremost, I AM A TOTAL FLASH NOOB. I want to preface this and make it incredibly clear how new this all is to me. I LITERALLY started using flash this morning; that is precisely how new I am.
With that being said I am going to do my best to explain what I'd like to do.
I have created an animation of a spider moving its legs back and forth. I want to be able to combine all of the layers into 1 simple animation that can be imported into new flash scenes with the animation exactly how it stands. I have figured out how to convert the whole animation into a symbol AND I have figured out how to import the movie clip from the library. However, herein lies my problem. When I open a new flash scene and import my animation, I play it and it does nothing at all. It's just the static image of the spider I created with no movement.
I've spent the last couple hours trying to figure out (and doing my own research) what I have done or didn't do to get to this point. I'd be willing to bet I am just going about the entire process incorrectly and I'm simple overlooking a basic facet of the program.
Any insight to fix my ignorance is greatly appreciated.
(P.S. Hell, I don't even know if I am using the correct terminology so for all I know I am confusing every person who has taken the time to look at my question. If I am using incorrect terminology please correct me to avoid future hang ups. Thank you.)Ned! This totally worked! Thank you! I knew there was a tiny piece of this whole thing that was preventing me from making everything work. Unfortunately as my luck would have it, although I have the movieclip working the spritesheet converter I'm using now no longer recognizes the movie clip. The converter says there are 7 frames in the animation, but doesn't display any working sprites. Just a blank sheet. Frustrating to say the least.
I'm just going to throw everything out on the table here:
This is the video tutorial i'm using to convert my animation into a spritesheet. I've done the steps exactly as directly up until the point I actually click "Begin Conversion." When begin conversion is selected, it shows the movieclip exists on the bottom left underneath "list of movieclips" but doesn't actually show any individual sprites.
Here's the simple sprite converter I am using.
The irony of this whole situation is that you have successfully helped me make a working movieclip (which was the important piece), but the converter no longer recognizes it. Whereas before, it would at least show the image on the 1 frame of animation it had.
If you wanted to to take a stab at it and see if you can successfully get it to work I'd be appreciative. If not, I totally understand as you have already been incredibly helpful and have my eternal gratitude for getting me this far. These animation programs can be quite overwhelming when they so vastly differ from one another. Don't even get me started no Anime' Studio Pro. -
Can i assign a child state to a movie clip that is already placed on stage
Hello
Is it possible to add a child state to a movie clip that is
already placed on stage,
i need to do this so i can move the movieclip to the top of
the display list.
thanks for the help
mt"The objects i want it to appear above are loaded swf's onto
the same main stage."
Aha, this is where things can get confusing. The terminology
between the Flash Authoring tool and ActionScript is not
consistent.
In ActionScript, the Stage is the top most DisplayObject. You
probably get that.
In Flash, the canvas that is often referred to as "the stage"
is not the Stage object of ActionScript, rather the Flash stage is
a DisplayObject class called MainTimeline (or if you assign a
document class, it's that class), which is the first and only child
of the ActionScript Stage object. It's the only child unless, of
course, you add something else to the ActionScript Stage object at
runtime... like a loaded swf. ;)
So in other words, if you are doing anything like this:
stage.addChild(myLoadedSWF)
You are actually putting myLoadedSWF above the MainTimeline
object, which is the entire Flash timeline. There's nothing wrong
with that, but in this case it means changing the depth of things
inside the MainTimeline is not going to change the fact that the
MainTimeline itself is below myLoadedSWF.
Most likely the simplest solution is to add your loaded SWFs
to the property "root", not stage. root can refer to different
things in different places, but most of the time it refers to the
MainTimeline, and if I had to guess I would say it almost certainly
does in your case. Note that the "root" property is typed as a
DisplayObject, not a DisplayObjectContainer, so addChild (which is
a DisplayObjectContainer method) will not be recognized unless you
typecast to DisplayObjectContainer or a subclass of
DisplayObjectContainer, like Sprite or MovieClip:
MovieClip(root).addChild(myLoadedSWF)
Also note that, unlike AS2, in AS3 it's very easy to simply
add your loaded SWF below existing objects you create in Flash. You
can use addChildAt(obj,0) for instance to add it to the very
bottom. -
Can I change the registration point of a movie clip?
I'm loading a movie clip dynamically and its registration
point defaults to top-left corner. I need to change it to the
center, is this possible? if so, how?
Thank youThank you. I tried that and it didn't work too. Please check
this code:
loader.loadClip(_global.image_url+this["image1"], image1);
DynamicRegistration.initialize(image1);
image1.setRegistration( 20, 20);
What is wrong with it? -
Link a button inside a movie clip to a scene
I am trying to link a button that is inside a movie clip to a scene. The button has the instance name "cosmetic_btn" and the scene is called "Cosmetic Treatments".
On my main timeline I have the code:
cosmetic_btn.addEventListener(MouseEvent.CLICK, clickHandler);
function clickHandler(evt:MouseEvent):void {
gotoAndStop(1, "Cosmetic Treatments");
And on the timeline inside the movie clip I have this code:
MovieClip(root).gotoAndStop("Cosmetic Treatments");
When I run the document I get the following error:
Home, Layer 'actions', Frame 101, Line 1
1120: Access of undefined property cosmetic_btn.
I have the instance name "cosmetic_btn" set on the button so I am unsure what is wrong here?
http://img600.imageshack.us/img600/3236/gp2g.pngOne other thing you should correct is to add a frame number/label for the line....
MovieClip(root).gotoAndStop("Cosmetic Treatments");
otherwise you are likely to get an error regarding there not being a frame with that label -
Download BLOB - dynamic text link
Hi apex users,
I have a report with a standard blob download columns, using the following SQL:
select a, b, filename, minetype, dbms_lob.getlength(blob_column) report_length
from table
*where [...]*
and the following format is applied to the "report_length" column:
DOWNLOAD:BLOB_TABLE:BLOB_COLUMNS:BLOB_ID::MIMETYPE:FILENAME:::inline:Download
It's work fine, but i'd like te personalized the "Download" link, and make it change dynamically:
I've read in the documentation that the link text supports substitutions strings, and try to test with:
DOWNLOAD:BLOB_TABLE:BLOB_COLUMN:BLOB_ID::MIMETYPE:FILENAME:::inline:#OWNER#
and it's work fine.
But what I want is to diplay the a column of my sql query:
DOWNLOAD:BLOB_TABLE:BLOB_COLUMN:BLOB_ID::MIMETYPE:FILENAME:::inline:#A#
DOWNLOAD:BLOB_TABLE:BLOB_COLUMN:BLOB_ID::MIMETYPE:FILENAME:::inline:#COL01#
But doesn't work. Am i missing something?
AkAHi,
Thanks KGLAD, I will give it a try. Much appreciated. This
XML stuff via Flash is a difficult learning curve for me. ;)
Kind Regards,
Boxing Boom -
I've created a dynamic (scrolling) text field in Flash MX
2004 Pro. The text contains links to webpages. The links work in
the published Flash SWF but not when I place the SWF in Director.
Please help?
LarsYou need to catch the getURL() message in Director and have
it open your
browser to the link. Try attaching the following as a
behavior to the
Flash sprite:
on getURL me, aLink
gotoNetPage(aLink)
-- better to use Buddy API:
-- OK = baOpenURL(aLink)
end
Maybe you are looking for
-
How do I remove all traces of 'album'? I do not want artwork, blank place holders, titles or artists sorted by album? I just want my music listed by title, artist or genre.
-
DVD won't play in PC DVD drive.
I know this message board is full of questions like the one I am about to ask. But I am working on a project for school due in the morning and i am having a problem. So bear with me. I am completely new to DVDSP. I made a project in FCP and exported
-
Importing mail to iCloud mail?
Is it possible to get iCloud to import existing mail from an external mail account?
-
How do I get a driver for my Epson Stylus Photo 1400 so that it will run with Mountain LIon? I tried "Software Update" and says "no update available". I contacted Epson and was told all driver updates had to be obtained using "Software Update"?
-
How do i create a Statistical Key Figure ?
Hi everybody, I want to create a statistical key figure ... How can i proceed ? Thanks Rodolphe.