Sign In  Sign Up Live-Chat

add links to swf

Last post 04-09-2008, 6:41 AM by alcrus. 10 replies.
Sort Posts: Previous Next
  •  04-02-2008, 10:53 AM 120350

    add links to swf

    Attachment: Present (inaccessible)

    Hi there,

    I need to add real links where the text www.timeandleisure.co.uk appears in this swf. can ASPOSE.Flash do this from C# ? I've looked at the API but can't work it out.

    Thanks,

    Andy 

     
  •  04-03-2008, 3:08 AM 120515 in reply to 120350

    Re: add links to swf

    Dear Andy,

    Thanks for considering Aspose.Flash.

    Yes, you can do it with Aspose.Flash, I will let you know how to do it as soon as possible.


    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Engineer
    Aspose Tyumen Team
     
  •  04-03-2008, 3:46 AM 120526 in reply to 120515

    Re: add links to swf

    Thanks Shakeel,

    I can't wait to see it.

    Regards,

    Andy

     
  •  04-07-2008, 4:08 AM 120974 in reply to 120515

    Re: add links to swf

    Are you guys near to posting this ?

    Thanks,

    Andy

     
  •  04-07-2008, 5:07 AM 120981 in reply to 120974

    Re: add links to swf

    I have requested the developer lead to provide the code example. As soon as, he will provide me, I will post here. Thanks for your patience.


    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Engineer
    Aspose Tyumen Team
     
  •  04-08-2008, 12:49 AM 121135 in reply to 120974

    Re: add links to swf

    Attachment: Present (inaccessible)

    Dear Andy,

    Here is a sample code that adds a link. I have also attached the output test.swf.

    C# Code

    FlashContainer flash = new FlashContainer();

    /// define background

    SetBackgroundColor bg = new SetBackgroundColor(new RGB(255,255,255, 255));

    flash.Add(bg);

    /// define font

    DefineFont2 font = new DefineFont2(flash.NewIdentifier(), "Times New Roman");

    font.Small = false;

    font.Italic = false;

    font.Bold = false;

    font.Language = TextLanguage.Latin;

    font.Leading =0;

    font.CodeTable = new ArrayList();

    font.GlyphShapeTable = new ArrayList();

    flash.Add(font);

    /// define html text with url inside

    Rect bounds = new Rect(-40, -40, 3000, 596);

    DefineEditText text = new DefineEditText(flash.NewIdentifier(), bounds);

    text.FontId = font.FontId;

    text.WordWrap = false;

    text.Multiline = true;

    text.ReadOnly = true;

    text.AutoSize = false;

    text.NoSelect = false;

    text.Bordered = false;

    text.HTML = true;

    text.UseOutlines = false;

    text.FontHeight = 400;

    text.TextColorRGB = new RGB(0,0,0,255);

    text.Leading = 40;

    text.InitialText = "<p align=\"left\"><font face=\"Times New Roman\" size=\"12\" color=\"#000000\"><a href=\"http://www.aspose.com\">www.aspose.com</a></font></p>";

    flash.Add(text);

    /// add defined text to a flash as object

    PlaceObject2 placeObject = new PlaceObject2(text.ObjectId, 1);

    placeObject.CharacterType = PlaceType.New;

    placeObject.MatrixTransform = new MatrixTransform(1190, 2580);

    flash.Add(placeObject);

    flash.Add(new ShowFrame());

    /// set frame rate

    flash.FrameRate=24.0f;

    /// set frame size

    flash.FrameSize =new Rect(0, 0, 4000, 4000);

    flash.Write("c:\\test.swf");


    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Engineer
    Aspose Tyumen Team
     
  •  04-08-2008, 2:35 AM 121155 in reply to 121135

    Re: add links to swf

    Thanks Shakeel, but I was hoping you could show me how to find the text www.timeandleisure.co.uk too. You see, this is one example of many and I need to be able to determine the position of the RECT programmatically from scaning for "www."

    Is this possible ?

    Thanks again,

    Andy

     
  •  04-09-2008, 4:02 AM 121374 in reply to 121135

    Re: add links to swf

    Hi again - Are you guys looking into this ? Is it possible to scan the text in this way ?

    Thanks,

    Andy

     
  •  04-09-2008, 4:22 AM 121378 in reply to 121374

    Re: add links to swf

    Hello Andy,

    You can open .swf file and iterate all records inside to find DefineEditText records.
    DefineEditText.InitialText property contains plain or html text so you can change it if necessary.

    Alexey Zhilin
    Lead Developer
    Aspose Tyumen Team
    About Us
    Contact Us
     
  •  04-09-2008, 5:35 AM 121386 in reply to 121378

    Re: add links to swf

    Thanks Alexey, but the swf I posted only has no DefineEditText tags - Only the following tags:

    Aspose.Flash.Swf.SetBackgroundColor, Aspose.Flash.Shapes.DefineShape3, Aspose.Flash.Swf.UnknownObject, Aspose.Flash.Swf.PlaceObject2, Aspose.Flash.Shapes.DefineShape, Aspose.Flash.Text.CSMTextSettings, Aspose.Flash.Text.DefineText, Aspose.Flash.Swf.ShowFrame, Aspose.Flash.Text.DefineFont2,Aspose.Flash.Swf.FileAttributes and Aspose.Flash.Bitmaps.FlashBitmap

    None of these cast to DefineEditText

    Can I do anything else with these to scan my content  ?

     
  •  04-09-2008, 6:41 AM 121391 in reply to 121386

    Re: add links to swf

    In this case text represented by font glyphs. That is just set of curves and polylines. There is no any information about text characters so it's not possible to determine what text swf file contains.

    Alexey Zhilin
    Lead Developer
    Aspose Tyumen Team
    About Us
    Contact Us
     
View as RSS news feed in XML